Skip to content

Commit

Permalink
updated configs for core and workbench and updated workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
nipunarora-eGov committed Mar 2, 2024
1 parent be16c9d commit 3720803
Show file tree
Hide file tree
Showing 17 changed files with 340 additions and 38 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/mfe-common-ui-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: common ui service docker Image CI

on:
push:
branches: [ "mf-build-docker","mf-stable" ]
pull_request:
branches: [ "mf-build" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for tags and branches

- name: Set up environment variables
id: env
run: |
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "ACTION_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
echo "COMMIT_ID=${GITHUB_SHA: -8}" >> $GITHUB_ENV # Extract last 8 characters of SHA
- name: Build the Docker image
id: docker_build
working-directory: ./micro-ui/web/packages/common
run: |
IMAGE_TAG=egovio/common-ui:${{ env.BRANCH_NAME }}-${{ env.COMMIT_ID }}-${{ env.ACTION_NUMBER }}
docker build . \
--file docker/Dockerfile \
--tag $IMAGE_TAG
echo "::set-output name=image_name::$IMAGE_TAG"
- name: Login to Docker Hub and Push Docker Image
working-directory: ./micro-ui/web/packages/common
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: ${{ steps.docker_build.outputs.image_name }}
run: |
# Authenticate with Docker Hub
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# Push the image to Docker Hub
docker push $IMAGE_NAME
echo "Docker image pushed: $IMAGE_NAME"
2 changes: 1 addition & 1 deletion .github/workflows/mfe-core-ui-docker.yml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: core ui service docker Image CI

on:
push:
branches: [ "mf-build-docker", "mf-stable" ]
branches: [ "mf-build-docker","mf-stable" ]
pull_request:
branches: [ "mf-build" ]

Expand Down
25 changes: 21 additions & 4 deletions .github/workflows/mfe-dss-ui-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: dss ui service docker Image CI

on:
push:
branches: [ "mf-build-docker", "mf-stable" ]
branches: [ "mf-build-docker","mf-stable" ]
pull_request:
branches: [ "mf-build" ]

Expand All @@ -14,19 +14,36 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for tags and branches

- name: Set up environment variables
id: env
run: |
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "ACTION_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
echo "COMMIT_ID=${GITHUB_SHA: -8}" >> $GITHUB_ENV # Extract last 8 characters of SHA
- name: Build the Docker image
id: docker_build
working-directory: ./micro-ui/web/packages/dss
run: docker build . --file docker/Dockerfile --tag egovio/dss-ui:latest
run: |
IMAGE_TAG=egovio/dss-ui:${{ env.BRANCH_NAME }}-${{ env.COMMIT_ID }}-${{ env.ACTION_NUMBER }}
docker build . \
--file docker/Dockerfile \
--tag $IMAGE_TAG
echo "::set-output name=image_name::$IMAGE_TAG"
- name: Login to Docker Hub and Push Docker Image
working-directory: ./micro-ui/web/packages/dss
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: ${{ steps.docker_build.outputs.image_name }}
run: |
# Authenticate with Docker Hub
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# Push the image to Docker Hub
docker push egovio/dss-ui:latest
docker push $IMAGE_NAME
echo "Docker image pushed: $IMAGE_NAME"
49 changes: 49 additions & 0 deletions .github/workflows/mfe-engagement-ui-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: engagement ui service docker Image CI

on:
push:
branches: [ "mf-build-docker","mf-stable" ]
pull_request:
branches: [ "mf-build" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for tags and branches

- name: Set up environment variables
id: env
run: |
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "ACTION_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
echo "COMMIT_ID=${GITHUB_SHA: -8}" >> $GITHUB_ENV # Extract last 8 characters of SHA
- name: Build the Docker image
id: docker_build
working-directory: ./micro-ui/web/packages/engagement
run: |
IMAGE_TAG=egovio/engagement-ui:${{ env.BRANCH_NAME }}-${{ env.COMMIT_ID }}-${{ env.ACTION_NUMBER }}
docker build . \
--file docker/Dockerfile \
--tag $IMAGE_TAG
echo "::set-output name=image_name::$IMAGE_TAG"
- name: Login to Docker Hub and Push Docker Image
working-directory: ./micro-ui/web/packages/engagement
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: ${{ steps.docker_build.outputs.image_name }}
run: |
# Authenticate with Docker Hub
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# Push the image to Docker Hub
docker push $IMAGE_NAME
echo "Docker image pushed: $IMAGE_NAME"
49 changes: 49 additions & 0 deletions .github/workflows/mfe-fsm-ui-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: fsm ui service docker Image CI

on:
push:
branches: [ "mf-build-docker","mf-stable" ]
pull_request:
branches: [ "mf-build" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for tags and branches

- name: Set up environment variables
id: env
run: |
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "ACTION_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
echo "COMMIT_ID=${GITHUB_SHA: -8}" >> $GITHUB_ENV # Extract last 8 characters of SHA
- name: Build the Docker image
id: docker_build
working-directory: ./micro-ui/web/packages/fsm
run: |
IMAGE_TAG=egovio/fsm-ui:${{ env.BRANCH_NAME }}-${{ env.COMMIT_ID }}-${{ env.ACTION_NUMBER }}
docker build . \
--file docker/Dockerfile \
--tag $IMAGE_TAG
echo "::set-output name=image_name::$IMAGE_TAG"
- name: Login to Docker Hub and Push Docker Image
working-directory: ./micro-ui/web/packages/fsm
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: ${{ steps.docker_build.outputs.image_name }}
run: |
# Authenticate with Docker Hub
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# Push the image to Docker Hub
docker push $IMAGE_NAME
echo "Docker image pushed: $IMAGE_NAME"
25 changes: 21 additions & 4 deletions .github/workflows/mfe-hrms-ui-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: hrms ui service docker Image CI

on:
push:
branches: [ "mf-build-docker", "mf-stable" ]
branches: [ "mf-build-docker","mf-stable" ]
pull_request:
branches: [ "mf-build" ]

Expand All @@ -14,19 +14,36 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for tags and branches

- name: Set up environment variables
id: env
run: |
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "ACTION_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
echo "COMMIT_ID=${GITHUB_SHA: -8}" >> $GITHUB_ENV # Extract last 8 characters of SHA
- name: Build the Docker image
id: docker_build
working-directory: ./micro-ui/web/packages/hrms
run: docker build . --file docker/Dockerfile --tag egovio/hrms-ui:latest
run: |
IMAGE_TAG=egovio/hrms-ui:${{ env.BRANCH_NAME }}-${{ env.COMMIT_ID }}-${{ env.ACTION_NUMBER }}
docker build . \
--file docker/Dockerfile \
--tag $IMAGE_TAG
echo "::set-output name=image_name::$IMAGE_TAG"
- name: Login to Docker Hub and Push Docker Image
working-directory: ./micro-ui/web/packages/hrms
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: ${{ steps.docker_build.outputs.image_name }}
run: |
# Authenticate with Docker Hub
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# Push the image to Docker Hub
docker push egovio/hrms-ui:latest
docker push $IMAGE_NAME
echo "Docker image pushed: $IMAGE_NAME"
49 changes: 49 additions & 0 deletions .github/workflows/mfe-pgr-ui-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: pgr ui service docker Image CI

on:
push:
branches: [ "mf-build-docker" ,"mf-stable"]
pull_request:
branches: [ "mf-build" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for tags and branches

- name: Set up environment variables
id: env
run: |
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "ACTION_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
echo "COMMIT_ID=${GITHUB_SHA: -8}" >> $GITHUB_ENV # Extract last 8 characters of SHA
- name: Build the Docker image
id: docker_build
working-directory: ./micro-ui/web/packages/pgr
run: |
IMAGE_TAG=egovio/pgr-ui:${{ env.BRANCH_NAME }}-${{ env.COMMIT_ID }}-${{ env.ACTION_NUMBER }}
docker build . \
--file docker/Dockerfile \
--tag $IMAGE_TAG
echo "::set-output name=image_name::$IMAGE_TAG"
- name: Login to Docker Hub and Push Docker Image
working-directory: ./micro-ui/web/packages/pgr
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: ${{ steps.docker_build.outputs.image_name }}
run: |
# Authenticate with Docker Hub
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# Push the image to Docker Hub
docker push $IMAGE_NAME
echo "Docker image pushed: $IMAGE_NAME"
49 changes: 49 additions & 0 deletions .github/workflows/mfe-tqm-ui-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: tqm ui service docker Image CI

on:
push:
branches: [ "mf-build-docker" ,"mf-stable"]
pull_request:
branches: [ "mf-build" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for tags and branches

- name: Set up environment variables
id: env
run: |
echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
echo "ACTION_NUMBER=${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
echo "COMMIT_ID=${GITHUB_SHA: -8}" >> $GITHUB_ENV # Extract last 8 characters of SHA
- name: Build the Docker image
id: docker_build
working-directory: ./micro-ui/web/packages/tqm
run: |
IMAGE_TAG=egovio/tqm-ui:${{ env.BRANCH_NAME }}-${{ env.COMMIT_ID }}-${{ env.ACTION_NUMBER }}
docker build . \
--file docker/Dockerfile \
--tag $IMAGE_TAG
echo "::set-output name=image_name::$IMAGE_TAG"
- name: Login to Docker Hub and Push Docker Image
working-directory: ./micro-ui/web/packages/tqm
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_NAME: ${{ steps.docker_build.outputs.image_name }}
run: |
# Authenticate with Docker Hub
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
# Push the image to Docker Hub
docker push $IMAGE_NAME
echo "Docker image pushed: $IMAGE_NAME"
Loading

0 comments on commit 3720803

Please sign in to comment.