-
Notifications
You must be signed in to change notification settings - Fork 31
156 lines (148 loc) · 5.11 KB
/
build.yaml
File metadata and controls
156 lines (148 loc) · 5.11 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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
name: Build
on:
workflow_call:
inputs:
mode:
required: true
type: string
default: snapshot
description: |
the mode to use. either `snapshot` or `release`. Will affect effective version, as well
as target-oci-registry.
jobs:
prepare:
uses: gardener/cc-utils/.github/workflows/prepare.yaml@master
with:
mode: ${{ inputs.mode }}
post-process: callback
permissions:
id-token: write
pull-requests: write # required until https://github.com/gardener/cc-utils/pull/1529 is merged
oci-images:
name: Build OCI-Images
needs:
- prepare
permissions:
contents: read
packages: write
id-token: write
secrets: inherit
uses: gardener/cc-utils/.github/workflows/oci-ocm.yaml@master
strategy:
matrix:
args:
- name: tm-base-image
target: base-step
oci-repository: testmachinery/base-step
- name: tm-controller
target: tm-controller
oci-repository: testmachinery/testmachinery-controller
- name: tm-run
target: tm-run
oci-repository: testmachinery/testmachinery-run
- name: tm-bot
target: tm-bot
oci-repository: testmachinery/bot
- name: tm-prepare-image
target: tm-prepare
oci-repository: testmachinery/prepare-step
with:
name: ${{ matrix.args.name }}
version: ${{ needs.prepare.outputs.version }}
target: ${{ matrix.args.target }}
oci-registry: ${{ needs.prepare.outputs.oci-registry }}
oci-repository: ${{ matrix.args.oci-repository }}
oci-platforms: linux/amd64
extra-tags: latest
helmcharts:
name: Build Helmcharts
needs:
- prepare
- oci-images
permissions:
contents: read
packages: write
id-token: write
uses: gardener/cc-utils/.github/workflows/helmchart-ocm.yaml@master
strategy:
matrix:
args:
- name: testmachinery
dir: charts/testmachinery
oci-repository: testmachinery/charts
ocm-mappings:
- ref: ocm-resource:argo-workflow-controller.repository
attribute: argo.images.argoWorkflowController.repository
- ref: ocm-resource:argo-workflow-controller.tag
attribute: argo.images.argoWorkflowController.tag
- ref: ocm-resource:argo-executor.repository
attribute: argo.images.argoExecutor.repository
- ref: ocm-resource:argo-executor.tag
attribute: argo.images.argoExecutor.tag
- ref: ocm-resource:argo-server.repository
attribute: argo.images.argoServer.repository
- ref: ocm-resource:argo-server.tag
attribute: argo.images.argoServer.tag
- ref: ocm-resource:tm-controller.repository
attribute: tm.images.controller.repository
- ref: ocm-resource:tm-controller.tag
attribute: tm.images.controller.tag
- ref: ocm-resource:tm-base-image.repository
attribute: tm.images.base.repository
- ref: ocm-resource:tm-base-image.tag
attribute: tm.images.base.tag
- ref: ocm-resource:tm-prepare-image.repository
attribute: tm.images.prepare.repository
- ref: ocm-resource:tm-prepare-image.tag
attribute: tm.images.prepare.tag
- ref: ocm-resource:valitail.repository
attribute: logging.valitail.image.repository
- ref: ocm-resource:valitail.tag
attribute: logging.valitail.image.tag
- ref: ocm-resource:vali.repository
attribute: logging.vali.image.repository
- ref: ocm-resource:vali.tag
attribute: logging.vali.image.tag
- name: testmachinery-bot
dir: charts/tm-bot
oci-repository: testmachinery/charts
ocm-mappings:
- ref: ocm-resource:tm-bot.repository
attribute: bot.image
- ref: ocm-resource:tm-bot.tag
attribute: bot.tag
with:
name: ${{ matrix.args.name }}
dir: ${{ matrix.args.dir }}
oci-registry: ${{ needs.prepare.outputs.oci-registry }}
oci-repository: ${{ matrix.args.oci-repository }}
ocm-mappings: ${{ toJSON(matrix.args.ocm-mappings) }}
test:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write # required to remove labels
strategy:
matrix:
args:
- run: .ci/test
- run: .ci/test-definitions
steps:
- uses: azure/setup-kubectl@v4
- uses: gardener/cc-utils/.github/actions/trusted-checkout@master
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: run-test
shell: bash
run: |
set -euo pipefail
${{ matrix.args.run }}
sast-lint:
uses: gardener/cc-utils/.github/workflows/sastlint-ocm.yaml@master
permissions:
contents: read
with:
linter: gosec
run: .ci/check
go-version-file: go.mod