Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Rajpal Chauhan <[email protected]>
  • Loading branch information
rajpalc7 committed Feb 8, 2024
1 parent 1776a4a commit b18148b
Showing 1 changed file with 86 additions and 86 deletions.
172 changes: 86 additions & 86 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ jobs:
- name: Build and push Docker image
id: docker_build
if: contains(fromJSON('["aries-endorser-agent","aries-endorser-backup","aries-endorser-api","aries-endorser-proxy"]'), matrix.service)
uses: docker/build-push-action@v5
uses: docker/build-push-action@v4
with:
context: ${{ matrix.SOURCE_CONTEXT_DIR }}
file: ${{ matrix.SOURCE_CONTEXT_DIR }}/${{ matrix.DOCKER_FILE_PATH }}
Expand Down Expand Up @@ -215,106 +215,106 @@ jobs:
echo "${{ matrix.service }}_digest=${digest}" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
deploy2dev:
needs: build
env:
ENVIRONMENT: dev
permissions:
packages: write
runs-on: ubuntu-latest
environment: dev
strategy:
# Serialize the deployments
max-parallel: 1
matrix:
include:
- service: aries-endorser-db
- service: aries-endorser-agent
- service: aries-endorser-backup
- service: aries-endorser-proxy
- service: aries-endorser-api

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Deploy to ${{ env.ENVIRONMENT }}
uses: ./.github/workflows/actions/deploy
with:
environment: ${{ env.ENVIRONMENT }}
ghcr_token: ${{ secrets.GITHUB_TOKEN }}
github_image_name: ${{ env.GITHUB_IMAGE_REPO }}${{ matrix.service }}
image_digest: ${{ needs.build.outputs[format ('{0}_digest', matrix.service)] }}
openshift_image_name: ${{ env.OPENSHIFT_IMAGE_REPO }}${{ matrix.service }}
openshift_server_url: ${{ vars.OPENSHIFT_SERVER_URL }}
namespace: ${{ vars.NAMESPACE }}
deployment_configuration: ${{ matrix.service }}
openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
rocketchat_webhook: ${{ secrets.ROCKETCHAT_WEBHOOK }}

# docker pull ghcr.io/bcgov/dts-endorser-service@sha256:57f946ab1053726ac6fcb71c85a98d355e926904ebe26db4798353668b3f6c68

# docker pull ghcr.io/bcgov/dts-endorser-service/aries-endorser-api:sha-e237467
# docker pull ${{ inputs.github_image_name }}@${{ inputs.image_digest }}
# github_image_name: ${{ env.GITHUB_IMAGE_REPO }}${{ matrix.service }}
# GITHUB_IMAGE_REPO: ghcr.io/bcgov/dts-endorser-service
# docker pull ghcr.io/bcgov/dts-endorser-service
# github_image_name: ghcr.io/bcgov/dts-endorser-service
# docker push ghcr.io/bcgov/dts-endorser-service/aries-endorser-api
# rocketchat_webhook: ${{ secrets.ROCKETCHAT_WEBHOOK }}

# deploy2test:
# needs: [build, deploy2dev]
# deploy2dev:
# needs: build
# env:
# ENVIRONMENT: test
# ENVIRONMENT: dev
# permissions:
# packages: write
# runs-on: ubuntu-latest
# environment: test

# environment: dev
# strategy:
# # Serialize the deployments
# max-parallel: 1
# matrix:
# include:
# - service: aries-endorser-db
# - service: aries-endorser-agent
# - service: aries-endorser-backup
# - service: aries-endorser-proxy
# - service: aries-endorser-api

# steps:
# - name: Checkout
# uses: actions/checkout@v3

# - name: deploy to ${{ env.ENVIRONMENT }}
# uses: actions/checkout@v4
# - name: Deploy to ${{ env.ENVIRONMENT }}
# uses: ./.github/workflows/actions/deploy
# with:
# environment: ${{ env.ENVIRONMENT }}
# ghcr_token: ${{ secrets.GITHUB_TOKEN }}
# github_image_name: ${{ env.GITHUB_IMAGE_REPO }}${{ env.APP_NAME }}
# image_digest: ${{ needs.build.outputs.image_digest }}
# openshift_image_name: ${{ env.OPENSHIFT_IMAGE_REPO }}${{ env.APP_NAME }}
# github_image_name: ${{ env.GITHUB_IMAGE_REPO }}${{ matrix.service }}
# image_digest: ${{ needs.build.outputs[format ('{0}_digest', matrix.service)] }}
# openshift_image_name: ${{ env.OPENSHIFT_IMAGE_REPO }}${{ matrix.service }}
# openshift_server_url: ${{ vars.OPENSHIFT_SERVER_URL }}
# namespace: ${{ vars.NAMESPACE }}
# deployment_configuration: ${{ env.APP_NAME }}
# deployment_configuration: ${{ matrix.service }}
# openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
# rocketchat_webhook: ${{ secrets.ROCKETCHAT_WEBHOOK }}

