From fa4ae89c441a8a58c7ca5e232928884ddde5ac1c Mon Sep 17 00:00:00 2001 From: Cicero Woshington Date: Thu, 2 Dec 2021 14:39:19 -0300 Subject: [PATCH] Change Github token used in secret --- .../build-courier-dispatch-shared.yaml | 123 ++++++++++++++ .../build-courier-push-tag-shared.yaml | 159 ++++++++++++++++++ .../build-develop-india-courier.yaml | 78 ++++----- .../build-develop-ireland-courier.yaml | 78 ++++----- .../workflows/build-develop-sp-courier.yaml | 78 ++++----- .../build-production-india-courier.yaml | 78 ++++----- .../build-production-ireland-courier.yaml | 78 ++++----- .../build-production-sp-courier.yaml | 80 ++++----- .../build-staging-india-courier.yaml | 74 ++++---- .../build-staging-ireland-courier.yaml | 74 ++++---- .../workflows/build-staging-sp-courier.yaml | 76 ++++----- 11 files changed, 629 insertions(+), 347 deletions(-) create mode 100644 .github/workflows/build-courier-dispatch-shared.yaml create mode 100644 .github/workflows/build-courier-push-tag-shared.yaml diff --git a/.github/workflows/build-courier-dispatch-shared.yaml b/.github/workflows/build-courier-dispatch-shared.yaml new file mode 100644 index 000000000..e2d4bce8c --- /dev/null +++ b/.github/workflows/build-courier-dispatch-shared.yaml @@ -0,0 +1,123 @@ +name: Build Rapidpro Courier in Shared (Dispatch) + +on: + workflow_dispatch: + inputs: + + source-branch: + description: 'Source branch in Courier repository (main, staging, develop, fix/sentry etc.)' + required: true + default: 'main' + + tag-name: + description: 'Tag id (v0.0.1-develop, v0.0.2, etc.)' + required: true + + destination-env: + description: 'Destination environment (develop, production, staging)' + required: true + +jobs: + docker: + runs-on: ubuntu-latest + steps: + + - name: Check out the repo + uses: actions/checkout@v2 + with: + ref: ${{github.event.inputs.source-branch}} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to ECR + uses: docker/login-action@v1 + with: + registry: 869898323958.dkr.ecr.us-east-1.amazonaws.com + username: ${{ secrets.AWS_ACCESS_KEY_ID_SHARED }} + password: ${{ secrets.AWS_SECRET_ACCESS_KEY_SHARED }} + + - name: Build and push - Rapidpro Archiver Image + id: docker_build1 + uses: docker/build-push-action@v2 + with: + context: . + labels: branch=${{github.event.inputs.source-branch}},commit=${{env.GITHUB_SHA}},repository=https://github.com/Ilhasoft/courier + file: ./docker/Dockerfile + push: true + tags: 869898323958.dkr.ecr.us-east-1.amazonaws.com/courier:${{github.event.inputs.tag-name}} + no-cache: true + + - name: Check out Kubernetes Manifests + uses: actions/checkout@master + with: + ref: main + repository: Ilhasoft/kubernetes-manifests-platform + token: ${{ secrets.DEVOPS_GITHUB_PERMANENT_TOKEN }} + path: ./kubernetes-manifests/ + + - name: Set variable tag for jq + run: | + echo "IMAGE_TAG=869898323958.dkr.ecr.us-east-1.amazonaws.com/courier:${{github.event.inputs.tag-name}}" >> $GITHUB_ENV + + - name: Update image on deployment + run: | + which jq > /dev/null 2>&1 || ( sudo apt update ; sudo apt install -y jq ) + # Dep: coreutils + verlte() { + [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ] + } + verlt(){ + [ "$1" = "$2" ] && return 1 || verlte $1 $2 + } + export PROJECT_DIR="weni-flows/courier" PATCH_TARGET="deployment.json" + for e in ${{github.event.inputs.destination-env}}; do + echo "Update ${e}:" + if [ ! -d "kubernetes-manifests/${PROJECT_DIR}/${e}" ] ; then + echo "kubernetes-manifests/${PROJECT_DIR}/${e}: Does not exist, skipping" + elif [ ! -r "kubernetes-manifests/${PROJECT_DIR}/${e}/kustomization.yaml" ] ; then + echo "kubernetes-manifests/${PROJECT_DIR}/${e}/kustomization.yaml: Does not readable, skipping" + elif [ ! -r "kubernetes-manifests/${PROJECT_DIR}/${e}/${PATCH_TARGET}" ] ; then + echo "kubernetes-manifests/${PROJECT_DIR}/${e}/${PATCH_TARGET}: Does not readable, skipping" + else + OLD_IMAGE=$( + cat "kubernetes-manifests/${PROJECT_DIR}/${e}/${PATCH_TARGET}" \ + | jq '.[] | select(.path == "/spec/template/spec/containers/0/image") | .value' + ) + echo "Old image to replace: ${OLD_IMAGE}" + OLD_VERSION=$( + echo "${OLD_IMAGE}" \ + | sed s'/^.*[v:-]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/'g \ + | head -n1 + ) + NEW_VERSION=$(echo ${{github.event.inputs.tag-name}}|grep -o -e '[0-9]*\.[0-9]*\.[0-9]*') + echo "Old image version to compare: ${OLD_VERSION}<=${NEW_VERSION}" + if verlte "${OLD_VERSION}" "${NEW_VERSION}" ; then + echo 'New configurations:' + new_configuration=$( + cat "kubernetes-manifests/${PROJECT_DIR}/${e}/${PATCH_TARGET}" \ + | jq '(..|select(.path == "/spec/template/spec/containers/0/image")?) += {value: "'"${{env.IMAGE_TAG}}"'"}' + ) + echo "${new_configuration}" + echo "${new_configuration}" > "kubernetes-manifests/${PROJECT_DIR}/${e}/${PATCH_TARGET}" + else + echo "Version in file is greater than build, skiping update yaml" + fi + fi + done + + - name: Commit & Push changes + uses: actions-js/push@master + with: + github_token: ${{ secrets.DEVOPS_GITHUB_PERMANENT_TOKEN }} + repository: Ilhasoft/kubernetes-manifests-platform + directory: ./kubernetes-manifests/ + branch: main + message: "From Rapidpro Courier Build (Dispatch)" + + - name: Generated Image URL to Copy + run: | + echo ${{ env.IMAGE_TAG }} \ No newline at end of file diff --git a/.github/workflows/build-courier-push-tag-shared.yaml b/.github/workflows/build-courier-push-tag-shared.yaml new file mode 100644 index 000000000..244d64268 --- /dev/null +++ b/.github/workflows/build-courier-push-tag-shared.yaml @@ -0,0 +1,159 @@ +name: Build Rapidpro Courier in Shared (Push Tag) + +on: + push: + tags: + - 'v*.*.*-develop*' + - 'v*.*.*-staging*' + - 'v*.*.*' + +jobs: + docker: + runs-on: ubuntu-latest + steps: + + - name: Set variables + run: | + TAG=$(echo $GITHUB_REF|cut -d"/" -f3) + if $(echo $TAG|grep --silent -e 'v*.*.*-develop*') + then + echo "Found environment: DEVELOP - $TAG" + echo "MANIFESTS_ENVIRONMENT=develop" >> $GITHUB_ENV + echo "MANIFESTS_ENVIRONMENT=develop" + echo "TAG=$TAG" >> $GITHUB_ENV + echo "TAG=$TAG" + VERSION=${TAG#v} + echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "VERSION=$VERSION" + echo "COMMIT_SHA=$GITHUB_SHA" >> $GITHUB_ENV + echo "COMMIT_SHA=$GITHUB_SHA" + echo "IMAGE_TAG=869898323958.dkr.ecr.us-east-1.amazonaws.com/courier:$TAG" >> $GITHUB_ENV + echo "IMAGE_TAG=869898323958.dkr.ecr.us-east-1.amazonaws.com/courier:$TAG" + elif $(echo $TAG|grep --silent -e 'v*.*.*-staging*') + then + echo "Found environment: STAGING - $TAG" + echo "MANIFESTS_ENVIRONMENT=staging" >> $GITHUB_ENV + echo "MANIFESTS_ENVIRONMENT=staging" + echo "TAG=$TAG" >> $GITHUB_ENV + echo "TAG=$TAG" + VERSION=${TAG#v} + echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "VERSION=$VERSION" + echo "COMMIT_SHA=$GITHUB_SHA" >> $GITHUB_ENV + echo "COMMIT_SHA=$GITHUB_SHA" + echo "IMAGE_TAG=869898323958.dkr.ecr.us-east-1.amazonaws.com/courier:$TAG" >> $GITHUB_ENV + echo "IMAGE_TAG=869898323958.dkr.ecr.us-east-1.amazonaws.com/courier:$TAG" + elif $(echo $TAG|grep --silent -e 'v*.*.*') + then + echo "No environment found, assuming: PRODUCTION - $TAG" + echo "MANIFESTS_ENVIRONMENT=production" >> $GITHUB_ENV + echo "MANIFESTS_ENVIRONMENT=production" + echo "TAG=$TAG" >> $GITHUB_ENV + echo "TAG=$TAG" + VERSION=${TAG#v} + echo "VERSION=$VERSION" >> $GITHUB_ENV + echo "VERSION=$VERSION" + echo "COMMIT_SHA=$GITHUB_SHA" >> $GITHUB_ENV + echo "COMMIT_SHA=$GITHUB_SHA" + echo "IMAGE_TAG=869898323958.dkr.ecr.us-east-1.amazonaws.com/courier:$TAG" >> $GITHUB_ENV + echo "IMAGE_TAG=869898323958.dkr.ecr.us-east-1.amazonaws.com/courier:$TAG" + else + echo 'Not a valid tag. Skipping...' + exit 1 + fi + + - name: Check out the repo + uses: actions/checkout@v2 + with: + ref: ${{env.GITHUB_SHA}} + repository: Ilhasoft/courier + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to ECR + uses: docker/login-action@v1 + with: + registry: 869898323958.dkr.ecr.us-east-1.amazonaws.com + username: ${{secrets.AWS_ACCESS_KEY_ID_SHARED}} + password: ${{secrets.AWS_SECRET_ACCESS_KEY_SHARED}} + + - name: Build and push - Rapidpro Archiver Image + id: docker_build1 + uses: docker/build-push-action@v2 + with: + context: . + labels: branch=${{env.TAG}},commit=${{env.COMMIT_SHA}},repository=https://github.com/Ilhasoft/courier + file: ./docker/Dockerfile + push: true + tags: ${{env.IMAGE_TAG}} + no-cache: true + + - name: Check out Kubernetes Manifests + uses: actions/checkout@master + with: + ref: main + repository: Ilhasoft/kubernetes-manifests-platform + token: ${{secrets.DEVOPS_GITHUB_PERMANENT_TOKEN}} + path: ./kubernetes-manifests/ + + - name: Update image on deployment + run: | + which jq > /dev/null 2>&1 || ( sudo apt update ; sudo apt install -y jq ) + # Dep: coreutils + verlte() { + [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ] + } + verlt(){ + [ "$1" = "$2" ] && return 1 || verlte $1 $2 + } + export PROJECT_DIR="weni-flows/courier" PATCH_TARGET="deployment.json" + for e in ${{env.MANIFESTS_ENVIRONMENT}}; do + echo "Update ${e}:" + if [ ! -d "kubernetes-manifests/${PROJECT_DIR}/${e}" ] ; then + echo "kubernetes-manifests/${PROJECT_DIR}/${e}: Does not exist, skipping" + elif [ ! -r "kubernetes-manifests/${PROJECT_DIR}/${e}/kustomization.yaml" ] ; then + echo "kubernetes-manifests/${PROJECT_DIR}/${e}/kustomization.yaml: Does not readable, skipping" + elif [ ! -r "kubernetes-manifests/${PROJECT_DIR}/${e}/${PATCH_TARGET}" ] ; then + echo "kubernetes-manifests/${PROJECT_DIR}/${e}/${PATCH_TARGET}: Does not readable, skipping" + else + OLD_IMAGE=$( + cat "kubernetes-manifests/${PROJECT_DIR}/${e}/${PATCH_TARGET}" \ + | jq '.[] | select(.path == "/spec/template/spec/containers/0/image") | .value' + ) + echo "Old image to replace: ${OLD_IMAGE}" + OLD_VERSION=$( + echo "${OLD_IMAGE}" \ + | sed s'/^.*[v:-]\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/'g \ + | head -n1 + ) + echo "Old image version to compare: ${OLD_VERSION}<=${{env.VERSION}}" + if verlte "${OLD_VERSION}" "${{env.VERSION}}" ; then + echo 'New configurations:' + new_configuration=$( + cat "kubernetes-manifests/${PROJECT_DIR}/${e}/${PATCH_TARGET}" \ + | jq '(..|select(.path == "/spec/template/spec/containers/0/image")?) += {value: "'"${{env.IMAGE_TAG}}"'"}' + ) + echo "${new_configuration}" + echo "${new_configuration}" > "kubernetes-manifests/${PROJECT_DIR}/${e}/${PATCH_TARGET}" + else + echo "Version in file is greater than build, skiping update yaml" + fi + fi + done + + - name: Commit & Push changes + uses: actions-js/push@master + with: + github_token: ${{ secrets.DEVOPS_GITHUB_PERMANENT_TOKEN }} + repository: Ilhasoft/kubernetes-manifests-platform + directory: ./kubernetes-manifests/ + branch: main + message: "From Rapidpro Archiver Build (Push-Tag)" + + - name: Generated Image + run: | + echo "IMAGE: " ${{env.IMAGE_TAG}} \ No newline at end of file diff --git a/.github/workflows/build-develop-india-courier.yaml b/.github/workflows/build-develop-india-courier.yaml index 2104ca6ef..611af242a 100644 --- a/.github/workflows/build-develop-india-courier.yaml +++ b/.github/workflows/build-develop-india-courier.yaml @@ -1,39 +1,39 @@ -name: Build Develop India RP-courier -on: - push: - tags: - - 'v*.*.*-develop*' -jobs: - docker: - runs-on: ubuntu-latest - environment: - name: develop-india - steps: - - name: Set output - id: vars - run: | - echo ::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/}|cut -d'-' -f3-4|tr -s '-' '/'); - echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3-|cut -d'-' -f1-2); - - name: Check out the repo - uses: actions/checkout@v2 - with: - ref: feature/build - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to ECR - uses: docker/login-action@v1 - with: - registry: 242357350604.dkr.ecr.ap-south-1.amazonaws.com - username: ${{ secrets.AWS_ACCESS_KEY_ID }} - password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Build and push - Courier Image - id: docker_build1 - uses: docker/build-push-action@v2 - with: - context: . - file: docker/Dockerfile - push: true - tags: 242357350604.dkr.ecr.ap-south-1.amazonaws.com/courier:${{ steps.vars.outputs.tag }} - no-cache: true \ No newline at end of file +# name: Build Develop India RP-courier +# on: +# push: +# tags: +# - 'v*.*.*-develop*' +# jobs: +# docker: +# runs-on: ubuntu-latest +# environment: +# name: develop-india +# steps: +# - name: Set output +# id: vars +# run: | +# echo ::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/}|cut -d'-' -f3-4|tr -s '-' '/'); +# echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3-|cut -d'-' -f1-2); +# - name: Check out the repo +# uses: actions/checkout@v2 +# with: +# ref: feature/build +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v1 +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v1 +# - name: Login to ECR +# uses: docker/login-action@v1 +# with: +# registry: 242357350604.dkr.ecr.ap-south-1.amazonaws.com +# username: ${{ secrets.AWS_ACCESS_KEY_ID }} +# password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# - name: Build and push - Courier Image +# id: docker_build1 +# uses: docker/build-push-action@v2 +# with: +# context: . +# file: docker/Dockerfile +# push: true +# tags: 242357350604.dkr.ecr.ap-south-1.amazonaws.com/courier:${{ steps.vars.outputs.tag }} +# no-cache: true \ No newline at end of file diff --git a/.github/workflows/build-develop-ireland-courier.yaml b/.github/workflows/build-develop-ireland-courier.yaml index ce3fbccc1..eadb01fe9 100644 --- a/.github/workflows/build-develop-ireland-courier.yaml +++ b/.github/workflows/build-develop-ireland-courier.yaml @@ -1,39 +1,39 @@ -name: Build Develop Ireland RP-Courier -on: - push: - tags: - - 'v*.*.*-develop*' -jobs: - docker: - runs-on: ubuntu-latest - environment: - name: develop-ireland - steps: - - name: Set output - id: vars - run: | - echo ::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/}|cut -d'-' -f3-4|tr -s '-' '/'); - echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3-|cut -d'-' -f1-2); - - name: Check out the repo - uses: actions/checkout@v2 - with: - ref: feature/build - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to ECR - uses: docker/login-action@v1 - with: - registry: 452158872079.dkr.ecr.eu-west-1.amazonaws.com - username: ${{ secrets.AWS_ACCESS_KEY_ID }} - password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Build and push - Courier Image - id: docker_build1 - uses: docker/build-push-action@v2 - with: - context: . - file: docker/Dockerfile - push: true - tags: 452158872079.dkr.ecr.eu-west-1.amazonaws.com/rp-courier-rapidpro:${{ steps.vars.outputs.tag }} - no-cache: true \ No newline at end of file +# name: Build Develop Ireland RP-Courier +# on: +# push: +# tags: +# - 'v*.*.*-develop*' +# jobs: +# docker: +# runs-on: ubuntu-latest +# environment: +# name: develop-ireland +# steps: +# - name: Set output +# id: vars +# run: | +# echo ::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/}|cut -d'-' -f3-4|tr -s '-' '/'); +# echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3-|cut -d'-' -f1-2); +# - name: Check out the repo +# uses: actions/checkout@v2 +# with: +# ref: feature/build +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v1 +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v1 +# - name: Login to ECR +# uses: docker/login-action@v1 +# with: +# registry: 452158872079.dkr.ecr.eu-west-1.amazonaws.com +# username: ${{ secrets.AWS_ACCESS_KEY_ID }} +# password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# - name: Build and push - Courier Image +# id: docker_build1 +# uses: docker/build-push-action@v2 +# with: +# context: . +# file: docker/Dockerfile +# push: true +# tags: 452158872079.dkr.ecr.eu-west-1.amazonaws.com/rp-courier-rapidpro:${{ steps.vars.outputs.tag }} +# no-cache: true \ No newline at end of file diff --git a/.github/workflows/build-develop-sp-courier.yaml b/.github/workflows/build-develop-sp-courier.yaml index 1f1c6e771..5969542d0 100644 --- a/.github/workflows/build-develop-sp-courier.yaml +++ b/.github/workflows/build-develop-sp-courier.yaml @@ -1,39 +1,39 @@ -name: Build Develop SP RP-Courier -on: - push: - tags: - - 'v*.*.*-develop*' -jobs: - docker: - runs-on: ubuntu-latest - environment: - name: develop - steps: - - name: Set output - id: vars - run: | - echo ::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/}|cut -d'-' -f3-4|tr -s '-' '/'); - echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3-|cut -d'-' -f1-2); - - name: Check out the repo - uses: actions/checkout@v2 - with: - ref: feature/build - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to ECR - uses: docker/login-action@v1 - with: - registry: 242357350604.dkr.ecr.sa-east-1.amazonaws.com - username: ${{ secrets.AWS_ACCESS_KEY_ID }} - password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Build and push - Courier Image - id: docker_build1 - uses: docker/build-push-action@v2 - with: - context: . - file: docker/Dockerfile - push: true - tags: 242357350604.dkr.ecr.sa-east-1.amazonaws.com/push-courier:${{ steps.vars.outputs.tag }} - no-cache: true \ No newline at end of file +# name: Build Develop SP RP-Courier +# on: +# push: +# tags: +# - 'v*.*.*-develop*' +# jobs: +# docker: +# runs-on: ubuntu-latest +# environment: +# name: develop +# steps: +# - name: Set output +# id: vars +# run: | +# echo ::set-output name=branch::$(echo ${GITHUB_REF#refs/heads/}|cut -d'-' -f3-4|tr -s '-' '/'); +# echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3-|cut -d'-' -f1-2); +# - name: Check out the repo +# uses: actions/checkout@v2 +# with: +# ref: feature/build +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v1 +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v1 +# - name: Login to ECR +# uses: docker/login-action@v1 +# with: +# registry: 242357350604.dkr.ecr.sa-east-1.amazonaws.com +# username: ${{ secrets.AWS_ACCESS_KEY_ID }} +# password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# - name: Build and push - Courier Image +# id: docker_build1 +# uses: docker/build-push-action@v2 +# with: +# context: . +# file: docker/Dockerfile +# push: true +# tags: 242357350604.dkr.ecr.sa-east-1.amazonaws.com/push-courier:${{ steps.vars.outputs.tag }} +# no-cache: true \ No newline at end of file diff --git a/.github/workflows/build-production-india-courier.yaml b/.github/workflows/build-production-india-courier.yaml index b5b8f26cc..2f3bd8456 100644 --- a/.github/workflows/build-production-india-courier.yaml +++ b/.github/workflows/build-production-india-courier.yaml @@ -1,39 +1,39 @@ -name: Build Production India RP-courier -on: - push: - tags: - - 'v*.*.*' - - '!v*.*.*-staging*' - - '!v*.*.*-develop*' -jobs: - docker: - runs-on: ubuntu-latest - environment: - name: production-india - steps: - - name: Set output - id: vars - run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3); - - name: Check out the repo - uses: actions/checkout@v2 - with: - ref: main - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to ECR - uses: docker/login-action@v1 - with: - registry: 242357350604.dkr.ecr.ap-south-1.amazonaws.com - username: ${{ secrets.AWS_ACCESS_KEY_ID }} - password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Build and push - Courier Image - id: docker_build1 - uses: docker/build-push-action@v2 - with: - context: . - file: docker/Dockerfile - push: true - tags: 242357350604.dkr.ecr.ap-south-1.amazonaws.com/courier:${{ steps.vars.outputs.tag }} - no-cache: true \ No newline at end of file +# name: Build Production India RP-courier +# on: +# push: +# tags: +# - 'v*.*.*' +# - '!v*.*.*-staging*' +# - '!v*.*.*-develop*' +# jobs: +# docker: +# runs-on: ubuntu-latest +# environment: +# name: production-india +# steps: +# - name: Set output +# id: vars +# run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3); +# - name: Check out the repo +# uses: actions/checkout@v2 +# with: +# ref: main +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v1 +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v1 +# - name: Login to ECR +# uses: docker/login-action@v1 +# with: +# registry: 242357350604.dkr.ecr.ap-south-1.amazonaws.com +# username: ${{ secrets.AWS_ACCESS_KEY_ID }} +# password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# - name: Build and push - Courier Image +# id: docker_build1 +# uses: docker/build-push-action@v2 +# with: +# context: . +# file: docker/Dockerfile +# push: true +# tags: 242357350604.dkr.ecr.ap-south-1.amazonaws.com/courier:${{ steps.vars.outputs.tag }} +# no-cache: true \ No newline at end of file diff --git a/.github/workflows/build-production-ireland-courier.yaml b/.github/workflows/build-production-ireland-courier.yaml index 42f9a941e..5a20fc2a2 100644 --- a/.github/workflows/build-production-ireland-courier.yaml +++ b/.github/workflows/build-production-ireland-courier.yaml @@ -1,39 +1,39 @@ -name: Build Production Ireland RP-Courier -on: - push: - tags: - - 'v*.*.*' - - '!v*.*.*-staging*' - - '!v*.*.*-develop*' -jobs: - docker: - runs-on: ubuntu-latest - environment: - name: production-ireland - steps: - - name: Set output - id: vars - run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3); - - name: Check out the repo - uses: actions/checkout@v2 - with: - ref: main - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to ECR - uses: docker/login-action@v1 - with: - registry: 452158872079.dkr.ecr.eu-west-1.amazonaws.com - username: ${{ secrets.AWS_ACCESS_KEY_ID }} - password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Build and push - Courier Image - id: docker_build1 - uses: docker/build-push-action@v2 - with: - context: . - file: docker/Dockerfile - push: true - tags: 452158872079.dkr.ecr.eu-west-1.amazonaws.com/rp-courier-rapidpro:${{ steps.vars.outputs.tag }} - no-cache: true \ No newline at end of file +# name: Build Production Ireland RP-Courier +# on: +# push: +# tags: +# - 'v*.*.*' +# - '!v*.*.*-staging*' +# - '!v*.*.*-develop*' +# jobs: +# docker: +# runs-on: ubuntu-latest +# environment: +# name: production-ireland +# steps: +# - name: Set output +# id: vars +# run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3); +# - name: Check out the repo +# uses: actions/checkout@v2 +# with: +# ref: main +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v1 +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v1 +# - name: Login to ECR +# uses: docker/login-action@v1 +# with: +# registry: 452158872079.dkr.ecr.eu-west-1.amazonaws.com +# username: ${{ secrets.AWS_ACCESS_KEY_ID }} +# password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# - name: Build and push - Courier Image +# id: docker_build1 +# uses: docker/build-push-action@v2 +# with: +# context: . +# file: docker/Dockerfile +# push: true +# tags: 452158872079.dkr.ecr.eu-west-1.amazonaws.com/rp-courier-rapidpro:${{ steps.vars.outputs.tag }} +# no-cache: true \ No newline at end of file diff --git a/.github/workflows/build-production-sp-courier.yaml b/.github/workflows/build-production-sp-courier.yaml index a08e7901f..381e28c08 100644 --- a/.github/workflows/build-production-sp-courier.yaml +++ b/.github/workflows/build-production-sp-courier.yaml @@ -1,40 +1,40 @@ -name: Build Production SP RP-Courier -on: - push: - tags: - - 'v*.*.*' - - '!v*.*.*-staging*' - - '!v*.*.*-develop*' -jobs: - docker: - runs-on: ubuntu-latest - environment: - name: production - steps: - - name: Set output - id: vars - run: | - echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3-|cut -d'-' -f1-2); - - name: Check out the repo - uses: actions/checkout@v2 - with: - ref: main - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to ECR - uses: docker/login-action@v1 - with: - registry: 242357350604.dkr.ecr.sa-east-1.amazonaws.com - username: ${{ secrets.AWS_ACCESS_KEY_ID }} - password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Build and push - Courier Image - id: docker_build1 - uses: docker/build-push-action@v2 - with: - context: . - file: docker/Dockerfile - push: true - tags: 242357350604.dkr.ecr.sa-east-1.amazonaws.com/push-courier:${{ steps.vars.outputs.tag }} - no-cache: true \ No newline at end of file +# name: Build Production SP RP-Courier +# on: +# push: +# tags: +# - 'v*.*.*' +# - '!v*.*.*-staging*' +# - '!v*.*.*-develop*' +# jobs: +# docker: +# runs-on: ubuntu-latest +# environment: +# name: production +# steps: +# - name: Set output +# id: vars +# run: | +# echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3-|cut -d'-' -f1-2); +# - name: Check out the repo +# uses: actions/checkout@v2 +# with: +# ref: main +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v1 +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v1 +# - name: Login to ECR +# uses: docker/login-action@v1 +# with: +# registry: 242357350604.dkr.ecr.sa-east-1.amazonaws.com +# username: ${{ secrets.AWS_ACCESS_KEY_ID }} +# password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# - name: Build and push - Courier Image +# id: docker_build1 +# uses: docker/build-push-action@v2 +# with: +# context: . +# file: docker/Dockerfile +# push: true +# tags: 242357350604.dkr.ecr.sa-east-1.amazonaws.com/push-courier:${{ steps.vars.outputs.tag }} +# no-cache: true \ No newline at end of file diff --git a/.github/workflows/build-staging-india-courier.yaml b/.github/workflows/build-staging-india-courier.yaml index 66624e5d0..2a45b25d5 100644 --- a/.github/workflows/build-staging-india-courier.yaml +++ b/.github/workflows/build-staging-india-courier.yaml @@ -1,37 +1,37 @@ -name: Build Staging India RP-courier -on: - push: - tags: - - 'v*.*.*-staging*' -jobs: - docker: - runs-on: ubuntu-latest - environment: - name: staging-india - steps: - - name: Set output - id: vars - run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3); - - name: Check out the repo - uses: actions/checkout@v2 - with: - ref: main - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to ECR - uses: docker/login-action@v1 - with: - registry: 242357350604.dkr.ecr.ap-south-1.amazonaws.com - username: ${{ secrets.AWS_ACCESS_KEY_ID }} - password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Build and push - Courier Image - id: docker_build1 - uses: docker/build-push-action@v2 - with: - context: . - file: docker/Dockerfile - push: true - tags: 242357350604.dkr.ecr.ap-south-1.amazonaws.com/courier:${{ steps.vars.outputs.tag }} - no-cache: true \ No newline at end of file +# name: Build Staging India RP-courier +# on: +# push: +# tags: +# - 'v*.*.*-staging*' +# jobs: +# docker: +# runs-on: ubuntu-latest +# environment: +# name: staging-india +# steps: +# - name: Set output +# id: vars +# run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3); +# - name: Check out the repo +# uses: actions/checkout@v2 +# with: +# ref: main +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v1 +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v1 +# - name: Login to ECR +# uses: docker/login-action@v1 +# with: +# registry: 242357350604.dkr.ecr.ap-south-1.amazonaws.com +# username: ${{ secrets.AWS_ACCESS_KEY_ID }} +# password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# - name: Build and push - Courier Image +# id: docker_build1 +# uses: docker/build-push-action@v2 +# with: +# context: . +# file: docker/Dockerfile +# push: true +# tags: 242357350604.dkr.ecr.ap-south-1.amazonaws.com/courier:${{ steps.vars.outputs.tag }} +# no-cache: true \ No newline at end of file diff --git a/.github/workflows/build-staging-ireland-courier.yaml b/.github/workflows/build-staging-ireland-courier.yaml index 738a6c5ff..0b251402d 100644 --- a/.github/workflows/build-staging-ireland-courier.yaml +++ b/.github/workflows/build-staging-ireland-courier.yaml @@ -1,37 +1,37 @@ -name: Build Staging Ireland RP-Courier -on: - push: - tags: - - 'v*.*.*-staging*' -jobs: - docker: - runs-on: ubuntu-latest - environment: - name: staging-ireland - steps: - - name: Set output - id: vars - run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3); - - name: Check out the repo - uses: actions/checkout@v2 - with: - ref: main - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to ECR - uses: docker/login-action@v1 - with: - registry: 452158872079.dkr.ecr.eu-west-1.amazonaws.com - username: ${{ secrets.AWS_ACCESS_KEY_ID }} - password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Build and push - Courier Image - id: docker_build1 - uses: docker/build-push-action@v2 - with: - context: . - file: docker/Dockerfile - push: true - tags: 452158872079.dkr.ecr.eu-west-1.amazonaws.com/rp-courier-rapidpro:${{ steps.vars.outputs.tag }} - no-cache: true \ No newline at end of file +# name: Build Staging Ireland RP-Courier +# on: +# push: +# tags: +# - 'v*.*.*-staging*' +# jobs: +# docker: +# runs-on: ubuntu-latest +# environment: +# name: staging-ireland +# steps: +# - name: Set output +# id: vars +# run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3); +# - name: Check out the repo +# uses: actions/checkout@v2 +# with: +# ref: main +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v1 +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v1 +# - name: Login to ECR +# uses: docker/login-action@v1 +# with: +# registry: 452158872079.dkr.ecr.eu-west-1.amazonaws.com +# username: ${{ secrets.AWS_ACCESS_KEY_ID }} +# password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# - name: Build and push - Courier Image +# id: docker_build1 +# uses: docker/build-push-action@v2 +# with: +# context: . +# file: docker/Dockerfile +# push: true +# tags: 452158872079.dkr.ecr.eu-west-1.amazonaws.com/rp-courier-rapidpro:${{ steps.vars.outputs.tag }} +# no-cache: true \ No newline at end of file diff --git a/.github/workflows/build-staging-sp-courier.yaml b/.github/workflows/build-staging-sp-courier.yaml index a5dc164e4..3cd50ae49 100644 --- a/.github/workflows/build-staging-sp-courier.yaml +++ b/.github/workflows/build-staging-sp-courier.yaml @@ -1,38 +1,38 @@ -name: Build Staging SP RP-Courier -on: - push: - tags: - - 'v*.*.*-staging*' -jobs: - docker: - runs-on: ubuntu-latest - environment: - name: staging - steps: - - name: Set output - id: vars - run: | - echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3-|cut -d'-' -f1-2); - - name: Check out the repo - uses: actions/checkout@v2 - with: - ref: main - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - name: Login to ECR - uses: docker/login-action@v1 - with: - registry: 242357350604.dkr.ecr.sa-east-1.amazonaws.com - username: ${{ secrets.AWS_ACCESS_KEY_ID }} - password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - - name: Build and push - Courier Image - id: docker_build1 - uses: docker/build-push-action@v2 - with: - context: . - file: docker/Dockerfile - push: true - tags: 242357350604.dkr.ecr.sa-east-1.amazonaws.com/push-courier:${{ steps.vars.outputs.tag }} - no-cache: true \ No newline at end of file +# name: Build Staging SP RP-Courier +# on: +# push: +# tags: +# - 'v*.*.*-staging*' +# jobs: +# docker: +# runs-on: ubuntu-latest +# environment: +# name: staging +# steps: +# - name: Set output +# id: vars +# run: | +# echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/heads/}|cut -d'/' -f3-|cut -d'-' -f1-2); +# - name: Check out the repo +# uses: actions/checkout@v2 +# with: +# ref: main +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v1 +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v1 +# - name: Login to ECR +# uses: docker/login-action@v1 +# with: +# registry: 242357350604.dkr.ecr.sa-east-1.amazonaws.com +# username: ${{ secrets.AWS_ACCESS_KEY_ID }} +# password: ${{ secrets.AWS_SECRET_ACCESS_KEY }} +# - name: Build and push - Courier Image +# id: docker_build1 +# uses: docker/build-push-action@v2 +# with: +# context: . +# file: docker/Dockerfile +# push: true +# tags: 242357350604.dkr.ecr.sa-east-1.amazonaws.com/push-courier:${{ steps.vars.outputs.tag }} +# no-cache: true \ No newline at end of file