diff --git a/.github/workflows/push_trigger.yml b/.github/workflows/push_trigger.yml index 117dec98958..0d7b88cccce 100644 --- a/.github/workflows/push_trigger.yml +++ b/.github/workflows/push_trigger.yml @@ -71,7 +71,7 @@ jobs: - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} - fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message) + fields: repo,message,commit,workflow,job # selectable (default: repo,message) env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required if: failure() # Pick up events even if the job fails or is canceled. @@ -131,11 +131,14 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - name: Build image run: | cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} + docker build . --file Dockerfile --build-arg SOURCE=mosip --build-arg COMMIT_HASH=$(git rev-parse HEAD) --build-arg COMMIT_ID=$(git rev-parse --short HEAD) --build-arg BUILD_TIME=${{steps.date.outputs.date}} --tag ${{ env.SERVICE_NAME }} - name: Log into registry run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin @@ -154,11 +157,12 @@ jobs: - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} - fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message) + fields: repo,message,commit,workflow,job # selectable (default: repo,message) env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required if: failure() # Pick up events even if the job fails or is canceled. + publish_to_nexus_kernel_prereg: runs-on: ubuntu-latest @@ -218,9 +222,9 @@ jobs: - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} - fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message) + fields: repo,message,commit,workflow,job # selectable (default: repo,message) env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK2 }} # required if: failure() # Pick up events even if the job fails or is canceled. docker-registration-processor-external-stage: @@ -286,11 +290,14 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - name: Build image run: | cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} + docker build . --file Dockerfile --build-arg SOURCE=mosip --build-arg COMMIT_HASH=$(git rev-parse HEAD) --build-arg COMMIT_ID=$(git rev-parse --short HEAD) --build-arg BUILD_TIME=${{steps.date.outputs.date}} --tag ${{ env.SERVICE_NAME }} - name: Log into registry run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin @@ -310,7 +317,7 @@ jobs: - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} - fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message) + fields: repo,message,commit,workflow,job # selectable (default: repo,message) env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required if: failure() # Pick up events even if the job fails or is canceled. @@ -378,11 +385,14 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - name: Build image run: | cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} + docker build . --file Dockerfile --build-arg SOURCE=mosip --build-arg COMMIT_HASH=$(git rev-parse HEAD) --build-arg COMMIT_ID=$(git rev-parse --short HEAD) --build-arg BUILD_TIME=${{steps.date.outputs.date}} --tag ${{ env.SERVICE_NAME }} - name: Log into registry run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin @@ -402,7 +412,7 @@ jobs: - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} - fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message) + fields: repo,message,commit,workflow,job # selectable (default: repo,message) env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required if: failure() # Pick up events even if the job fails or is canceled. @@ -475,9 +485,9 @@ jobs: - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} - fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message) + fields: repo,message,commit,workflow,job # selectable (default: repo,message) env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK2 }} # required if: failure() # Pick up events even if the job fails or is canceled. # This workflow contains a single job for building and pushing biosdk service docker" @@ -550,11 +560,14 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - name: Build image run: | cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} + docker build . --file Dockerfile --build-arg SOURCE=mosip --build-arg COMMIT_HASH=$(git rev-parse HEAD) --build-arg COMMIT_ID=$(git rev-parse --short HEAD) --build-arg BUILD_TIME=${{steps.date.outputs.date}} --tag ${{ env.SERVICE_NAME }} - name: Log into registry run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin @@ -573,7 +586,7 @@ jobs: - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} - fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message) + fields: repo,message,commit,workflow,job # selectable (default: repo,message) env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required if: failure() # Pick up events even if the job fails or is canceled. @@ -638,9 +651,9 @@ jobs: - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} - fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message) + fields: repo,message,commit,workflow,job # selectable (default: repo,message) env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK2 }} # required if: failure() # Pick up events even if the job fails or is canceled. @@ -692,11 +705,14 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - name: Build image run: | cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} + docker build . --file Dockerfile --build-arg SOURCE=mosip --build-arg COMMIT_HASH=$(git rev-parse HEAD) --build-arg COMMIT_ID=$(git rev-parse --short HEAD) --build-arg BUILD_TIME=${{steps.date.outputs.date}} --tag ${{ env.SERVICE_NAME }} - name: Log into registry run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin @@ -715,7 +731,7 @@ jobs: - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} - fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message) + fields: repo,message,commit,workflow,job # selectable (default: repo,message) env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required if: failure() # Pick up events even if the job fails or is canceled. @@ -768,11 +784,14 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - name: Build image run: | cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} + docker build . --file Dockerfile --build-arg SOURCE=mosip --build-arg COMMIT_HASH=$(git rev-parse HEAD) --build-arg COMMIT_ID=$(git rev-parse --short HEAD) --build-arg BUILD_TIME=${{steps.date.outputs.date}} --tag ${{ env.SERVICE_NAME }} - name: Log into registry run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin @@ -791,7 +810,7 @@ jobs: - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} - fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message) + fields: repo,message,commit,workflow,job # selectable (default: repo,message) env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required if: failure() # Pick up events even if the job fails or is canceled. @@ -823,11 +842,14 @@ jobs: run: | # Strip git ref prefix from version echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%Y-%m-%d')" - name: Build image run: | cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} + docker build . --file Dockerfile --build-arg SOURCE=mosip --build-arg COMMIT_HASH=$(git rev-parse HEAD) --build-arg COMMIT_ID=$(git rev-parse --short HEAD) --build-arg BUILD_TIME=${{steps.date.outputs.date}} --tag ${{ env.SERVICE_NAME }} - name: Log into registry run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin @@ -847,7 +869,7 @@ jobs: - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} - fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message) + fields: repo,message,commit,workflow,job # selectable (default: repo,message) env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required if: failure() # Pick up events even if the job fails or is canceled. @@ -916,8 +938,8 @@ jobs: - uses: 8398a7/action-slack@v3 with: status: ${{ job.status }} - fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message) + fields: repo,message,commit,workflow,job # selectable (default: repo,message) env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} # required - if: failure() # Pick up events even if the job fails or is canceled. + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK2 }} # required + if: failure() # Pick up events even if the job fails or is canceled. diff --git a/admin-ui/Dockerfile b/admin-ui/Dockerfile index 42a9abc1b46..c9b5bb9080d 100644 --- a/admin-ui/Dockerfile +++ b/admin-ui/Dockerfile @@ -1,6 +1,15 @@ # base image FROM nginx +ARG SOURCE +ARG COMMIT_HASH +ARG COMMIT_ID +ARG BUILD_TIME +LABEL source=${SOURCE} +LABEL commit_hash=${COMMIT_HASH} +LABEL commit_id=${COMMIT_ID} +LABEL build_time=${BUILD_TIME} + ENV base_path=/usr/share/nginx/html ENV i18n_path=${base_path}/assets/i18n diff --git a/biosdk-services/Dockerfile b/biosdk-services/Dockerfile index 594dd57771d..caa174f2469 100644 --- a/biosdk-services/Dockerfile +++ b/biosdk-services/Dockerfile @@ -1,5 +1,14 @@ FROM openjdk:11 +ARG SOURCE +ARG COMMIT_HASH +ARG COMMIT_ID +ARG BUILD_TIME +LABEL source=${SOURCE} +LABEL commit_hash=${COMMIT_HASH} +LABEL commit_id=${COMMIT_ID} +LABEL build_time=${BUILD_TIME} + ARG biosdk_zip_url ENV biosdk_zip_file_path=${biosdk_zip_url} diff --git a/keycloak/Dockerfile b/keycloak/Dockerfile index efef94c4091..c8211ecc550 100644 --- a/keycloak/Dockerfile +++ b/keycloak/Dockerfile @@ -1,5 +1,14 @@ FROM jboss/keycloak:9.0.0 +ARG SOURCE +ARG COMMIT_HASH +ARG COMMIT_ID +ARG BUILD_TIME +LABEL source=${SOURCE} +LABEL commit_hash=${COMMIT_HASH} +LABEL commit_id=${COMMIT_ID} +LABEL build_time=${BUILD_TIME} + ADD --chown=jboss:root ./theme/ ./theme RUN cp -R ./theme/mosip /opt/jboss/keycloak/themes/mosip diff --git a/pre-registration-booking-service/Dockerfile b/pre-registration-booking-service/Dockerfile index b86294b9075..b20528a6c46 100644 --- a/pre-registration-booking-service/Dockerfile +++ b/pre-registration-booking-service/Dockerfile @@ -1,5 +1,14 @@ FROM openjdk:11 +ARG SOURCE +ARG COMMIT_HASH +ARG COMMIT_ID +ARG BUILD_TIME +LABEL source=${SOURCE} +LABEL commit_hash=${COMMIT_HASH} +LABEL commit_id=${COMMIT_ID} +LABEL build_time=${BUILD_TIME} + # can be passed during Docker build as build time environment for github branch to pickup configuration from. ARG spring_config_label diff --git a/pre-registration-ui/Dockerfile b/pre-registration-ui/Dockerfile index 244a8441098..ca215143ddd 100644 --- a/pre-registration-ui/Dockerfile +++ b/pre-registration-ui/Dockerfile @@ -1,5 +1,14 @@ FROM nginx +ARG SOURCE +ARG COMMIT_HASH +ARG COMMIT_ID +ARG BUILD_TIME +LABEL source=${SOURCE} +LABEL commit_hash=${COMMIT_HASH} +LABEL commit_id=${COMMIT_ID} +LABEL build_time=${BUILD_TIME} + ENV base_path=/usr/share/nginx/html ENV i18n_path=${base_path}/assets/i18n diff --git a/registration-processor/registration-processor-external-integration-service/Dockerfile b/registration-processor/registration-processor-external-integration-service/Dockerfile index 829b29237ea..0cf058f7dc2 100644 --- a/registration-processor/registration-processor-external-integration-service/Dockerfile +++ b/registration-processor/registration-processor-external-integration-service/Dockerfile @@ -1,5 +1,14 @@ FROM openjdk:11 +ARG SOURCE +ARG COMMIT_HASH +ARG COMMIT_ID +ARG BUILD_TIME +LABEL source=${SOURCE} +LABEL commit_hash=${COMMIT_HASH} +LABEL commit_id=${COMMIT_ID} +LABEL build_time=${BUILD_TIME} + #Uncomment below and Comment above line(i.e. FROM openjdk:8) for OS specific (e.g. Alpine OS ) docker base image #FROM openjdk:8-jdk-alpine diff --git a/registration-processor/registration-processor-external-stage/Dockerfile b/registration-processor/registration-processor-external-stage/Dockerfile index 7cd2b28c35e..f0849e9b6c9 100644 --- a/registration-processor/registration-processor-external-stage/Dockerfile +++ b/registration-processor/registration-processor-external-stage/Dockerfile @@ -1,5 +1,14 @@ FROM openjdk:11 +ARG SOURCE +ARG COMMIT_HASH +ARG COMMIT_ID +ARG BUILD_TIME +LABEL source=${SOURCE} +LABEL commit_hash=${COMMIT_HASH} +LABEL commit_id=${COMMIT_ID} +LABEL build_time=${BUILD_TIME} + #Uncomment below and Comment above line(i.e. FROM openjdk:8) for OS specific (e.g. Alpine OS ) docker base image #FROM openjdk:8-jdk-alpine