# deploy2prod:
# needs: [build, deploy2dev, deploy2test]
# env:
# ENVIRONMENT: prod
# permissions:
# packages: write
# runs-on: ubuntu-latest
# environment: prod
# # docker pull ghcr.io/bcgov/dts-endorser-service@sha256:57f946ab1053726ac6fcb71c85a98d355e926904ebe26db4798353668b3f6c68

# steps:
# - name: Checkout
# uses: actions/checkout@v3
# # docker pull ghcr.io/bcgov/dts-endorser-service/aries-endorser-api:sha-e237467
# # docker pull ${{ inputs.github_image_name }}@${{ inputs.image_digest }}
# # github_image_name: ${{ env.GITHUB_IMAGE_REPO }}${{ matrix.service }}
# # GITHUB_IMAGE_REPO: ghcr.io/bcgov/dts-endorser-service
# # docker pull ghcr.io/bcgov/dts-endorser-service
# # github_image_name: ghcr.io/bcgov/dts-endorser-service
# # docker push ghcr.io/bcgov/dts-endorser-service/aries-endorser-api
# # rocketchat_webhook: ${{ secrets.ROCKETCHAT_WEBHOOK }}

# - name: deploy to prod
# uses: ./.github/workflows/actions/deploy
# with:
# environment: ${{ env.ENVIRONMENT }}
# ghcr_token: ${{ secrets.GITHUB_TOKEN }}
# github_image_name: ${{ env.GITHUB_IMAGE_REPO }}${{ env.APP_NAME }}
# image_digest: ${{ needs.build.outputs.image_digest }}
# openshift_image_name: ${{ env.OPENSHIFT_IMAGE_REPO }}${{ env.APP_NAME }}
# openshift_server_url: ${{ vars.OPENSHIFT_SERVER_URL }}
# namespace: ${{ vars.NAMESPACE }}
# deployment_configuration: ${{ env.APP_NAME }}
# openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
# rocketchat_webhook: ${{ secrets.ROCKETCHAT_WEBHOOK }}
# # deploy2test:
# # needs: [build, deploy2dev]
# # env:
# # ENVIRONMENT: test
# # permissions:
# # packages: write
# # runs-on: ubuntu-latest
# # environment: test

# # steps:
# # - name: Checkout
# # uses: actions/checkout@v3

# # - name: deploy to ${{ env.ENVIRONMENT }}
# # uses: ./.github/workflows/actions/deploy
# # with:
# # environment: ${{ env.ENVIRONMENT }}
# # ghcr_token: ${{ secrets.GITHUB_TOKEN }}
# # github_image_name: ${{ env.GITHUB_IMAGE_REPO }}${{ env.APP_NAME }}
# # image_digest: ${{ needs.build.outputs.image_digest }}
# # openshift_image_name: ${{ env.OPENSHIFT_IMAGE_REPO }}${{ env.APP_NAME }}
# # openshift_server_url: ${{ vars.OPENSHIFT_SERVER_URL }}
# # namespace: ${{ vars.NAMESPACE }}
# # deployment_configuration: ${{ env.APP_NAME }}
# # openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
# # rocketchat_webhook: ${{ secrets.ROCKETCHAT_WEBHOOK }}

# # deploy2prod:
# # needs: [build, deploy2dev, deploy2test]
# # env:
# # ENVIRONMENT: prod
# # permissions:
# # packages: write
# # runs-on: ubuntu-latest
# # environment: prod

# # steps:
# # - name: Checkout
# # uses: actions/checkout@v3

# # - name: deploy to prod
# # uses: ./.github/workflows/actions/deploy
# # with:
# # environment: ${{ env.ENVIRONMENT }}
# # ghcr_token: ${{ secrets.GITHUB_TOKEN }}
# # github_image_name: ${{ env.GITHUB_IMAGE_REPO }}${{ env.APP_NAME }}
# # image_digest: ${{ needs.build.outputs.image_digest }}
# # openshift_image_name: ${{ env.OPENSHIFT_IMAGE_REPO }}${{ env.APP_NAME }}
# # openshift_server_url: ${{ vars.OPENSHIFT_SERVER_URL }}
# # namespace: ${{ vars.NAMESPACE }}
# # deployment_configuration: ${{ env.APP_NAME }}
# # openshift_token: ${{ secrets.OPENSHIFT_TOKEN }}
# # rocketchat_webhook: ${{ secrets.ROCKETCHAT_WEBHOOK }}

# aries-endorser-db, aries-endorser-backup, aries-endorser-proxy, aries-endorser-api
# # aries-endorser-db, aries-endorser-backup, aries-endorser-proxy, aries-endorser-api

0 comments on commit b18148b

Please sign in to comment.