Skip to content

Release nnd-data-exchange-service image #7

Release nnd-data-exchange-service image

Release nnd-data-exchange-service image #7

name: Release nnd-data-exchange-service image
on:
workflow_dispatch:
inputs:
microservice_name:
description: "Microservice name matching your repository (ex. nnd-data-exchange-service)."
required: true
type: string
default: <microservicename>
dockerfile_relative_path:
description: "Relative path of your dockerfile, may include -f flag (ex. ./apps/<microservice>/Dockerfile)."
required: true
type: string
default: -f ./nnd-data-exchange-service/Dockerfile .
existing-image-tag:
description: "Image tag of existing container in ECR (not used if build-new-container=true)."
required: false
type: string
environment_classifier:
description: Metadata to append to application version (A setting of NONE, indicates all metadata to be stripped). Ex. if version=1.0.0, and environment_classifier=SNAPSHOT result will be 1.0.0-SNAPSHOT.<githubsha>. If version=1.0.0, and environment_classifier=NONE result will be 1.0.0.
required: true
type: string
default: SNAPSHOT
values_file_with_path:
description: What is the path to the helm chart in NBS helm chart repository? (ex. charts/nnd-service/values-int1.yaml)
type: string
default: "charts/<microservice>/<values_filename.yaml>"
build-new-container:
description: "Check the box to create a new container tagged based on the environment_classifier."
required: true
default: false
type: boolean
update_helm_chart:
description: "Do you want to update the specified helm chart"
required: true
default: true
type: boolean
jobs:
call-build-microservice-container-workflow:
uses: CDCgov/NEDSS-Workflows/.github/workflows/Release-gradle-microservice-container.yaml@main
with:
microservice_name: ${{inputs.microservice_name}}
existing-image-tag: ${{inputs.existing-image-tag}}
build-new-container: ${{inputs.build-new-container}}
dockerfile_relative_path: ${{inputs.dockerfile_relative_path}}
environment_classifier: ${{inputs.environment_classifier}}
secrets:
CDC_NBS_SANDBOX_SHARED_SERVICES_ACCOUNTID: ${{secrets.CDC_NBS_SANDBOX_SHARED_SERVICES_ACCOUNTID}}
ECR_REPO_BASE_NAME: ${{secrets.ECR_REPO_BASE_NAME}}
GIT_USER_EMAIL: ${{secrets.GIT_USER_EMAIL}}
GIT_USER_NAME: ${{secrets.GIT_USER_NAME}}
HELM_TOKEN: ${{secrets.HELM_TOKEN}}
call-update-helm:
needs: call-build-microservice-container-workflow
uses: CDCgov/NEDSS-Workflows/.github/workflows/Update-helm-charts.yaml@main
with:
microservice_name: ${{inputs.microservice_name}}
values_file_with_path: ${{inputs.values_file_with_path}}
new_image_tag: ${{ needs.call-build-microservice-container-workflow.outputs.output_image_tag }}
secrets:
GIT_USER_EMAIL: ${{secrets.GIT_USER_EMAIL}}
GIT_USER_NAME: ${{secrets.GIT_USER_NAME}}
HELM_TOKEN: ${{secrets.HELM_TOKEN}}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'gradle'
- name: create-data-sync-service-jar
working-directory: ./nnd-data-poll-service
run: ./gradlew build --no-daemon
- name: upload-data-sync-service-jar
uses: actions/upload-artifact@v4
with:
name: NND-data-sync-service-jar
path: nnd-data-poll-service/build/libs/data-sync-service.jar
- name: create-netss-message-processor-jar
working-directory: ./netss-message-processor
run: ./gradlew build --no-daemon
- name: upload-netss-message-processor-jar
uses: actions/upload-artifact@v4
with:
name: NETSS-message-processor-jar
path: netss-message-processor/build/libs/netss-message-processor.jar