From d71a98089655e7bd392e65c0e94a95aaec217d99 Mon Sep 17 00:00:00 2001 From: Hoan Nguyen <83745591+nqhoan-axonivy@users.noreply.github.com> Date: Tue, 28 May 2024 18:01:08 +0700 Subject: [PATCH 01/11] Feature/MARP-277 setup infrastructure for our dev server (#3) - Update build - Update CI script --------- Co-authored-by: Hoan Nguyen --- .github/workflows/ci-build.yml | 51 +++++++++++++++++++++++++++++++++ .github/workflows/dev-build.yml | 5 +--- .github/workflows/sonarqube.yml | 23 --------------- 3 files changed, 52 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/ci-build.yml delete mode 100644 .github/workflows/sonarqube.yml diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml new file mode 100644 index 000000000..5a946e369 --- /dev/null +++ b/.github/workflows/ci-build.yml @@ -0,0 +1,51 @@ +name: CI Build +run-name: Build on branch ${{github.ref_name}} triggered by ${{github.actor}} + +on: + push: + workflow_dispatch: + +jobs: + analysis: + name: Sonarqube analysis + runs-on: self-hosted + env: + SONAR_PROJECT_KEY: "AxonIvy-Market-Service" + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: sonarsource/sonarqube-scan-action@master + env: + SONAR_TOKEN: ${{ env.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ env.SONAR_HOST_URL }} + with: + args: + -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} + - name: SonarQube Quality Gate check + id: sonarqube-quality-gate-check + uses: sonarsource/sonarqube-quality-gate-action@master + timeout-minutes: 5 + env: + SONAR_TOKEN: ${{ env.SONAR_TOKEN }} + SONAR_HOST_URL: ${{ env.SONAR_HOST_URL }} + with: + args: + -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} + build: + name: Executes Tests + runs-on: self-hosted + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Tests with Maven + run: mvn -B test --file pom.xml diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml index ca9c398ba..63418eb2b 100644 --- a/.github/workflows/dev-build.yml +++ b/.github/workflows/dev-build.yml @@ -8,7 +8,7 @@ on: jobs: build: - + name: Packge project and deploy to tomcat runs-on: self-hosted steps: @@ -22,6 +22,3 @@ jobs: - name: Build with Maven run: mvn -B package --file pom.xml - # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive - - name: Update dependency graph - uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6 diff --git a/.github/workflows/sonarqube.yml b/.github/workflows/sonarqube.yml deleted file mode 100644 index 0c0d5b4e1..000000000 --- a/.github/workflows/sonarqube.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: SonarQube Build -run-name: Analyze and upload reports to Octopus-Sonar by ${{github.actor}} - -on: - push: - branches: [ "develop" ] - workflow_dispatch: - -jobs: - Analysis: - runs-on: self-hosted - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: sonarsource/sonarqube-scan-action@master - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - with: - args: - -Dsonar.projectKey=AxonIvy-Market-Service From a13bf11478dc10f8434345e52f6dc4038e411927 Mon Sep 17 00:00:00 2001 From: ivyTeam Date: Mon, 3 Jun 2024 08:54:02 +0200 Subject: [PATCH 02/11] Add Apache 2.0 license --- LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From 9b77b8bf51d586c6d72292b66958e9f4a624cecb Mon Sep 17 00:00:00 2001 From: ivyTeam Date: Mon, 3 Jun 2024 08:54:37 +0200 Subject: [PATCH 03/11] Add Security.md file to repo --- SECURITY.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..1d4c06f71 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,25 @@ +## Reporting a Vulnerability + +At Axon Ivy, we take security seriously. If you believe you've found a security vulnerability in our software, we encourage you to let us know right away. We investigate all reported vulnerabilities promptly. + +To report a vulnerability, please send an email to [security@axonivy.com](mailto:security@axonivy.com) with the following information: + +- Description of the vulnerability +- Steps to reproduce the vulnerability +- Any additional information or context that may be helpful + +Please refrain from publicly disclosing the vulnerability until it has been addressed by our team. + +## Response Time + +We strive to respond to security vulnerability reports as quickly as possible. Upon receiving your report, we will acknowledge it within 72 hours and we will release a patch as soon as possible depending on complexity, but historically within a few days. +Please report (suspected) security vulnerabilities at https://support.axonivy.com/. + + +## Responsible Disclosure + +We encourage responsible disclosure of security vulnerabilities. We believe that working together with security researchers and the broader community helps us improve the security of our software for everyone. + +## Contact + +For any questions or concerns regarding security, please contact us at [security@axonivy.com](mailto:security@axonivy.com). From cd456fb854ed93302ecf4bdcc8417c62db3cb761 Mon Sep 17 00:00:00 2001 From: ivyTeam Date: Fri, 14 Jun 2024 17:14:18 +0200 Subject: [PATCH 04/11] Add CODE_OF_CONDUCT.md file to repo --- CODE_OF_CONDUCT.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..e54f7dc40 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,24 @@ +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. +As part of the Ricoh Group, Axon Ivy is guided by [The spirit of the three loves](https://www.ricoh.com/about/ricoh-way): + +- **Love your neighbor** ๐Ÿค +We love to get in touch with people and are willing to help others when we get aware of their issues and ideas. Everyone that participates as user or contributor in this repository, is our neighbor. + +- **Love your country** ๐Ÿ—บ +We love the place weโ€™re located at and enjoy the nature around us. We take care of the environment and are eager to learn from cultures around the globe. + +- **Love your work** ๐Ÿ‘ทโ€โ™‚๏ธ +We are passionate developers, eager to work with new technologies and happy to be part of the digital transformation. We love to be creative at work and seeing our visions accomplished. + +## Our Guidelines + +This repository is intended to facilitate a friendly and inspiring exchange in which we focus on technical content. + +- Be friendly and patient. +- Be welcoming. +- Be considerate. +- Be respectful. +- Be careful in the words that you choose. +- When we disagree, try to understand why. From cae7b7b6170ba5daaee91f6b9da9452bfbfba32d Mon Sep 17 00:00:00 2001 From: ivyTeam Date: Tue, 18 Jun 2024 03:55:32 +0200 Subject: [PATCH 05/11] Add CODE_OF_CONDUCT.md file to repo (#19) --- CODE_OF_CONDUCT.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index e54f7dc40..ec0fe32aa 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,20 +1,20 @@ ## Our Pledge -We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. As part of the Ricoh Group, Axon Ivy is guided by [The spirit of the three loves](https://www.ricoh.com/about/ricoh-way): - **Love your neighbor** ๐Ÿค -We love to get in touch with people and are willing to help others when we get aware of their issues and ideas. Everyone that participates as user or contributor in this repository, is our neighbor. +We love to get in touch with people and are willing to help others when we are aware of their issues and ideas. Everyone who participates as a user or contributor in this repository is our neighbor. - **Love your country** ๐Ÿ—บ We love the place weโ€™re located at and enjoy the nature around us. We take care of the environment and are eager to learn from cultures around the globe. - **Love your work** ๐Ÿ‘ทโ€โ™‚๏ธ -We are passionate developers, eager to work with new technologies and happy to be part of the digital transformation. We love to be creative at work and seeing our visions accomplished. +We are passionate developers, eager to work with new technologies, and are happy to be part of the digital transformation. We love to be creative at work and see our visions accomplished. ## Our Guidelines -This repository is intended to facilitate a friendly and inspiring exchange in which we focus on technical content. +This repository is intended to facilitate a friendly and inspiring exchange in which we focus on technical content. - Be friendly and patient. - Be welcoming. From 8883604a40ba3520edff9f1f5bc45c8a18cee887 Mon Sep 17 00:00:00 2001 From: Hoan Nguyen <83745591+nqhoan-axonivy@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:09:20 +0700 Subject: [PATCH 06/11] Added new workflow (#27) --- .github/workflows/dev-build.yml | 24 --------- .github/workflows/service-ci-build.yml | 50 +++++++++++++++++++ .github/workflows/service-dev-build.yml | 42 ++++++++++++++++ .../{ci-build.yml => ui-ci-build.yml} | 50 +++++++++++-------- .github/workflows/ui-dev-build.yml | 28 +++++++++++ 5 files changed, 148 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/dev-build.yml create mode 100644 .github/workflows/service-ci-build.yml create mode 100644 .github/workflows/service-dev-build.yml rename .github/workflows/{ci-build.yml => ui-ci-build.yml} (66%) create mode 100644 .github/workflows/ui-dev-build.yml diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml deleted file mode 100644 index 63418eb2b..000000000 --- a/.github/workflows/dev-build.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: DEV Build -run-name: Build and Deploy Marketplace-Service on branch ${{github.ref_name}} by ${{github.actor}} - -on: - push: - branches: [ "develop" ] - workflow_dispatch: - -jobs: - build: - name: Packge project and deploy to tomcat - runs-on: self-hosted - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn -B package --file pom.xml - diff --git a/.github/workflows/service-ci-build.yml b/.github/workflows/service-ci-build.yml new file mode 100644 index 000000000..e384445d2 --- /dev/null +++ b/.github/workflows/service-ci-build.yml @@ -0,0 +1,50 @@ +name: Service CI Build +run-name: Build Service on branch ${{github.ref_name}} triggered by ${{github.actor}} + +on: + push: + workflow_dispatch: + +jobs: + build: + name: Executes Tests + runs-on: self-hosted + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Tests with Maven + run: mvn clean install --file ./marketplace-service/pom.xml + analysis: + name: Sonarqube analysis + needs: build + runs-on: self-hosted + env: + SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + SONAR_PROJECT_KEY : ${{ secrets.SONAR_PROJECT_KEY }} + steps: + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + - name: Run SonarQube Scanner + run: | + mvn -B verify sonar:sonar --file ./marketplace-service/pom.xml \ + -Dsonar.host.url=${{ env.SONAR_HOST_URL }} \ + -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} \ + -Dsonar.projectName="AxonIvy Market Service" \ + -Dsonar.token=${{ env.SONAR_TOKEN }} \ + - name: SonarQube Quality Gate check + id: sonarqube-quality-gate-check + uses: sonarsource/sonarqube-quality-gate-action@master + timeout-minutes: 5 + with: + scanMetadataReportFile: ./marketplace-service/target/sonar/report-task.txt + args: -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} diff --git a/.github/workflows/service-dev-build.yml b/.github/workflows/service-dev-build.yml new file mode 100644 index 000000000..716ebe4b5 --- /dev/null +++ b/.github/workflows/service-dev-build.yml @@ -0,0 +1,42 @@ +name: Service DEV Build +run-name: Build and Deploy Marketplace-Service on branch ${{github.ref_name}} by ${{github.actor}} + +on: + push: + branches: [ "develop" ] + workflow_dispatch: + +jobs: + build: + name: Packge project and deploy to tomcat + runs-on: self-hosted + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven + - name: Update configuration + env: + APP_PROPERTIES_FILE: './marketplace-service/src/main/resources/application.properties' + GITHUB_TOKEN_FILE: './marketplace-service/src/main/resources/github.token' + MONGODB_HOST: ${{ secrets.MONGODB_HOST }} + MONGODB_DATABASE: ${{ secrets.MONGODB_DATABASE }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} + run: | + sed -i "s/^spring.data.mongodb.host=.*$/spring.data.mongodb.host=$MONGODB_HOST/" $APP_PROPERTIES_FILE + sed -i "s/^spring.data.mongodb.database=.*$/spring.data.mongodb.database=$MONGODB_DATABASE/" $APP_PROPERTIES_FILE + sed -i '1d;$d' $GITHUB_TOKEN_FILE && echo $GH_TOKEN > $GITHUB_TOKEN_FILE + - name: Build with Maven + run: mvn clean package -DskipTests --file ./marketplace-service/pom.xml + - name: Prepare deployment directory + run: mkdir -p deployment && cp target/*.war deployment/ + - name: Copy WAR to Tomcat server + run: sudo cp deployment/*.war /opt/tomcat/webapps/marketplace-service.war + - name: Restart Tomcat server + run: | + sudo systemctl stop tomcat + sudo systemctl start tomcat diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ui-ci-build.yml similarity index 66% rename from .github/workflows/ci-build.yml rename to .github/workflows/ui-ci-build.yml index 5a946e369..8137daf8b 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ui-ci-build.yml @@ -1,23 +1,42 @@ -name: CI Build +name: UI CI Build run-name: Build on branch ${{github.ref_name}} triggered by ${{github.actor}} on: push: + branches-ignore: + - develop + - master workflow_dispatch: jobs: + build: + name: Build + runs-on: self-hosted + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + - name: Install Dependencies + run: npm install + - name: Build project + run: npm run build + analysis: - name: Sonarqube analysis + name: Sonarqube + needs: build runs-on: self-hosted env: - SONAR_PROJECT_KEY: "AxonIvy-Market-Service" + SONAR_PROJECT_KEY: 'AxonIvy-Market-UI' SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 + - name: Execute Tests + run: npm run test - uses: sonarsource/sonarqube-scan-action@master env: SONAR_TOKEN: ${{ env.SONAR_TOKEN }} @@ -32,20 +51,7 @@ jobs: env: SONAR_TOKEN: ${{ env.SONAR_TOKEN }} SONAR_HOST_URL: ${{ env.SONAR_HOST_URL }} - with: - args: - -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} - build: - name: Executes Tests - runs-on: self-hosted - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Tests with Maven - run: mvn -B test --file pom.xml + - name: Clean up + run: | + rm -rf * diff --git a/.github/workflows/ui-dev-build.yml b/.github/workflows/ui-dev-build.yml new file mode 100644 index 000000000..506278838 --- /dev/null +++ b/.github/workflows/ui-dev-build.yml @@ -0,0 +1,28 @@ +name: UI Dev Build +run-name: Build and Deploy Marketplace-UI on branch ${{github.ref_name}} by ${{github.actor}} + +on: + push: + branches: [ "develop" ] + workflow_dispatch: + +jobs: + build: + name: Build and deploy new code to Deployment directory + runs-on: self-hosted + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: '18' + cache: 'npm' + - name: Install Dependencies + run: npm install + - name: Build Angular app + run: npm run build -- --configuration production --output-path=dist + - name: Execute Tests + run: npm run test + - name: Copy files to Deployment directory + if: success() + run: sudo cp -r dist/* /var/www/marketplace-ui From 7dea610aa769b32c732b99bc4793b612900a0299 Mon Sep 17 00:00:00 2001 From: Hoan Nguyen <83745591+nqhoan-axonivy@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:56:25 +0700 Subject: [PATCH 07/11] Add dockercompose action build (#33) --- .github/workflows/docker-compose-build.yml | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/docker-compose-build.yml diff --git a/.github/workflows/docker-compose-build.yml b/.github/workflows/docker-compose-build.yml new file mode 100644 index 000000000..a83544f42 --- /dev/null +++ b/.github/workflows/docker-compose-build.yml @@ -0,0 +1,32 @@ +name: Run Docker compose up + +on: + push: + branches: [ "develop" ] + workflow_dispatch: + +jobs: + build: + runs-on: self-hosted + + steps: + - name: Update configuration + env: + ENV_FILE: './marketplace-build/.env' + MONGODB_HOST: ${{ secrets.MONGODB_HOST }} + ROOT_USERNAME: ${{ secrets.MONGODB_ROOT_USERNAME }} + ROOT_PASSWORD: ${{ secrets.MONGODB_ROOT_PASSWORD }} + SERVICE_USERNAME: ${{ secrets.SERVICE_USERNAME }} + SERVICE_PASSWORD: ${{ secrets.SERVICE_PASSWORD }} + run: | + sed -i "s/^MONGODB_INITDB_ROOT_USERNAME=.*$/MONGODB_INITDB_ROOT_USERNAME=$ROOT_USERNAME/" $ENV_FILE + sed -i "s/^MONGODB_INITDB_ROOT_PASSWORD=.*$/MONGODB_INITDB_ROOT_PASSWORD=$ROOT_PASSWORD/" $ENV_FILE + sed -i "s/^SERVICE_MONGODB_HOST=.*$/SERVICE_MONGODB_HOST=$MONGODB_HOST/" $ENV_FILE + sed -i "s/^SERVICE_MONGODB_DATABASE=.*$/SERVICE_MONGODB_DATABASE=$MONGODB_DATABASE/" $ENV_FILE + sed -i "s/^SERVICE_MONGODB_USER=.*$/SERVICE_MONGODB_USER=$SERVICE_USERNAME/" $ENV_FILE + sed -i "s/^SERVICE_MONGODB_PASSWORD=.*$/SERVICE_MONGODB_PASSWORD=$SERVICE_PASSWORD/" $ENV_FILE + + - name: Build and push Docker images + working-directory: ./marketplace-build + run: | + docker-compose -f docker-compose.yml up -d From eb040823a071312204b8b9090362fc66ea08ca7b Mon Sep 17 00:00:00 2001 From: Hoan Nguyen <83745591+nqhoan-axonivy@users.noreply.github.com> Date: Tue, 16 Jul 2024 12:29:41 +0700 Subject: [PATCH 08/11] Add new workflow build files (#36) --- .github/workflows/docker-release.yml | 59 ++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/docker-release.yml diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml new file mode 100644 index 000000000..a8a5f0688 --- /dev/null +++ b/.github/workflows/docker-release.yml @@ -0,0 +1,59 @@ +name: Docker build and release + +on: + push: + branches: [ "develop" ] + workflow_dispatch: + +env: + UI-IMAGE_NAME: marketplace-ui + SERVICE-IMAGE_NAME: marketplace-ui + +jobs: + + build: + uses: ./docker-compose-build.yml + + publish: + runs-on: self-hosted + permissions: + packages: write + contents: read + + steps: + - name: Log in to registry + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin + # + - name: Push UI image + run: | + IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$UI-IMAGE_NAME + + # This changes all uppercase characters to lowercase. + IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') + # This strips the git ref prefix from the version. + VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') + # This strips the "v" prefix from the tag name. + [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') + # This uses the Docker `latest` tag convention. + [ "$VERSION" == "main" ] && VERSION=latest + echo IMAGE_ID=$IMAGE_ID + echo VERSION=$VERSION + docker tag $UI-IMAGE_NAME $IMAGE_ID:$VERSION + docker push $IMAGE_ID:$VERSION + + - name: Push Service image + run: | + IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$SERVICE-IMAGE_NAME + + # This changes all uppercase characters to lowercase. + IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') + # This strips the git ref prefix from the version. + VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') + # This strips the "v" prefix from the tag name. + [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') + # This uses the Docker `latest` tag convention. + [ "$VERSION" == "main" ] && VERSION=latest + echo IMAGE_ID=$IMAGE_ID + echo VERSION=$VERSION + docker tag $SERVICE-IMAGE_NAME $IMAGE_ID:$VERSION + docker push $IMAGE_ID:$VERSION \ No newline at end of file From f5a17f129c29d5f2f3ed4c09212ed57c65c61409 Mon Sep 17 00:00:00 2001 From: Hoan Nguyen <83745591+nqhoan-axonivy@users.noreply.github.com> Date: Tue, 16 Jul 2024 13:32:36 +0700 Subject: [PATCH 09/11] Update docker-release.yml (#37) --- .github/workflows/docker-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index a8a5f0688..1aa279ed9 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -12,7 +12,7 @@ env: jobs: build: - uses: ./docker-compose-build.yml + uses: ./.github/workflows/docker-compose-build.yml publish: runs-on: self-hosted @@ -56,4 +56,4 @@ jobs: echo IMAGE_ID=$IMAGE_ID echo VERSION=$VERSION docker tag $SERVICE-IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION \ No newline at end of file + docker push $IMAGE_ID:$VERSION From 0a42779501439ff1694822230e925ea8e5d8ff1d Mon Sep 17 00:00:00 2001 From: Hoan Nguyen <83745591+nqhoan-axonivy@users.noreply.github.com> Date: Thu, 18 Jul 2024 17:26:13 +0700 Subject: [PATCH 10/11] Update and rename docker-compose-build.yml to docker-build.yml (#40) --- .github/workflows/docker-build.yml | 20 ++++++++++++++ .github/workflows/docker-compose-build.yml | 32 ---------------------- 2 files changed, 20 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/docker-build.yml delete mode 100644 .github/workflows/docker-compose-build.yml diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml new file mode 100644 index 000000000..c54f4506b --- /dev/null +++ b/.github/workflows/docker-build.yml @@ -0,0 +1,20 @@ +name: Docker build + +on: + push: + branches: [ "develop" ] + workflow_dispatch: + workflow_call: + +jobs: + build: + runs-on: self-hosted + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: '17' + distribution: 'temurin' + cache: maven diff --git a/.github/workflows/docker-compose-build.yml b/.github/workflows/docker-compose-build.yml deleted file mode 100644 index a83544f42..000000000 --- a/.github/workflows/docker-compose-build.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Run Docker compose up - -on: - push: - branches: [ "develop" ] - workflow_dispatch: - -jobs: - build: - runs-on: self-hosted - - steps: - - name: Update configuration - env: - ENV_FILE: './marketplace-build/.env' - MONGODB_HOST: ${{ secrets.MONGODB_HOST }} - ROOT_USERNAME: ${{ secrets.MONGODB_ROOT_USERNAME }} - ROOT_PASSWORD: ${{ secrets.MONGODB_ROOT_PASSWORD }} - SERVICE_USERNAME: ${{ secrets.SERVICE_USERNAME }} - SERVICE_PASSWORD: ${{ secrets.SERVICE_PASSWORD }} - run: | - sed -i "s/^MONGODB_INITDB_ROOT_USERNAME=.*$/MONGODB_INITDB_ROOT_USERNAME=$ROOT_USERNAME/" $ENV_FILE - sed -i "s/^MONGODB_INITDB_ROOT_PASSWORD=.*$/MONGODB_INITDB_ROOT_PASSWORD=$ROOT_PASSWORD/" $ENV_FILE - sed -i "s/^SERVICE_MONGODB_HOST=.*$/SERVICE_MONGODB_HOST=$MONGODB_HOST/" $ENV_FILE - sed -i "s/^SERVICE_MONGODB_DATABASE=.*$/SERVICE_MONGODB_DATABASE=$MONGODB_DATABASE/" $ENV_FILE - sed -i "s/^SERVICE_MONGODB_USER=.*$/SERVICE_MONGODB_USER=$SERVICE_USERNAME/" $ENV_FILE - sed -i "s/^SERVICE_MONGODB_PASSWORD=.*$/SERVICE_MONGODB_PASSWORD=$SERVICE_PASSWORD/" $ENV_FILE - - - name: Build and push Docker images - working-directory: ./marketplace-build - run: | - docker-compose -f docker-compose.yml up -d From cd38ce9ac50290be17e4570c680d0eecb67d370a Mon Sep 17 00:00:00 2001 From: Hoan Nguyen <83745591+nqhoan-axonivy@users.noreply.github.com> Date: Mon, 22 Jul 2024 13:38:05 +0700 Subject: [PATCH 11/11] MARP-224 Clean up actions workflow (#47) --- .github/workflows/docker-build.yml | 34 ++++++++++++--- .github/workflows/docker-release.yml | 58 ++++++++++--------------- .github/workflows/service-ci-build.yml | 2 + .github/workflows/service-dev-build.yml | 42 ------------------ .github/workflows/ui-ci-build.yml | 24 +++++++--- .github/workflows/ui-dev-build.yml | 28 ------------ 6 files changed, 71 insertions(+), 117 deletions(-) delete mode 100644 .github/workflows/service-dev-build.yml delete mode 100644 .github/workflows/ui-dev-build.yml diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index c54f4506b..45e974149 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,4 +1,4 @@ -name: Docker build +name: Docker Build on: push: @@ -12,9 +12,29 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven + - name: Update environment variables for .env + env: + ENV_FILE: './marketplace-build/.env' + MONGODB_HOST: ${{ secrets.MONGODB_HOST }} + ROOT_USERNAME: ${{ secrets.MONGODB_ROOT_USERNAME }} + ROOT_PASSWORD: ${{ secrets.MONGODB_ROOT_PASSWORD }} + SERVICE_USERNAME: ${{ secrets.SERVICE_USERNAME }} + SERVICE_PASSWORD: ${{ secrets.SERVICE_PASSWORD }} + MONGODB_DATABASE: ${{ secrets.MONGODB_DATABASE }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} + MARKETPLACE_INSTALLATION_URL: ${{ secrets.MARKETPLACE_INSTALLATION_URL }} + run: | + sed -i "s/^MONGODB_INITDB_ROOT_USERNAME=.*$/MONGODB_INITDB_ROOT_USERNAME=$ROOT_USERNAME/" $ENV_FILE + sed -i "s/^MONGODB_INITDB_ROOT_PASSWORD=.*$/MONGODB_INITDB_ROOT_PASSWORD=$ROOT_PASSWORD/" $ENV_FILE + sed -i "s/^SERVICE_MONGODB_HOST=.*$/SERVICE_MONGODB_HOST=$MONGODB_HOST/" $ENV_FILE + sed -i "s/^SERVICE_MONGODB_DATABASE=.*$/SERVICE_MONGODB_DATABASE=$MONGODB_DATABASE/" $ENV_FILE + sed -i "s/^SERVICE_MONGODB_USER=.*$/SERVICE_MONGODB_USER=$SERVICE_USERNAME/" $ENV_FILE + sed -i "s/^SERVICE_MONGODB_PASSWORD=.*$/SERVICE_MONGODB_PASSWORD=$SERVICE_PASSWORD/" $ENV_FILE + sed -i "s/^MARKET_GITHUB_TOKEN=.*$/MARKET_GITHUB_TOKEN=$GH_TOKEN/" $ENV_FILE + sed -i "s/^MARKETPLACE_INSTALLATION_URL=.*$/MARKETPLACE_INSTALLATION_URL=$MARKETPLACE_INSTALLATION_URL/" $ENV_FILE + + - name: Refresh Docker images + working-directory: ./marketplace-build + run: | + docker compose down + docker compose up -d diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 1aa279ed9..80ed0fd37 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -1,20 +1,26 @@ -name: Docker build and release +name: Docker Release on: push: - branches: [ "develop" ] + branches: [ "master" ] workflow_dispatch: + inputs: + image_version: + description: 'Marketplace Docker image version' + required: true + default: 'latest' env: - UI-IMAGE_NAME: marketplace-ui - SERVICE-IMAGE_NAME: marketplace-ui + UI_IMAGE_NAME: marketplace-ui + SERVICE_IMAGE_NAME: marketplace-service jobs: build: - uses: ./.github/workflows/docker-compose-build.yml + uses: ./.github/workflows/docker-build.yml - publish: + release: + needs: build runs-on: self-hosted permissions: packages: write @@ -23,37 +29,21 @@ jobs: steps: - name: Log in to registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin - # - - name: Push UI image + - name: Refine release version run: | - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$UI-IMAGE_NAME - - # This changes all uppercase characters to lowercase. - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') # This strips the git ref prefix from the version. - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # This strips the "v" prefix from the tag name. - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') + VERSION=${{ github.event.inputs.image_version }} # This uses the Docker `latest` tag convention. [ "$VERSION" == "main" ] && VERSION=latest - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $UI-IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - - - name: Push Service image + echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: Release Marketplace UI image run: | - IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$SERVICE-IMAGE_NAME + UI_IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$UI_IMAGE_NAME + docker tag $UI_IMAGE_NAME $UI_IMAGE_ID:$VERSION + docker push $UI_IMAGE_ID:$VERSION - # This changes all uppercase characters to lowercase. - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - # This strips the git ref prefix from the version. - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # This strips the "v" prefix from the tag name. - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # This uses the Docker `latest` tag convention. - [ "$VERSION" == "main" ] && VERSION=latest - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE-IMAGE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION + - name: Release Marketplace Service image + run: | + SERVICE_IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$SERVICE_IMAGE_NAME + docker tag $SERVICE_IMAGE_NAME $SERVICE_IMAGE_ID:$VERSION + docker push $SERVICE_IMAGE_ID:$VERSION \ No newline at end of file diff --git a/.github/workflows/service-ci-build.yml b/.github/workflows/service-ci-build.yml index e384445d2..ef121541e 100644 --- a/.github/workflows/service-ci-build.yml +++ b/.github/workflows/service-ci-build.yml @@ -3,6 +3,8 @@ run-name: Build Service on branch ${{github.ref_name}} triggered by ${{github.ac on: push: + paths: + - 'marketplace-service/**' workflow_dispatch: jobs: diff --git a/.github/workflows/service-dev-build.yml b/.github/workflows/service-dev-build.yml deleted file mode 100644 index 716ebe4b5..000000000 --- a/.github/workflows/service-dev-build.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Service DEV Build -run-name: Build and Deploy Marketplace-Service on branch ${{github.ref_name}} by ${{github.actor}} - -on: - push: - branches: [ "develop" ] - workflow_dispatch: - -jobs: - build: - name: Packge project and deploy to tomcat - runs-on: self-hosted - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - name: Update configuration - env: - APP_PROPERTIES_FILE: './marketplace-service/src/main/resources/application.properties' - GITHUB_TOKEN_FILE: './marketplace-service/src/main/resources/github.token' - MONGODB_HOST: ${{ secrets.MONGODB_HOST }} - MONGODB_DATABASE: ${{ secrets.MONGODB_DATABASE }} - GH_TOKEN: ${{ secrets.GH_TOKEN }} - run: | - sed -i "s/^spring.data.mongodb.host=.*$/spring.data.mongodb.host=$MONGODB_HOST/" $APP_PROPERTIES_FILE - sed -i "s/^spring.data.mongodb.database=.*$/spring.data.mongodb.database=$MONGODB_DATABASE/" $APP_PROPERTIES_FILE - sed -i '1d;$d' $GITHUB_TOKEN_FILE && echo $GH_TOKEN > $GITHUB_TOKEN_FILE - - name: Build with Maven - run: mvn clean package -DskipTests --file ./marketplace-service/pom.xml - - name: Prepare deployment directory - run: mkdir -p deployment && cp target/*.war deployment/ - - name: Copy WAR to Tomcat server - run: sudo cp deployment/*.war /opt/tomcat/webapps/marketplace-service.war - - name: Restart Tomcat server - run: | - sudo systemctl stop tomcat - sudo systemctl start tomcat diff --git a/.github/workflows/ui-ci-build.yml b/.github/workflows/ui-ci-build.yml index 8137daf8b..d792f34a8 100644 --- a/.github/workflows/ui-ci-build.yml +++ b/.github/workflows/ui-ci-build.yml @@ -3,9 +3,8 @@ run-name: Build on branch ${{github.ref_name}} triggered by ${{github.actor}} on: push: - branches-ignore: - - develop - - master + paths: + - 'marketplace-ui/**' workflow_dispatch: jobs: @@ -20,10 +19,15 @@ jobs: with: node-version: '20' cache: 'npm' + cache-dependency-path: ./marketplace-ui/package-lock.json - name: Install Dependencies - run: npm install + run: | + cd ./marketplace-ui + npm install - name: Build project - run: npm run build + run: | + cd ./marketplace-ui + npm run build analysis: name: Sonarqube @@ -36,22 +40,30 @@ jobs: steps: - name: Execute Tests - run: npm run test + run: | + cd ./marketplace-ui + npm run test - uses: sonarsource/sonarqube-scan-action@master env: SONAR_TOKEN: ${{ env.SONAR_TOKEN }} SONAR_HOST_URL: ${{ env.SONAR_HOST_URL }} with: + projectBaseDir: ./marketplace-ui args: -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} + -Dsonar.javascript.lcov.reportPaths=${{ github.workspace }}/marketplace-ui/coverage/lcov.info + - name: SonarQube Quality Gate check id: sonarqube-quality-gate-check uses: sonarsource/sonarqube-quality-gate-action@master + with: + scanMetadataReportFile: ${{ github.workspace }}/marketplace-ui/.scannerwork/report-task.txt timeout-minutes: 5 env: SONAR_TOKEN: ${{ env.SONAR_TOKEN }} SONAR_HOST_URL: ${{ env.SONAR_HOST_URL }} - name: Clean up + working-directory: marketplace-ui run: | rm -rf * diff --git a/.github/workflows/ui-dev-build.yml b/.github/workflows/ui-dev-build.yml deleted file mode 100644 index 506278838..000000000 --- a/.github/workflows/ui-dev-build.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: UI Dev Build -run-name: Build and Deploy Marketplace-UI on branch ${{github.ref_name}} by ${{github.actor}} - -on: - push: - branches: [ "develop" ] - workflow_dispatch: - -jobs: - build: - name: Build and deploy new code to Deployment directory - runs-on: self-hosted - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '18' - cache: 'npm' - - name: Install Dependencies - run: npm install - - name: Build Angular app - run: npm run build -- --configuration production --output-path=dist - - name: Execute Tests - run: npm run test - - name: Copy files to Deployment directory - if: success() - run: sudo cp -r dist/* /var/www/marketplace-ui