From f2037f3e7789de6515a8be530633963d4191734f Mon Sep 17 00:00:00 2001 From: Andrei Kolchanov Date: Mon, 5 Sep 2022 12:26:53 +0500 Subject: [PATCH] fix: Fix github workflows --- .github/workflows/{main.yml => module-ci.yml} | 33 +++++++++++++++---- ...e-hotfix.yml => module-release-hotfix.yml} | 12 +++---- .github/workflows/publish-nugets.yml | 8 ++--- .github/workflows/release.yml | 6 ++-- 4 files changed, 40 insertions(+), 19 deletions(-) rename .github/workflows/{main.yml => module-ci.yml} (91%) rename .github/workflows/{release-hotfix.yml => module-release-hotfix.yml} (95%) diff --git a/.github/workflows/main.yml b/.github/workflows/module-ci.yml similarity index 91% rename from .github/workflows/main.yml rename to .github/workflows/module-ci.yml index 87018479..f0007438 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/module-ci.yml @@ -1,4 +1,4 @@ -# v1.1.13 +# v3.200.16 name: Module CI on: @@ -11,6 +11,7 @@ on: - 'README.md' - 'LICENSE' - '**/argoDeploy.json' + - '**/cloudDeploy.json' - samples/** branches: [master, dev] @@ -23,12 +24,15 @@ on: - 'README.md' - 'LICENSE' - '**/argoDeploy.json' + - '**/cloudDeploy.json' - samples/** jobs: ci: - if: ${{ github.actor != 'dependabot[bot]' && (github.event.pull_request.head.repo.full_name == github.repository || github.event.pull_request.head.repo.full_name == '') }} # Check that PR not from forked repo and not from Dependabot - runs-on: ubuntu-latest + if: ${{ github.actor != 'dependabot[bot]' && + (github.event.pull_request.head.repo.full_name == github.repository || + github.event.pull_request.head.repo.full_name == '') }} # Check that PR not from forked repo and not from Dependabot + runs-on: ubuntu-20.04 env: CLOUD_INSTANCE_BASE_URL: ${{secrets.CLOUD_INSTANCE_BASE_URL}} CLIENT_ID: ${{secrets.CLIENT_ID}} @@ -44,6 +48,7 @@ jobs: outputs: artifactUrl: ${{ steps.artifactUrl.outputs.download_url }} jira-keys: ${{ steps.jira_keys.outputs.jira-keys }} + version: ${{ steps.artifact_ver.outputs.shortVersion }} moduleId: ${{ steps.artifact_ver.outputs.moduleId }} steps: @@ -53,7 +58,7 @@ jobs: run: | echo "RELEASE_STATUS=true" >> $GITHUB_ENV - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 @@ -207,7 +212,7 @@ jobs: deploy: if: ${{ (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master') && github.event_name == 'push' }} needs: ci - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 env: GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} CLOUD_INSTANCE_BASE_URL: ${{secrets.CLOUD_INSTANCE_BASE_URL}} @@ -308,7 +313,7 @@ jobs: environment-type: ${{ steps.deployConfig.outputs.environmentType }} module-katalon-tests: - if: ${{ github.event_name == 'pull_request' }} + if: ${{ (github.ref == 'refs/heads/dev') && github.event_name == 'push' }} needs: 'ci' uses: VirtoCommerce/.github/.github/workflows/e2e.yml@main with: @@ -322,3 +327,19 @@ jobs: secrets: envPAT: ${{ secrets.REPO_TOKEN }} katalonApiKey: ${{ secrets.KATALON_API_KEY }} + + deploy-cloud-demo: + if: ${{ (github.ref == 'refs/heads/master') && github.event_name == 'push' }} + needs: ci + uses: VirtoCommerce/.github/.github/workflows/deploy-cloud.yml@v3.200.16 + with: + releaseSource: module + releaseType: GithubReleases + moduleId: ${{ needs.ci.outputs.moduleId }} + moduleVer: ${{ needs.ci.outputs.version }} + argoServer: 'argo.virtocommerce.cloud' + matrix: '{"include":[{"envName": "prod", "confPath": "cloudDeploy.json"}]}' + secrets: + envPAT: ${{ secrets.REPO_TOKEN }} + argoLogin: ${{ secrets.ARGOCD_LOGIN }} + argoPassword: ${{ secrets.ARGOCD_PASSWORD }} diff --git a/.github/workflows/release-hotfix.yml b/.github/workflows/module-release-hotfix.yml similarity index 95% rename from .github/workflows/release-hotfix.yml rename to .github/workflows/module-release-hotfix.yml index 00476239..06d86827 100644 --- a/.github/workflows/release-hotfix.yml +++ b/.github/workflows/module-release-hotfix.yml @@ -1,4 +1,4 @@ -# v3.200.12 +# v3.200.16 name: Release hotfix on: @@ -12,12 +12,12 @@ on: jobs: test: - uses: VirtoCommerce/.github/.github/workflows/test-and-sonar.yml@v3.200.12 + uses: VirtoCommerce/.github/.github/workflows/test-and-sonar.yml@v3.200.16 secrets: sonarToken: ${{ secrets.SONAR_TOKEN }} build: - uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.200.12 + uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.200.16 with: uploadPackage: 'true' uploadDocker: 'false' @@ -27,7 +27,7 @@ jobs: envPAT: ${{ secrets.REPO_TOKEN }} get-metadata: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 outputs: changelog: ${{ steps.changelog.outputs.changelog }} steps: @@ -43,7 +43,7 @@ jobs: publish-github-release: needs: [build, test, get-metadata] - uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.200.12 + uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.200.16 with: fullKey: ${{ needs.build.outputs.packageFullKey }} changeLog: '${{ needs.get-metadata.outputs.changeLog }}' @@ -57,7 +57,7 @@ jobs: needs: [publish-github-release] if: ${{ github.event.inputs.incrementPatch == 'true' }} - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/publish-nugets.yml b/.github/workflows/publish-nugets.yml index 95c70758..393945e7 100644 --- a/.github/workflows/publish-nugets.yml +++ b/.github/workflows/publish-nugets.yml @@ -1,4 +1,4 @@ -# v3.200.13 +# v3.200.16 name: Publish nuget on: @@ -12,12 +12,12 @@ on: jobs: test: - uses: VirtoCommerce/.github/.github/workflows/test-and-sonar.yml@v3.200.13 + uses: VirtoCommerce/.github/.github/workflows/test-and-sonar.yml@v3.200.16 secrets: sonarToken: ${{ secrets.SONAR_TOKEN }} build: - uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.200.13 + uses: VirtoCommerce/.github/.github/workflows/build.yml@v3.200.16 with: uploadPackage: 'true' uploadDocker: 'false' @@ -28,7 +28,7 @@ jobs: publish-nuget: needs: [build, test] - uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.200.13 + uses: VirtoCommerce/.github/.github/workflows/publish-github.yml@v3.200.16 with: fullKey: ${{ needs.build.outputs.packageFullKey }} forceGithub: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 595d9fa0..fc645647 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -# v1.0.0 +# v3.200.16 name: Release on: @@ -6,6 +6,6 @@ on: jobs: release: - uses: VirtoCommerce/.github/.github/workflows/release.yml@v3.200.12 + uses: VirtoCommerce/.github/.github/workflows/release.yml@v3.200.16 secrets: - envPAT: ${{ secrets.REPO_TOKEN }} + envPAT: ${{ secrets.REPO_TOKEN }} \ No newline at end of file