Skip to content

Commit bfce99b

Browse files
PI-2770 move to gha
1 parent 87e1349 commit bfce99b

7 files changed

+147
-212
lines changed

.circleci/config.yml

-211
This file was deleted.

.github/workflows/pipeline.yml

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: Pipeline [test -> build -> deploy]
2+
on:
3+
push:
4+
branches:
5+
- '**'
6+
workflow_dispatch:
7+
inputs:
8+
additional_docker_tag:
9+
description: Additional docker tag that can be used to specify stable or testing tags
10+
required: false
11+
default: ''
12+
type: string
13+
push:
14+
description: Push docker image to registry flag
15+
required: true
16+
default: false
17+
type: boolean
18+
permissions:
19+
contents: read
20+
packages: write
21+
concurrency:
22+
group: ${{ github.workflow }}-${{ github.ref }}
23+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
24+
jobs:
25+
node_build:
26+
name: node build
27+
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_build.yml@v2 # WORKFLOW_VERSION
28+
secrets: inherit
29+
node_unit_tests:
30+
name: node unit tests
31+
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_unit_tests.yml@v2 # WORKFLOW_VERSION
32+
needs: [node_build]
33+
secrets: inherit
34+
node_integration_tests:
35+
name: node integration tests
36+
uses: ministryofjustice/hmpps-github-actions/.github/workflows/node_integration_tests.yml@v2 # WORKFLOW_VERSION
37+
needs: [node_build]
38+
secrets: inherit
39+
helm_lint:
40+
strategy:
41+
matrix:
42+
environments: ['dev', 'preprod', 'prod']
43+
name: helm lint
44+
uses: ministryofjustice/hmpps-github-actions/.github/workflows/test_helm_lint.yml@v2 # WORKFLOW_VERSION
45+
secrets: inherit
46+
with:
47+
environment: ${{ matrix.environments }}
48+
build:
49+
name: Build docker image from hmpps-github-actions
50+
if: github.ref == 'refs/heads/main'
51+
uses: ministryofjustice/hmpps-github-actions/.github/workflows/docker_build.yml@v2 # WORKFLOW_VERSION
52+
needs:
53+
- node_integration_tests
54+
- node_unit_tests
55+
with:
56+
docker_registry: 'ghcr.io'
57+
registry_org: 'ministryofjustice'
58+
additional_docker_tag: ${{ inputs.additional_docker_tag }}
59+
push: ${{ inputs.push || true }}
60+
docker_multiplatform: true
61+
deploy_dev:
62+
name: Deploy to the dev environment
63+
if: github.ref == 'refs/heads/main'
64+
needs:
65+
- build
66+
- helm_lint
67+
uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@v2 # WORKFLOW_VERSION
68+
secrets: inherit
69+
with:
70+
environment: 'dev'
71+
app_version: '${{ needs.build.outputs.app_version }}'
72+
helm_timeout: '5m'
73+
deploy_preprod:
74+
name: Deploy to the preprod environment
75+
if: github.ref == 'refs/heads/main'
76+
needs:
77+
- build
78+
- helm_lint
79+
uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@v2 # WORKFLOW_VERSION
80+
secrets: inherit
81+
with:
82+
environment: 'preprod'
83+
app_version: '${{ needs.build.outputs.app_version }}'
84+
helm_timeout: '5m'
85+
deploy_prod:
86+
name: Deploy to the preprod environment
87+
if: github.ref == 'refs/heads/main'
88+
needs:
89+
- build
90+
- helm_lint
91+
- deploy_dev
92+
- deploy_preprod
93+
uses: ministryofjustice/hmpps-github-actions/.github/workflows/deploy_env.yml@v2 # WORKFLOW_VERSION
94+
secrets: inherit
95+
with:
96+
environment: 'prod'
97+
app_version: '${{ needs.build.outputs.app_version }}'
98+
helm_timeout: '5m'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Security npm dependency check
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: "6 4 * * MON-FRI" # Every weekday at 04:06 UTC
6+
jobs:
7+
security-npm-dependency-check:
8+
name: Project security npm dependency check
9+
uses: ministryofjustice/hmpps-github-actions/.github/workflows/security_npm_dependency.yml@v2 # WORKFLOW_VERSION
10+
with:
11+
channel_id: ${{ vars.SECURITY_ALERTS_SLACK_CHANNEL_ID || 'NO_SLACK' }}
12+
secrets: inherit

.github/workflows/security_trivy.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Security trivy dependency check
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: "6 4 * * MON-FRI" # Every weekday at 04:06 UTC
6+
jobs:
7+
security-kotlin-trivy-check:
8+
name: Project security trivy dependency check
9+
uses: ministryofjustice/hmpps-github-actions/.github/workflows/security_trivy.yml@v2 # WORKFLOW_VERSION
10+
with:
11+
channel_id: ${{ vars.SECURITY_ALERTS_SLACK_CHANNEL_ID || 'NO_SLACK' }}
12+
secrets: inherit
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Security veracode pipeline scan
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: "6 4 * * MON-FRI" # Every weekday at 04:06 UTC
6+
jobs:
7+
security-veracode-pipeline-scan:
8+
name: Project security veracode pipeline scan
9+
uses: ministryofjustice/hmpps-github-actions/.github/workflows/security_veracode_pipeline_scan.yml@v2 # WORKFLOW_VERSION
10+
with:
11+
channel_id: ${{ vars.SECURITY_ALERTS_SLACK_CHANNEL_ID || 'NO_SLACK' }}
12+
secrets: inherit
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Security veracode policy scan
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: "25 4 * * 1" # Every Monday at 04:25 UTC
6+
jobs:
7+
security-veracode-policy-check:
8+
name: Project security veracode policy scan
9+
uses: ministryofjustice/hmpps-github-actions/.github/workflows/security_veracode_policy_scan.yml@v2 # WORKFLOW_VERSION
10+
with:
11+
channel_id: ${{ vars.SECURITY_ALERTS_SLACK_CHANNEL_ID || 'NO_SLACK' }}
12+
secrets: inherit

helm_deploy/hmpps-tier-ui/values.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ generic-service:
55
replicaCount: 4
66

77
image:
8-
repository: quay.io/hmpps/hmpps-tier-ui
8+
repository: ghcr.io/ministryofjustice/hmpps-tier-ui
99
tag: app_version # override at deployment time
1010
port: 3000
1111

0 commit comments

Comments
 (0)