generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (66 loc) · 1.99 KB
/
feature-branch.yml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Feature Branch
run-name: Feature - ${{ github.head_ref || github.ref_name }}
on:
push:
branches-ignore:
- main
pull_request:
types:
- reopened
jobs:
test:
name: Test
uses: ./.github/workflows/test.yml
static-analysis:
name: Static Analysis
needs: test
uses: ./.github/workflows/static-analysis.yml
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
build-and-push:
name: Build
uses: ./.github/workflows/build.yml
with:
ECR_REGION: ${{vars.ECR_REGION}}
ECR_REPOSITORY: ${{vars.ECR_REPOSITORY}}
secrets:
ECR_ROLE_TO_ASSUME: ${{ secrets.ECR_ROLE_TO_ASSUME }}
scan-image:
uses: ./.github/workflows/scan-image.yml
needs: build-and-push
with:
ECR_REPOSITORY: ${{vars.ECR_REPOSITORY}}
ECR_REGION: ${{vars.ECR_REGION}}
secrets:
ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }}
ECR_ROLE_TO_ASSUME: ${{ secrets.ECR_ROLE_TO_ASSUME }}
deploy-dev:
name: Dev
uses: ./.github/workflows/deploy-dev.yml
needs: build-and-push
with:
environment: dev
ECR_REGION: ${{vars.ECR_REGION}}
ECR_REPOSITORY: ${{vars.ECR_REPOSITORY}}
secrets:
ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }}
ECR_ROLE_TO_ASSUME: ${{ secrets.ECR_ROLE_TO_ASSUME }}
KUBE_CERT: ${{ secrets.KUBE_CERT }}
KUBE_CLUSTER: ${{ secrets.KUBE_CLUSTER }}
KUBE_NAMESPACE: ${{ secrets.KUBE_NAMESPACE }}
KUBE_TOKEN: ${{ secrets.KUBE_TOKEN }}
deploy-uat:
name: UAT
uses: ./.github/workflows/deploy.yml
needs: [build-and-push, static-analysis, test]
with:
environment: uat
ECR_REGION: ${{vars.ECR_REGION}}
ECR_REPOSITORY: ${{vars.ECR_REPOSITORY}}
secrets:
ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }}
ECR_ROLE_TO_ASSUME: ${{ secrets.ECR_ROLE_TO_ASSUME }}
KUBE_CERT: ${{ secrets.KUBE_CERT }}
KUBE_CLUSTER: ${{ secrets.KUBE_CLUSTER }}
KUBE_NAMESPACE: ${{ secrets.KUBE_NAMESPACE }}
KUBE_TOKEN: ${{ secrets.KUBE_TOKEN }}