-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSample-call-build-and-deploy-workflow.yaml
More file actions
47 lines (46 loc) · 2.17 KB
/
Sample-call-build-and-deploy-workflow.yaml
File metadata and controls
47 lines (46 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# This is a sample template for calling a reusable workflow from NEDSS-Workflows public repository (Build-microservice-container.yaml)
# Whenever a push is made to the default (main) branch containing SNAPSHOT, the workflow is executed to build and store a container
# optional paths (or paths-ignore) can be set if you want to limit what changes can trigger the pipeline.
#
# NOTE: Set paths in order to restrict the workflow to run only when specific files are changed
#
# Manual variable edits.
# Edit:
# 1. <microservice_name>
# 2. <dockerfile_relative_path> to correctly identify your microservice and dockerfile path
# 3. <environment_classifier> - SNAPSHOT and build from main branch required for automated deployments
# 4. <update_helm_chart> - true or false, currently not in use
# 5. <values_file_with_path>
name: Build and Push SAMPLE NiFi image to ECR
on:
push:
branches:
- main
# paths:
# - '<microservice_path>/**'
jobs:
call-build-microservice-container-workflow:
uses: CDCgov/NEDSS-Workflows/.github/workflows/Build-other-microservice-container.yaml@main
with:
microservice_name: <microservice_name>
dockerfile_relative_path: <dockerfile_relative_path>
environment_classifier: <environment_classifier>
update_helm_chart: <update_helm_chart>
values_file_with_path: <values_file_with_path>
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: <microservice_name>
values_file_with_path: <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}}