From 68b49d98851649d9de291f11e7cf15b8de19405d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 12:04:31 +0100 Subject: [PATCH 01/18] Initial CI/CD workflow for deploying frontend to staging --- .../workflows/staging-deploy-frontend.yaml | 53 +++++++++++++++++++ scripts/cli | 2 +- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/staging-deploy-frontend.yaml diff --git a/.github/workflows/staging-deploy-frontend.yaml b/.github/workflows/staging-deploy-frontend.yaml new file mode 100644 index 0000000000..2686fcbcef --- /dev/null +++ b/.github/workflows/staging-deploy-frontend.yaml @@ -0,0 +1,53 @@ +name: Staging Deploy Frontend + +on: + push: + branches: + - 'staging/**' + - feature/ci-cd-staging-C-196 + paths: + - 'frontend/**' + +jobs: + build-and-push: + runs-on: ubuntu-latest + defaults: + run: + shell: bash + working-directory: ./frontend + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - name: Login to docker repository + run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin + + - name: Get short commit sha hash + uses: benjlevesque/short-sha@v2.1 + id: short-sha + with: + length: 6 + + - name: Calculate docker image version + run: echo "IMAGE_VERSION=${{ github.ref_name }}.${SHORT_SHA}.${{ github.run_attempt }}" >> $GITHUB_ENV + + - name: Build and push docker image + working-directory: ./scripts + env: + SHORT_SHA: ${{ steps.short-sha.outputs.sha }} + run: ./cli build-and-push frontend ${{ env.IMAGE_VERSION }} + + - name: Set docker image version + run: echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}" >> $GITHUB_OUTPUT + + deploy: + needs: build-and-push + runs-on: ubuntu-latest + + steps: + - name: Initialize staging kubernetes kubectl context + run: aws eks --region ${{ secrets.AWS_REGION }} update-kubeconfig --name ${{ secrets.STAGING_CLUSTER_NAME }} + + - name: Deploy image + run: kubectl set image deployments/frontend-dpl frontend=crowddotdev/frontend:${{ needs.build-and-push.outputs.IMAGE_VERSION }} diff --git a/scripts/cli b/scripts/cli index affe22ccf0..76065d1b6f 100755 --- a/scripts/cli +++ b/scripts/cli @@ -88,7 +88,7 @@ function create_migration() { } function build_and_publish() { - VERSION="$3" + VERSION="$2" if [[ -z "${VERSION}" ]]; then COMMIT_HASH=`git rev-parse --short HEAD` From ec4a6d3cd0830f2b5d726efae5e30a45ddc91a5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 12:05:56 +0100 Subject: [PATCH 02/18] test frontend deploy --- frontend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index 8d753a6d98..943456eb86 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.5.0", + "version": "0.5.1", "private": true, "scripts": { "lint": "vue-cli-service lint", From 48f616698896f48ccb61b94e382d0b2b532b0ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 12:09:07 +0100 Subject: [PATCH 03/18] bugfix --- .github/workflows/staging-deploy-frontend.yaml | 2 +- frontend/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/staging-deploy-frontend.yaml b/.github/workflows/staging-deploy-frontend.yaml index 2686fcbcef..0db4bb541e 100644 --- a/.github/workflows/staging-deploy-frontend.yaml +++ b/.github/workflows/staging-deploy-frontend.yaml @@ -30,7 +30,7 @@ jobs: length: 6 - name: Calculate docker image version - run: echo "IMAGE_VERSION=${{ github.ref_name }}.${SHORT_SHA}.${{ github.run_attempt }}" >> $GITHUB_ENV + run: echo "IMAGE_VERSION=${{ steps.short-sha.outputs.sha }}.${{ github.run_attempt }}" >> $GITHUB_ENV - name: Build and push docker image working-directory: ./scripts diff --git a/frontend/package.json b/frontend/package.json index 943456eb86..8d753a6d98 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.5.1", + "version": "0.5.0", "private": true, "scripts": { "lint": "vue-cli-service lint", From 7bc1a3b66e7c521f5a11ddc4251515ecfa80b350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 12:31:52 +0100 Subject: [PATCH 04/18] bugfix --- .github/workflows/staging-deploy-frontend.yaml | 12 ++++++++++-- frontend/package.json | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/staging-deploy-frontend.yaml b/.github/workflows/staging-deploy-frontend.yaml index 0db4bb541e..9b6e14644c 100644 --- a/.github/workflows/staging-deploy-frontend.yaml +++ b/.github/workflows/staging-deploy-frontend.yaml @@ -34,10 +34,12 @@ jobs: - name: Build and push docker image working-directory: ./scripts - env: - SHORT_SHA: ${{ steps.short-sha.outputs.sha }} run: ./cli build-and-push frontend ${{ env.IMAGE_VERSION }} + - name: Build and push dev docker image + working-directory: ./scripts + run: ./cli build-and-push frontend-dev ${{ env.IMAGE_VERSION }} + - name: Set docker image version run: echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}" >> $GITHUB_OUTPUT @@ -48,6 +50,12 @@ jobs: steps: - name: Initialize staging kubernetes kubectl context run: aws eks --region ${{ secrets.AWS_REGION }} update-kubeconfig --name ${{ secrets.STAGING_CLUSTER_NAME }} + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - name: Deploy image run: kubectl set image deployments/frontend-dpl frontend=crowddotdev/frontend:${{ needs.build-and-push.outputs.IMAGE_VERSION }} + + - name: Deploy dev image + run: kubectl set image deployments/frontend-dev-dpl frontend-dev=crowddotdev/frontend-dev:${{ needs.build-and-push.outputs.IMAGE_VERSION }} diff --git a/frontend/package.json b/frontend/package.json index 8d753a6d98..943456eb86 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.5.0", + "version": "0.5.1", "private": true, "scripts": { "lint": "vue-cli-service lint", From df89f480ef934d91026b83a2c8a342194c60eccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 13:12:13 +0100 Subject: [PATCH 05/18] composite action test --- .github/PULL_REQUEST_TEMPLATE.md | 28 ++++---- .github/actions/build-docker-image.yaml | 35 ++++++++++ .github/actions/deploy-docker-image.yaml | 28 ++++++++ .../workflows/staging-deploy-frontend.yaml | 67 ++++++++++--------- frontend/package.json | 2 +- 5 files changed, 116 insertions(+), 44 deletions(-) create mode 100644 .github/actions/build-docker-image.yaml create mode 100644 .github/actions/deploy-docker-image.yaml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 76ad39463e..e26600ec6b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,18 +1,20 @@ # Changes proposed ✍️ -- ... -- ### Screenshots (front-end changes only) - - ... - + +- ... +- ### Screenshots (front-end changes only) + - ... + ## Checklist ✅ + - [ ] Label appropriately with `type:feature 🚀`, `type:enhancement ✨`, `type:bug 🐞`, or `type:documentation 📜`. -- [ ] Tests are passing. +- [ ] Tests are passing. - [ ] New backend functionality has been unit-tested. -- [ ] Environment variables have been updated - - [ ] Front-end: `frontend/.env.dist` - - [ ] Backend: `backend/.env.dist`, `backend/.env.dist.staging`, `backend/.env.dist.staging`. +- [ ] Environment variables have been updated: + - [ ] Local frontend configuration: `frontend/.env.dist.local`, `frontend/.env.dist.composed`. + - [ ] Local backend: `backend/.env.dist.local`, `backend/.env.dist.composed`. - [ ] [Configuration docs](https://docs.crowd.dev/docs/configuration) have been updated. - - [ ] Team members only: update environment variables in Password manager and update the team -- [ ] API documentation has been updated (if necessary) (see [docs on API documentation](https://docs.crowd.dev/docs/updating-api-documentation)). -- [ ] [Quality standards](https://github.com/CrowdDotDev/crowd-github-test-public/blob/main/CONTRIBUTING.md#quality-standards) are met. -- [ ] All changes have been tested in a staging site. -- [ ] All changes are working locally running crowd.dev's Docker local environment. \ No newline at end of file + - [ ] Team members only: update environment variables in override, staging and production env. files and trigger update config script. +- [ ] API documentation has been updated (if necessary) (see [docs on API documentation](https://docs.crowd.dev/docs/updating-api-documentation)). +- [ ] [Quality standards](https://github.com/CrowdDotDev/crowd-github-test-public/blob/main/CONTRIBUTING.md#quality-standards) are met. +- [ ] All changes have been tested in a staging site. +- [ ] All changes are working locally running crowd.dev's Docker local environment. diff --git a/.github/actions/build-docker-image.yaml b/.github/actions/build-docker-image.yaml new file mode 100644 index 0000000000..e35504b65f --- /dev/null +++ b/.github/actions/build-docker-image.yaml @@ -0,0 +1,35 @@ +name: Docker image version generator +description: Generates a docker image version tag to use when building and pushing images + +inputs: + image: + description: Which docker image to build + required: true + +outputs: + image: + description: Image that was built + value: crowddotdev/${{ inputs.image }}.${{ steps.version-generator.outputs.IMAGE_VERSION }} + +runs: + using: composite + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - name: Get short commit sha hash + uses: benjlevesque/short-sha@v2.1 + id: short-sha + with: + length: 6 + + - run: echo "IMAGE_VERSION=${{ steps.short-sha.outputs.sha }}.${{ github.run_attempt }}" >> $GITHUB_OUTPUT + id: version-generator + shell: bash + + - name: Login to docker repository + run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin + + - name: Build and push docker image + working-directory: ./scripts + run: ./cli build-and-push frontend ${{ steps.image-version.outputs.image-version }} diff --git a/.github/actions/deploy-docker-image.yaml b/.github/actions/deploy-docker-image.yaml new file mode 100644 index 0000000000..4560f941d3 --- /dev/null +++ b/.github/actions/deploy-docker-image.yaml @@ -0,0 +1,28 @@ +name: Docker image version generator +description: Generates a docker image version tag to use when building and pushing images + +inputs: + service: + description: Which cloud service to deploy + required: true + + image: + description: Which docker image to deploy (full docker registry name with tag) + required: true + + cluster: + description: To which cloud cluster to deploy + required: true + default: ${{ secrets.STAGING_CLUSTER_NAME }} + +runs: + using: composite + steps: + - name: Initialize staging kubernetes kubectl context + run: aws eks --region ${{ secrets.AWS_REGION }} update-kubeconfig --name ${{ inputs.cluster }} + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + + - name: Deploy image + run: kubectl set image deployments/${{ inputs.service }}-dpl ${{ inputs.service }}=${{ inputs.image }} diff --git a/.github/workflows/staging-deploy-frontend.yaml b/.github/workflows/staging-deploy-frontend.yaml index 9b6e14644c..385afbd373 100644 --- a/.github/workflows/staging-deploy-frontend.yaml +++ b/.github/workflows/staging-deploy-frontend.yaml @@ -14,48 +14,55 @@ jobs: defaults: run: shell: bash - working-directory: ./frontend steps: - - name: Check out repository code - uses: actions/checkout@v2 - - - name: Login to docker repository - run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin - - - name: Get short commit sha hash - uses: benjlevesque/short-sha@v2.1 - id: short-sha + - uses: ./.github/actions/build-docker-image + id: image-builder with: - length: 6 + image: frontend - - name: Calculate docker image version - run: echo "IMAGE_VERSION=${{ steps.short-sha.outputs.sha }}.${{ github.run_attempt }}" >> $GITHUB_ENV + - name: Set docker image output + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT - - name: Build and push docker image - working-directory: ./scripts - run: ./cli build-and-push frontend ${{ env.IMAGE_VERSION }} + build-and-push-dev: + runs-on: ubuntu-latest + defaults: + run: + shell: bash - - name: Build and push dev docker image - working-directory: ./scripts - run: ./cli build-and-push frontend-dev ${{ env.IMAGE_VERSION }} + steps: + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: frontend-dev - - name: Set docker image version - run: echo "IMAGE_VERSION=${{ env.IMAGE_VERSION }}" >> $GITHUB_OUTPUT + - name: Set docker image output + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT deploy: needs: build-and-push runs-on: ubuntu-latest + defaults: + run: + shell: bash steps: - - name: Initialize staging kubernetes kubectl context - run: aws eks --region ${{ secrets.AWS_REGION }} update-kubeconfig --name ${{ secrets.STAGING_CLUSTER_NAME }} - env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + - uses: ./.github/actions/deploy-docker-image + with: + service: frontend + image: ${{ needs.build-and-push.outputs.IMAGE }} + cluster: ${{ secrets.STAGING_CLUSTER_NAME }} - - name: Deploy image - run: kubectl set image deployments/frontend-dpl frontend=crowddotdev/frontend:${{ needs.build-and-push.outputs.IMAGE_VERSION }} + deploy-dev: + needs: build-and-push-dev + runs-on: ubuntu-latest + defaults: + run: + shell: bash - - name: Deploy dev image - run: kubectl set image deployments/frontend-dev-dpl frontend-dev=crowddotdev/frontend-dev:${{ needs.build-and-push.outputs.IMAGE_VERSION }} + steps: + - uses: ./.github/actions/deploy-docker-image + with: + service: frontend-dev + image: ${{ needs.build-and-push-dev.outputs.IMAGE }} + cluster: ${{ secrets.STAGING_CLUSTER_NAME }} diff --git a/frontend/package.json b/frontend/package.json index 943456eb86..8d753a6d98 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.5.1", + "version": "0.5.0", "private": true, "scripts": { "lint": "vue-cli-service lint", From 620cc0b03b817cb1999c035054c3332ef2691638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 13:17:47 +0100 Subject: [PATCH 06/18] bugfix --- .github/workflows/staging-deploy-frontend.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/staging-deploy-frontend.yaml b/.github/workflows/staging-deploy-frontend.yaml index 385afbd373..cd6193a9de 100644 --- a/.github/workflows/staging-deploy-frontend.yaml +++ b/.github/workflows/staging-deploy-frontend.yaml @@ -16,7 +16,7 @@ jobs: shell: bash steps: - - uses: ./.github/actions/build-docker-image + - uses: ./.github/actions/build-docker-image.yaml id: image-builder with: image: frontend @@ -31,7 +31,7 @@ jobs: shell: bash steps: - - uses: ./.github/actions/build-docker-image + - uses: ./.github/actions/build-docker-image.yaml id: image-builder with: image: frontend-dev @@ -47,7 +47,7 @@ jobs: shell: bash steps: - - uses: ./.github/actions/deploy-docker-image + - uses: ./.github/actions/deploy-docker-image.yaml with: service: frontend image: ${{ needs.build-and-push.outputs.IMAGE }} @@ -61,7 +61,7 @@ jobs: shell: bash steps: - - uses: ./.github/actions/deploy-docker-image + - uses: ./.github/actions/deploy-docker-image.yaml with: service: frontend-dev image: ${{ needs.build-and-push-dev.outputs.IMAGE }} From 6499ba361bf8f2f758e129e61b61919a44318966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 13:17:58 +0100 Subject: [PATCH 07/18] trigger --- frontend/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/package.json b/frontend/package.json index 8d753a6d98..943456eb86 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.5.0", + "version": "0.5.1", "private": true, "scripts": { "lint": "vue-cli-service lint", From 4a7f0c44cea8fdc05846cc0fa5f7a17c284c9504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 14:48:01 +0100 Subject: [PATCH 08/18] fixes --- .../action.yaml} | 4 ++-- .../action.yaml} | 4 ++-- .github/workflows/staging-deploy-frontend.yaml | 8 ++++---- frontend/package.json | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) rename .github/actions/{build-docker-image.yaml => build-docker-image/action.yaml} (88%) rename .github/actions/{deploy-docker-image.yaml => deploy-service/action.yaml} (86%) diff --git a/.github/actions/build-docker-image.yaml b/.github/actions/build-docker-image/action.yaml similarity index 88% rename from .github/actions/build-docker-image.yaml rename to .github/actions/build-docker-image/action.yaml index e35504b65f..2cdabcaef4 100644 --- a/.github/actions/build-docker-image.yaml +++ b/.github/actions/build-docker-image/action.yaml @@ -1,5 +1,5 @@ -name: Docker image version generator -description: Generates a docker image version tag to use when building and pushing images +name: Crowd docker image builder +description: Builds and pushes crowd docker images inputs: image: diff --git a/.github/actions/deploy-docker-image.yaml b/.github/actions/deploy-service/action.yaml similarity index 86% rename from .github/actions/deploy-docker-image.yaml rename to .github/actions/deploy-service/action.yaml index 4560f941d3..669c7cb919 100644 --- a/.github/actions/deploy-docker-image.yaml +++ b/.github/actions/deploy-service/action.yaml @@ -1,5 +1,5 @@ -name: Docker image version generator -description: Generates a docker image version tag to use when building and pushing images +name: Crowd service deployer +description: Deploys to crowd.dev kubernetes cloud environments inputs: service: diff --git a/.github/workflows/staging-deploy-frontend.yaml b/.github/workflows/staging-deploy-frontend.yaml index cd6193a9de..ba4f420fdb 100644 --- a/.github/workflows/staging-deploy-frontend.yaml +++ b/.github/workflows/staging-deploy-frontend.yaml @@ -16,7 +16,7 @@ jobs: shell: bash steps: - - uses: ./.github/actions/build-docker-image.yaml + - uses: ./.github/actions/build-docker-image id: image-builder with: image: frontend @@ -31,7 +31,7 @@ jobs: shell: bash steps: - - uses: ./.github/actions/build-docker-image.yaml + - uses: ./.github/actions/build-docker-image id: image-builder with: image: frontend-dev @@ -47,7 +47,7 @@ jobs: shell: bash steps: - - uses: ./.github/actions/deploy-docker-image.yaml + - uses: ./.github/actions/deploy-service with: service: frontend image: ${{ needs.build-and-push.outputs.IMAGE }} @@ -61,7 +61,7 @@ jobs: shell: bash steps: - - uses: ./.github/actions/deploy-docker-image.yaml + - uses: ./.github/actions/deploy-service with: service: frontend-dev image: ${{ needs.build-and-push-dev.outputs.IMAGE }} diff --git a/frontend/package.json b/frontend/package.json index 943456eb86..8d753a6d98 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.5.1", + "version": "0.5.0", "private": true, "scripts": { "lint": "vue-cli-service lint", From 6a045db8f5b39f78dffafa21c9817051dc9268d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 14:49:48 +0100 Subject: [PATCH 09/18] fixes --- .github/actions/build-docker-image/action.yaml | 3 --- .github/workflows/staging-deploy-frontend.yaml | 12 ++++++++++++ frontend/package.json | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/actions/build-docker-image/action.yaml b/.github/actions/build-docker-image/action.yaml index 2cdabcaef4..845c3d016d 100644 --- a/.github/actions/build-docker-image/action.yaml +++ b/.github/actions/build-docker-image/action.yaml @@ -14,9 +14,6 @@ outputs: runs: using: composite steps: - - name: Check out repository code - uses: actions/checkout@v2 - - name: Get short commit sha hash uses: benjlevesque/short-sha@v2.1 id: short-sha diff --git a/.github/workflows/staging-deploy-frontend.yaml b/.github/workflows/staging-deploy-frontend.yaml index ba4f420fdb..ecdfb1412d 100644 --- a/.github/workflows/staging-deploy-frontend.yaml +++ b/.github/workflows/staging-deploy-frontend.yaml @@ -16,6 +16,9 @@ jobs: shell: bash steps: + - name: Check out repository code + uses: actions/checkout@v2 + - uses: ./.github/actions/build-docker-image id: image-builder with: @@ -31,6 +34,9 @@ jobs: shell: bash steps: + - name: Check out repository code + uses: actions/checkout@v2 + - uses: ./.github/actions/build-docker-image id: image-builder with: @@ -47,6 +53,9 @@ jobs: shell: bash steps: + - name: Check out repository code + uses: actions/checkout@v2 + - uses: ./.github/actions/deploy-service with: service: frontend @@ -61,6 +70,9 @@ jobs: shell: bash steps: + - name: Check out repository code + uses: actions/checkout@v2 + - uses: ./.github/actions/deploy-service with: service: frontend-dev diff --git a/frontend/package.json b/frontend/package.json index 8d753a6d98..943456eb86 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.5.0", + "version": "0.5.1", "private": true, "scripts": { "lint": "vue-cli-service lint", From 056c9927cf434a57f80c4fabd946d753506b875b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 14:53:22 +0100 Subject: [PATCH 10/18] fixes --- .github/actions/build-docker-image/action.yaml | 2 +- .github/actions/deploy-service/action.yaml | 8 ++++---- .github/workflows/staging-deploy-frontend.yaml | 12 ++++++++++-- frontend/package.json | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/actions/build-docker-image/action.yaml b/.github/actions/build-docker-image/action.yaml index 845c3d016d..d7a6339334 100644 --- a/.github/actions/build-docker-image/action.yaml +++ b/.github/actions/build-docker-image/action.yaml @@ -25,7 +25,7 @@ runs: shell: bash - name: Login to docker repository - run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin + run: echo ${{ env.DOCKERHUB_PASSWORD }} | docker login -u ${{ env.DOCKERHUB_USERNAME }} --password-stdin - name: Build and push docker image working-directory: ./scripts diff --git a/.github/actions/deploy-service/action.yaml b/.github/actions/deploy-service/action.yaml index 669c7cb919..cb9d13ea29 100644 --- a/.github/actions/deploy-service/action.yaml +++ b/.github/actions/deploy-service/action.yaml @@ -13,16 +13,16 @@ inputs: cluster: description: To which cloud cluster to deploy required: true - default: ${{ secrets.STAGING_CLUSTER_NAME }} + default: ${{ env.CROWD_CLUSTER }} runs: using: composite steps: - name: Initialize staging kubernetes kubectl context - run: aws eks --region ${{ secrets.AWS_REGION }} update-kubeconfig --name ${{ inputs.cluster }} + run: aws eks --region ${{ env.AWS_REGION }} update-kubeconfig --name ${{ inputs.cluster }} env: - AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} - name: Deploy image run: kubectl set image deployments/${{ inputs.service }}-dpl ${{ inputs.service }}=${{ inputs.image }} diff --git a/.github/workflows/staging-deploy-frontend.yaml b/.github/workflows/staging-deploy-frontend.yaml index ecdfb1412d..afe788f8d5 100644 --- a/.github/workflows/staging-deploy-frontend.yaml +++ b/.github/workflows/staging-deploy-frontend.yaml @@ -8,6 +8,14 @@ on: paths: - 'frontend/**' +env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + CROWD_CLUSTER: ${{ secrets.STAGING_CLUSTER_NAME }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + jobs: build-and-push: runs-on: ubuntu-latest @@ -60,7 +68,7 @@ jobs: with: service: frontend image: ${{ needs.build-and-push.outputs.IMAGE }} - cluster: ${{ secrets.STAGING_CLUSTER_NAME }} + cluster: ${{ env.CROWD_CLUSTER }} deploy-dev: needs: build-and-push-dev @@ -77,4 +85,4 @@ jobs: with: service: frontend-dev image: ${{ needs.build-and-push-dev.outputs.IMAGE }} - cluster: ${{ secrets.STAGING_CLUSTER_NAME }} + cluster: ${{ env.CROWD_CLUSTER }} diff --git a/frontend/package.json b/frontend/package.json index 943456eb86..8d753a6d98 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.5.1", + "version": "0.5.0", "private": true, "scripts": { "lint": "vue-cli-service lint", From 5b6c07a0d68c115482b186f9d3d026f9e9a10c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 14:55:15 +0100 Subject: [PATCH 11/18] fixes --- .github/actions/build-docker-image/action.yaml | 4 +++- .github/actions/deploy-service/action.yaml | 2 ++ frontend/package.json | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/build-docker-image/action.yaml b/.github/actions/build-docker-image/action.yaml index d7a6339334..54876c64b4 100644 --- a/.github/actions/build-docker-image/action.yaml +++ b/.github/actions/build-docker-image/action.yaml @@ -21,12 +21,14 @@ runs: length: 6 - run: echo "IMAGE_VERSION=${{ steps.short-sha.outputs.sha }}.${{ github.run_attempt }}" >> $GITHUB_OUTPUT - id: version-generator shell: bash + id: version-generator - name: Login to docker repository + shell: bash run: echo ${{ env.DOCKERHUB_PASSWORD }} | docker login -u ${{ env.DOCKERHUB_USERNAME }} --password-stdin - name: Build and push docker image + shell: bash working-directory: ./scripts run: ./cli build-and-push frontend ${{ steps.image-version.outputs.image-version }} diff --git a/.github/actions/deploy-service/action.yaml b/.github/actions/deploy-service/action.yaml index cb9d13ea29..cc28c0648c 100644 --- a/.github/actions/deploy-service/action.yaml +++ b/.github/actions/deploy-service/action.yaml @@ -19,10 +19,12 @@ runs: using: composite steps: - name: Initialize staging kubernetes kubectl context + shell: bash run: aws eks --region ${{ env.AWS_REGION }} update-kubeconfig --name ${{ inputs.cluster }} env: AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }} - name: Deploy image + shell: bash run: kubectl set image deployments/${{ inputs.service }}-dpl ${{ inputs.service }}=${{ inputs.image }} diff --git a/frontend/package.json b/frontend/package.json index 8d753a6d98..943456eb86 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.5.0", + "version": "0.5.1", "private": true, "scripts": { "lint": "vue-cli-service lint", From 6b32fc3cfbd7a74ae9692c962132f2c6565f7420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 14:57:02 +0100 Subject: [PATCH 12/18] fixes --- .github/actions/build-docker-image/action.yaml | 4 ++-- frontend/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/build-docker-image/action.yaml b/.github/actions/build-docker-image/action.yaml index 54876c64b4..e960457b33 100644 --- a/.github/actions/build-docker-image/action.yaml +++ b/.github/actions/build-docker-image/action.yaml @@ -9,7 +9,7 @@ inputs: outputs: image: description: Image that was built - value: crowddotdev/${{ inputs.image }}.${{ steps.version-generator.outputs.IMAGE_VERSION }} + value: crowddotdev/${{ inputs.image }}:${{ steps.version-generator.outputs.IMAGE_VERSION }} runs: using: composite @@ -31,4 +31,4 @@ runs: - name: Build and push docker image shell: bash working-directory: ./scripts - run: ./cli build-and-push frontend ${{ steps.image-version.outputs.image-version }} + run: ./cli build-and-push frontend ${{ steps.version-generator.outputs.IMAGE_VERSION }} diff --git a/frontend/package.json b/frontend/package.json index 943456eb86..8d753a6d98 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.5.1", + "version": "0.5.0", "private": true, "scripts": { "lint": "vue-cli-service lint", From 0e46392e19d138308bbf1692f9af6e694aa69708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 15:07:21 +0100 Subject: [PATCH 13/18] fixes --- .github/actions/deploy-service/action.yaml | 1 - frontend/package.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/actions/deploy-service/action.yaml b/.github/actions/deploy-service/action.yaml index cc28c0648c..3d5574139c 100644 --- a/.github/actions/deploy-service/action.yaml +++ b/.github/actions/deploy-service/action.yaml @@ -13,7 +13,6 @@ inputs: cluster: description: To which cloud cluster to deploy required: true - default: ${{ env.CROWD_CLUSTER }} runs: using: composite diff --git a/frontend/package.json b/frontend/package.json index 8d753a6d98..943456eb86 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.5.0", + "version": "0.5.1", "private": true, "scripts": { "lint": "vue-cli-service lint", From bdcb1c1bf43d8b5fdc99ac442555a308d881c728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 15:34:26 +0100 Subject: [PATCH 14/18] fixes --- .github/actions/build-docker-image/action.yaml | 2 +- .github/workflows/staging-deploy-frontend.yaml | 10 ++++++++-- frontend/package.json | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/actions/build-docker-image/action.yaml b/.github/actions/build-docker-image/action.yaml index e960457b33..2e297bed55 100644 --- a/.github/actions/build-docker-image/action.yaml +++ b/.github/actions/build-docker-image/action.yaml @@ -31,4 +31,4 @@ runs: - name: Build and push docker image shell: bash working-directory: ./scripts - run: ./cli build-and-push frontend ${{ steps.version-generator.outputs.IMAGE_VERSION }} + run: ./cli build-and-push ${{ inputs.image }} ${{ steps.version-generator.outputs.IMAGE_VERSION }} diff --git a/.github/workflows/staging-deploy-frontend.yaml b/.github/workflows/staging-deploy-frontend.yaml index afe788f8d5..b4ea83c91f 100644 --- a/.github/workflows/staging-deploy-frontend.yaml +++ b/.github/workflows/staging-deploy-frontend.yaml @@ -19,6 +19,8 @@ env: jobs: build-and-push: runs-on: ubuntu-latest + outputs: + image: ${{ steps.image.outputs.IMAGE }} defaults: run: shell: bash @@ -33,10 +35,13 @@ jobs: image: frontend - name: Set docker image output + id: image run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT build-and-push-dev: runs-on: ubuntu-latest + outputs: + image: ${{ steps.image.outputs.IMAGE }} defaults: run: shell: bash @@ -51,6 +56,7 @@ jobs: image: frontend-dev - name: Set docker image output + id: image run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT deploy: @@ -67,7 +73,7 @@ jobs: - uses: ./.github/actions/deploy-service with: service: frontend - image: ${{ needs.build-and-push.outputs.IMAGE }} + image: ${{ needs.build-and-push.outputs.image }} cluster: ${{ env.CROWD_CLUSTER }} deploy-dev: @@ -84,5 +90,5 @@ jobs: - uses: ./.github/actions/deploy-service with: service: frontend-dev - image: ${{ needs.build-and-push-dev.outputs.IMAGE }} + image: ${{ needs.build-and-push-dev.outputs.image }} cluster: ${{ env.CROWD_CLUSTER }} diff --git a/frontend/package.json b/frontend/package.json index 943456eb86..8d753a6d98 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.5.1", + "version": "0.5.0", "private": true, "scripts": { "lint": "vue-cli-service lint", From 4e0ffb76822c0ec32ebcdddbf4c22e855a8e3c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 16:21:49 +0100 Subject: [PATCH 15/18] premium python backend staging build and deploy workflow --- .../workflows/staging-deploy-frontend.yaml | 3 +- ...staging-deploy-premium-python-backend.yaml | 72 +++++++++++++++++++ 2 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/staging-deploy-premium-python-backend.yaml diff --git a/.github/workflows/staging-deploy-frontend.yaml b/.github/workflows/staging-deploy-frontend.yaml index b4ea83c91f..72e0f6d425 100644 --- a/.github/workflows/staging-deploy-frontend.yaml +++ b/.github/workflows/staging-deploy-frontend.yaml @@ -1,10 +1,9 @@ -name: Staging Deploy Frontend +name: Staging Deploy Frontend service on: push: branches: - 'staging/**' - - feature/ci-cd-staging-C-196 paths: - 'frontend/**' diff --git a/.github/workflows/staging-deploy-premium-python-backend.yaml b/.github/workflows/staging-deploy-premium-python-backend.yaml new file mode 100644 index 0000000000..6f5fc43191 --- /dev/null +++ b/.github/workflows/staging-deploy-premium-python-backend.yaml @@ -0,0 +1,72 @@ +name: Staging Deploy Premium Python Backend services + +on: + push: + branches: + - 'staging/**' + paths: + - 'premium/eagle-eye/**' + +env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + CROWD_CLUSTER: ${{ secrets.STAGING_CLUSTER_NAME }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + +jobs: + build-and-push: + runs-on: ubuntu-latest + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: premium-python-backend + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + deploy-premium-python-worker: + needs: build-and-push + runs-on: ubuntu-latest + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: premium-python-worker + image: ${{ needs.build-and-push.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-premium-api: + needs: build-and-push + runs-on: ubuntu-latest + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: premium-api + image: ${{ needs.build-and-push.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} From d793b22216230e1039fbe2a31cd9d5410d543d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uro=C5=A1=20Marolt?= Date: Mon, 28 Nov 2022 16:32:52 +0100 Subject: [PATCH 16/18] backend, premium job generator and python worker staging deploy scripts --- .github/workflows/staging-deploy-backend.yaml | 90 +++++++++++++++++++ .../staging-deploy-premium-job-generator.yaml | 55 ++++++++++++ .../staging-deploy-python-worker.yaml | 55 ++++++++++++ 3 files changed, 200 insertions(+) create mode 100644 .github/workflows/staging-deploy-backend.yaml create mode 100644 .github/workflows/staging-deploy-premium-job-generator.yaml create mode 100644 .github/workflows/staging-deploy-python-worker.yaml diff --git a/.github/workflows/staging-deploy-backend.yaml b/.github/workflows/staging-deploy-backend.yaml new file mode 100644 index 0000000000..3a4559aeb4 --- /dev/null +++ b/.github/workflows/staging-deploy-backend.yaml @@ -0,0 +1,90 @@ +name: Staging Deploy Backend services + +on: + push: + branches: + - 'staging/**' + paths: + - 'backend/**' + - '!backend/src/serverless/microservices/python/**' + +env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + CROWD_CLUSTER: ${{ secrets.STAGING_CLUSTER_NAME }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + +jobs: + build-and-push: + runs-on: ubuntu-latest + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: backend + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + deploy-api: + needs: build-and-push + runs-on: ubuntu-latest + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: api + image: ${{ needs.build-and-push.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-nodejs-worker: + needs: build-and-push + runs-on: ubuntu-latest + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: nodejs-worker + image: ${{ needs.build-and-push.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} + + deploy-job-generator: + needs: build-and-push + runs-on: ubuntu-latest + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: job-generator + image: ${{ needs.build-and-push.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} diff --git a/.github/workflows/staging-deploy-premium-job-generator.yaml b/.github/workflows/staging-deploy-premium-job-generator.yaml new file mode 100644 index 0000000000..84bb9eebee --- /dev/null +++ b/.github/workflows/staging-deploy-premium-job-generator.yaml @@ -0,0 +1,55 @@ +name: Staging Deploy Premium Job Generator service + +on: + push: + branches: + - 'staging/**' + paths: + - 'premium/job-generator/**' + +env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + CROWD_CLUSTER: ${{ secrets.STAGING_CLUSTER_NAME }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + +jobs: + build-and-push: + runs-on: ubuntu-latest + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: premium-job-generator + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + deploy-premium-job-generator: + needs: build-and-push + runs-on: ubuntu-latest + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: premium-job-generator + image: ${{ needs.build-and-push.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} diff --git a/.github/workflows/staging-deploy-python-worker.yaml b/.github/workflows/staging-deploy-python-worker.yaml new file mode 100644 index 0000000000..62bbd10edd --- /dev/null +++ b/.github/workflows/staging-deploy-python-worker.yaml @@ -0,0 +1,55 @@ +name: Staging Deploy Python Worker service + +on: + push: + branches: + - 'staging/**' + paths: + - 'backend/src/serverless/microservices/python/**' + +env: + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} + CROWD_CLUSTER: ${{ secrets.STAGING_CLUSTER_NAME }} + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + AWS_REGION: ${{ secrets.AWS_REGION }} + +jobs: + build-and-push: + runs-on: ubuntu-latest + outputs: + image: ${{ steps.image.outputs.IMAGE }} + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/build-docker-image + id: image-builder + with: + image: python-worker + + - name: Set docker image output + id: image + run: echo "IMAGE=${{ steps.image-builder.outputs.image }}" >> $GITHUB_OUTPUT + + deploy-python-worker: + needs: build-and-push + runs-on: ubuntu-latest + defaults: + run: + shell: bash + + steps: + - name: Check out repository code + uses: actions/checkout@v2 + + - uses: ./.github/actions/deploy-service + with: + service: python-worker + image: ${{ needs.build-and-push.outputs.image }} + cluster: ${{ env.CROWD_CLUSTER }} From c931c76be22bc6b6356d41d2347cddf5219289b1 Mon Sep 17 00:00:00 2001 From: Uros Marolt Date: Mon, 28 Nov 2022 16:37:18 +0100 Subject: [PATCH 17/18] trigger all deploys --- .github/workflows/staging-deploy-backend.yaml | 1 + .../workflows/staging-deploy-frontend.yaml | 1 + .../staging-deploy-premium-job-generator.yaml | 1 + ...staging-deploy-premium-python-backend.yaml | 1 + .../staging-deploy-python-worker.yaml | 1 + backend/package.json | 1 + .../serverless/microservices/python/README.md | 2 ++ frontend/package.json | 2 +- premium/eagle-eye/package.json | 34 +++++++++---------- premium/job-generator/package.json | 1 + 10 files changed, 27 insertions(+), 18 deletions(-) diff --git a/.github/workflows/staging-deploy-backend.yaml b/.github/workflows/staging-deploy-backend.yaml index 3a4559aeb4..9cea5f3b44 100644 --- a/.github/workflows/staging-deploy-backend.yaml +++ b/.github/workflows/staging-deploy-backend.yaml @@ -4,6 +4,7 @@ on: push: branches: - 'staging/**' + - 'feature/ci-cd-staging-C-196' paths: - 'backend/**' - '!backend/src/serverless/microservices/python/**' diff --git a/.github/workflows/staging-deploy-frontend.yaml b/.github/workflows/staging-deploy-frontend.yaml index 72e0f6d425..0ee67bc4e9 100644 --- a/.github/workflows/staging-deploy-frontend.yaml +++ b/.github/workflows/staging-deploy-frontend.yaml @@ -4,6 +4,7 @@ on: push: branches: - 'staging/**' + - 'feature/ci-cd-staging-C-196' paths: - 'frontend/**' diff --git a/.github/workflows/staging-deploy-premium-job-generator.yaml b/.github/workflows/staging-deploy-premium-job-generator.yaml index 84bb9eebee..15cd13003f 100644 --- a/.github/workflows/staging-deploy-premium-job-generator.yaml +++ b/.github/workflows/staging-deploy-premium-job-generator.yaml @@ -4,6 +4,7 @@ on: push: branches: - 'staging/**' + - 'feature/ci-cd-staging-C-196' paths: - 'premium/job-generator/**' diff --git a/.github/workflows/staging-deploy-premium-python-backend.yaml b/.github/workflows/staging-deploy-premium-python-backend.yaml index 6f5fc43191..52339ed95e 100644 --- a/.github/workflows/staging-deploy-premium-python-backend.yaml +++ b/.github/workflows/staging-deploy-premium-python-backend.yaml @@ -4,6 +4,7 @@ on: push: branches: - 'staging/**' + - 'feature/ci-cd-staging-C-196' paths: - 'premium/eagle-eye/**' diff --git a/.github/workflows/staging-deploy-python-worker.yaml b/.github/workflows/staging-deploy-python-worker.yaml index 62bbd10edd..09992e34b8 100644 --- a/.github/workflows/staging-deploy-python-worker.yaml +++ b/.github/workflows/staging-deploy-python-worker.yaml @@ -4,6 +4,7 @@ on: push: branches: - 'staging/**' + - 'feature/ci-cd-staging-C-196' paths: - 'backend/src/serverless/microservices/python/**' diff --git a/backend/package.json b/backend/package.json index 0128335061..06e24e5a54 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,5 +1,6 @@ { "name": "app-backend", + "version": "0.0.1", "description": "Backend", "scripts": { "start:api": "ts-node --transpile-only ./src/bin/api.ts", diff --git a/backend/src/serverless/microservices/python/README.md b/backend/src/serverless/microservices/python/README.md index 7e65a6cefb..c537ff128f 100644 --- a/backend/src/serverless/microservices/python/README.md +++ b/backend/src/serverless/microservices/python/README.md @@ -28,3 +28,5 @@ In order to start developing, the environment needs to be prepared and some hook - Setup the pre-push testing hook on Unix `make` or on Unix/Windows `cp hooks/pre-push .git/hooks` - TODO setup ENV variables - verify that everything works with running `pytest` + +test \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index 8d753a6d98..943456eb86 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.5.0", + "version": "0.5.1", "private": true, "scripts": { "lint": "vue-cli-service lint", diff --git a/premium/eagle-eye/package.json b/premium/eagle-eye/package.json index 738e4ca127..2eaf506096 100644 --- a/premium/eagle-eye/package.json +++ b/premium/eagle-eye/package.json @@ -1,18 +1,18 @@ - { - "name": "crowd.dev-eagle-eye", - "description": "Eagle Eye stack for the Crowd project", - "author": "team@crowd.dev", - "scripts": { - "sls-deploy": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && serverless deploy", - "sls-deploy-local": "serverless deploy --stage local", - "sls-deploy-prod": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && serverless deploy --stage prod", - "invoke-local": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && npx serverless invoke local", - "invoke": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && npx serverless invoke", - "invoke-prod": "npx serverless invoke --stage prod" - }, - "dependencies": { - "serverless-python-requirements": "^5.4.0", - "serverless-plugin-datadog": "^5.1.1" - } - } \ No newline at end of file + "name": "crowd.dev-eagle-eye", + "version": "0.0.1", + "description": "Eagle Eye stack for the Crowd project", + "author": "team@crowd.dev", + "scripts": { + "sls-deploy": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && serverless deploy", + "sls-deploy-local": "serverless deploy --stage local", + "sls-deploy-prod": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && serverless deploy --stage prod", + "invoke-local": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && npx serverless invoke local", + "invoke": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && npx serverless invoke", + "invoke-prod": "npx serverless invoke --stage prod" + }, + "dependencies": { + "serverless-python-requirements": "^5.4.0", + "serverless-plugin-datadog": "^5.1.1" + } +} diff --git a/premium/job-generator/package.json b/premium/job-generator/package.json index ad0d1647b1..691eafcfc9 100644 --- a/premium/job-generator/package.json +++ b/premium/job-generator/package.json @@ -2,6 +2,7 @@ "name": "premium-job-generator", "description": "Premium job generator", "private": true, + "version": "0.0.1", "scripts": { "start": "ts-node --transpile-only ./src/job-generator.ts", "start:dev": "nodemon --watch \"src/**/*.ts\" -e ts,json --exec \"ts-node --transpile-only ./src/job-generator.ts\"" From 8414708696f5c9bcd227f2bcb2c8173e85db981d Mon Sep 17 00:00:00 2001 From: Uros Marolt Date: Mon, 28 Nov 2022 16:45:05 +0100 Subject: [PATCH 18/18] Revert "trigger all deploys" This reverts commit c931c76be22bc6b6356d41d2347cddf5219289b1. --- .github/workflows/staging-deploy-backend.yaml | 1 - .../workflows/staging-deploy-frontend.yaml | 1 - .../staging-deploy-premium-job-generator.yaml | 1 - ...staging-deploy-premium-python-backend.yaml | 1 - .../staging-deploy-python-worker.yaml | 1 - backend/package.json | 1 - .../serverless/microservices/python/README.md | 2 -- frontend/package.json | 2 +- premium/eagle-eye/package.json | 34 +++++++++---------- premium/job-generator/package.json | 1 - 10 files changed, 18 insertions(+), 27 deletions(-) diff --git a/.github/workflows/staging-deploy-backend.yaml b/.github/workflows/staging-deploy-backend.yaml index 9cea5f3b44..3a4559aeb4 100644 --- a/.github/workflows/staging-deploy-backend.yaml +++ b/.github/workflows/staging-deploy-backend.yaml @@ -4,7 +4,6 @@ on: push: branches: - 'staging/**' - - 'feature/ci-cd-staging-C-196' paths: - 'backend/**' - '!backend/src/serverless/microservices/python/**' diff --git a/.github/workflows/staging-deploy-frontend.yaml b/.github/workflows/staging-deploy-frontend.yaml index 0ee67bc4e9..72e0f6d425 100644 --- a/.github/workflows/staging-deploy-frontend.yaml +++ b/.github/workflows/staging-deploy-frontend.yaml @@ -4,7 +4,6 @@ on: push: branches: - 'staging/**' - - 'feature/ci-cd-staging-C-196' paths: - 'frontend/**' diff --git a/.github/workflows/staging-deploy-premium-job-generator.yaml b/.github/workflows/staging-deploy-premium-job-generator.yaml index 15cd13003f..84bb9eebee 100644 --- a/.github/workflows/staging-deploy-premium-job-generator.yaml +++ b/.github/workflows/staging-deploy-premium-job-generator.yaml @@ -4,7 +4,6 @@ on: push: branches: - 'staging/**' - - 'feature/ci-cd-staging-C-196' paths: - 'premium/job-generator/**' diff --git a/.github/workflows/staging-deploy-premium-python-backend.yaml b/.github/workflows/staging-deploy-premium-python-backend.yaml index 52339ed95e..6f5fc43191 100644 --- a/.github/workflows/staging-deploy-premium-python-backend.yaml +++ b/.github/workflows/staging-deploy-premium-python-backend.yaml @@ -4,7 +4,6 @@ on: push: branches: - 'staging/**' - - 'feature/ci-cd-staging-C-196' paths: - 'premium/eagle-eye/**' diff --git a/.github/workflows/staging-deploy-python-worker.yaml b/.github/workflows/staging-deploy-python-worker.yaml index 09992e34b8..62bbd10edd 100644 --- a/.github/workflows/staging-deploy-python-worker.yaml +++ b/.github/workflows/staging-deploy-python-worker.yaml @@ -4,7 +4,6 @@ on: push: branches: - 'staging/**' - - 'feature/ci-cd-staging-C-196' paths: - 'backend/src/serverless/microservices/python/**' diff --git a/backend/package.json b/backend/package.json index 06e24e5a54..0128335061 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,5 @@ { "name": "app-backend", - "version": "0.0.1", "description": "Backend", "scripts": { "start:api": "ts-node --transpile-only ./src/bin/api.ts", diff --git a/backend/src/serverless/microservices/python/README.md b/backend/src/serverless/microservices/python/README.md index c537ff128f..7e65a6cefb 100644 --- a/backend/src/serverless/microservices/python/README.md +++ b/backend/src/serverless/microservices/python/README.md @@ -28,5 +28,3 @@ In order to start developing, the environment needs to be prepared and some hook - Setup the pre-push testing hook on Unix `make` or on Unix/Windows `cp hooks/pre-push .git/hooks` - TODO setup ENV variables - verify that everything works with running `pytest` - -test \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index 943456eb86..8d753a6d98 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "frontend", - "version": "0.5.1", + "version": "0.5.0", "private": true, "scripts": { "lint": "vue-cli-service lint", diff --git a/premium/eagle-eye/package.json b/premium/eagle-eye/package.json index 2eaf506096..738e4ca127 100644 --- a/premium/eagle-eye/package.json +++ b/premium/eagle-eye/package.json @@ -1,18 +1,18 @@ + { - "name": "crowd.dev-eagle-eye", - "version": "0.0.1", - "description": "Eagle Eye stack for the Crowd project", - "author": "team@crowd.dev", - "scripts": { - "sls-deploy": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && serverless deploy", - "sls-deploy-local": "serverless deploy --stage local", - "sls-deploy-prod": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && serverless deploy --stage prod", - "invoke-local": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && npx serverless invoke local", - "invoke": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && npx serverless invoke", - "invoke-prod": "npx serverless invoke --stage prod" - }, - "dependencies": { - "serverless-python-requirements": "^5.4.0", - "serverless-plugin-datadog": "^5.1.1" - } -} + "name": "crowd.dev-eagle-eye", + "description": "Eagle Eye stack for the Crowd project", + "author": "team@crowd.dev", + "scripts": { + "sls-deploy": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && serverless deploy", + "sls-deploy-local": "serverless deploy --stage local", + "sls-deploy-prod": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && serverless deploy --stage prod", + "invoke-local": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && npx serverless invoke local", + "invoke": "export CROWD_VERSION=$(git describe --tags --abbrev=0) && npx serverless invoke", + "invoke-prod": "npx serverless invoke --stage prod" + }, + "dependencies": { + "serverless-python-requirements": "^5.4.0", + "serverless-plugin-datadog": "^5.1.1" + } + } \ No newline at end of file diff --git a/premium/job-generator/package.json b/premium/job-generator/package.json index 691eafcfc9..ad0d1647b1 100644 --- a/premium/job-generator/package.json +++ b/premium/job-generator/package.json @@ -2,7 +2,6 @@ "name": "premium-job-generator", "description": "Premium job generator", "private": true, - "version": "0.0.1", "scripts": { "start": "ts-node --transpile-only ./src/job-generator.ts", "start:dev": "nodemon --watch \"src/**/*.ts\" -e ts,json --exec \"ts-node --transpile-only ./src/job-generator.ts\""