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 26, 2024
1 parent 3a9cb1c commit 62d9bc1
Showing 1 changed file with 45 additions and 45 deletions.
90 changes: 45 additions & 45 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ jobs:
SOURCE_IMAGE_TAG: ""
REGISTRY_USERNAME_SECRET_NAME: ARTIFACTORY_USERNAME
REGISTRY_PASSWORD_SECRET_NAME: ARTIFACTORY_PASSWORD
- service: aries-endorser-db
GIT_REPO_URL: hyperledger/aries-endorser-service
GIT_REF: ""
PATH: docker/wallet/config
SOURCE_IMAGE_REGISTRY: "quay.io/"
SOURCE_IMAGE_NAME: "fedora/postgresql-13"
SOURCE_IMAGE_TAG: "13"
# - service: aries-endorser-db
# GIT_REPO_URL: hyperledger/aries-endorser-service
# GIT_REF: ""
# PATH: docker/wallet/config
# SOURCE_IMAGE_REGISTRY: "quay.io/"
# SOURCE_IMAGE_NAME: "fedora/postgresql-13"
# SOURCE_IMAGE_TAG: "13"
- service: aries-endorser-backup
GIT_REPO_URL: BCDevOps/backup-container
GIT_REF: ""
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
aries-endorser-backup_digest: ${{ steps.digest.outputs.aries-endorser-backup_digest }}
aries-endorser-api_digest: ${{ steps.digest.outputs.aries-endorser-api_digest }}
aries-endorser-proxy_digest: ${{ steps.digest.outputs.aries-endorser-proxy_digest }}
aries-endorser-db_digest: ${{ steps.digests.outputs.aries-endorser-db_digest }}
# aries-endorser-db_digest: ${{ steps.digests.outputs.aries-endorser-db_digest }}

steps:
- name: Checkout
Expand Down Expand Up @@ -144,37 +144,37 @@ jobs:
SOURCE_IMAGE_TAG: ${{ matrix.SOURCE_IMAGE_TAG }}
file: ${{ matrix.SOURCE_CONTEXT_DIR }}/${{ matrix.DOCKER_FILE_PATH }}

- name: Extract Tags
id: extract
if: contains(fromJSON('["aries-endorser-db"]'), matrix.service)
run: echo "tags=$(echo '${{ steps.meta.outputs.tags }}' | grep -oE ':([^[:space:]]+)' | sed '/workflow/d' | sed 's/://g' | tr '\n' ' ')" >> $GITHUB_OUTPUT
# - name: Extract Tags
# id: extract
# if: contains(fromJSON('["aries-endorser-db"]'), matrix.service)
# run: echo "tags=$(echo '${{ steps.meta.outputs.tags }}' | grep -oE ':([^[:space:]]+)' | sed '/workflow/d' | sed 's/://g' | tr '\n' ' ')" >> $GITHUB_OUTPUT

- name: Pull database image
if: contains(fromJSON('["aries-endorser-db"]'), matrix.service)
run: |
docker pull ${{ matrix.SOURCE_IMAGE_REGISTRY }}${{ matrix.SOURCE_IMAGE_NAME }}:${{ matrix.SOURCE_IMAGE_TAG }}
# - name: Pull database image
# if: contains(fromJSON('["aries-endorser-db"]'), matrix.service)
# run: |
# docker pull ${{ matrix.SOURCE_IMAGE_REGISTRY }}${{ matrix.SOURCE_IMAGE_NAME }}:${{ matrix.SOURCE_IMAGE_TAG }}

- name: Build database image
id: build_image
if: contains(fromJSON('["aries-endorser-db"]'), matrix.service)
uses: redhat-actions/s2i-build@v2
with:
path_context: ${{ matrix.PATH }}
# Builder image for a java projectE_IMAG
builder_image: ${{ matrix.SOURCE_IMAGE_REGISTRY }}${{ matrix.SOURCE_IMAGE_NAME }}:${{ matrix.SOURCE_IMAGE_TAG }}
image: ${{ env.GITHUB_IMAGE_REPO }}${{ matrix.service }}
tags: ${{ steps.extract.outputs.tags }}
# - name: Build database image
# id: build_image
# if: contains(fromJSON('["aries-endorser-db"]'), matrix.service)
# uses: redhat-actions/s2i-build@v2
# with:
# path_context: ${{ matrix.PATH }}
# # Builder image for a java projectE_IMAG
# builder_image: ${{ matrix.SOURCE_IMAGE_REGISTRY }}${{ matrix.SOURCE_IMAGE_NAME }}:${{ matrix.SOURCE_IMAGE_TAG }}
# image: ${{ env.GITHUB_IMAGE_REPO }}${{ matrix.service }}
# tags: ${{ steps.extract.outputs.tags }}

- name: Push database image
id: push
if: contains(fromJSON('["aries-endorser-db"]'), matrix.service)
uses: redhat-actions/push-to-registry@v2
with:
tags: ${{ steps.build_image.outputs.tags }}
image: ${{ steps.build_image.outputs.image }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ${{ env.GITHUB_IMAGE_REPO }}
# - name: Push database image
# id: push
# if: contains(fromJSON('["aries-endorser-db"]'), matrix.service)
# uses: redhat-actions/push-to-registry@v2
# with:
# tags: ${{ steps.build_image.outputs.tags }}
# image: ${{ steps.build_image.outputs.image }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}
# registry: ${{ env.GITHUB_IMAGE_REPO }}

- name: Log in to the GHCR
uses: docker/login-action@v3
Expand All @@ -194,14 +194,14 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
outputs: type=image,name=target

- name: Display ${{ matrix.service }} image results
id: digests
if: contains(fromJSON('["aries-endorser-db"]'), matrix.service)
run: |
echo "registry_path=${{ steps.push.outputs.registry-paths }}"
digest=${{ steps.push.outputs.digest }}
echo "digest=${digest}"
echo "${{ matrix.service }}_digest=${digest}" >> $GITHUB_OUTPUT
# - name: Display ${{ matrix.service }} image results
# id: digests
# if: contains(fromJSON('["aries-endorser-db"]'), matrix.service)
# run: |
# echo "registry_path=${{ steps.push.outputs.registry-paths }}"
# digest=${{ steps.push.outputs.digest }}
# echo "digest=${digest}"
# echo "${{ matrix.service }}_digest=${digest}" >> $GITHUB_OUTPUT

- name: Display ${{ matrix.service}} image results
id: digest
Expand All @@ -226,7 +226,7 @@ jobs:
max-parallel: 1
matrix:
include:
- service: aries-endorser-db
# - service: aries-endorser-db
- service: aries-endorser-agent
- service: aries-endorser-backup
- service: aries-endorser-proxy
Expand Down

0 comments on commit 62d9bc1

Please sign in to comment.