Skip to content

Commit bb139ee

Browse files
committed
chore: Update CI to use hardened resource images
1 parent 333fe30 commit bb139ee

File tree

2 files changed

+49
-46
lines changed

2 files changed

+49
-46
lines changed

ci/docker/entrypoint.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,6 @@ start_docker() {
9393

9494
local docker_opts="${DOCKER_OPTS:-}"
9595

96-
# Pass through `--garden-mtu` from gardian container
97-
if [[ "${docker_opts}" != *'--mtu'* ]]; then
98-
local mtu="$(cat /sys/class/net/$(ip route get 8.8.8.8|awk '{ print $5 }')/mtu)"
99-
docker_opts+=" --mtu ${mtu}"
100-
fi
101-
10296
# Use Concourse's scratch volume to bypass the graph filesystem by default
10397
if [[ "${docker_opts}" != *'--data-root'* ]] && [[ "${docker_opts}" != *'--graph'* ]]; then
10498
docker_opts+=' --data-root /scratch/docker'
@@ -169,4 +163,4 @@ if [[ "$#" != "0" ]]; then
169163
"$@"
170164
else
171165
bash --login
172-
fi
166+
fi

ci/pipeline.yml

Lines changed: 48 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,16 @@ env-cf: &env-cf
1111
CF_STACK: cflinuxfs4
1212

1313
node-image: &node-image
14-
type: docker-image
15-
source:
16-
repository: node
17-
tag: 20-bullseye-slim
18-
14+
platform: linux
15+
image_resource:
16+
type: registry-image
17+
source:
18+
aws_access_key_id: ((ecr-aws-key))
19+
aws_secret_access_key: ((ecr-aws-secret))
20+
repository: pages-node-v20
21+
aws_region: us-gov-west-1
22+
tag: latest
23+
1924
cf-image: &cf-image
2025
platform: linux
2126
image_resource:
@@ -30,9 +35,7 @@ cf-image: &cf-image
3035
test-redirects: &test-redirects
3136
- task: install-dependencies
3237
config:
33-
platform: linux
34-
image_resource:
35-
<<: *node-image
38+
<<: *node-image
3639
inputs: [name: src]
3740
outputs: [name: src]
3841
run:
@@ -42,9 +45,7 @@ test-redirects: &test-redirects
4245

4346
- task: build
4447
config:
45-
platform: linux
46-
image_resource:
47-
<<: *node-image
48+
<<: *node-image
4849
inputs: [name: src]
4950
outputs: [name: src]
5051
run:
@@ -58,9 +59,13 @@ test-redirects: &test-redirects
5859
config:
5960
platform: linux
6061
image_resource:
61-
type: docker-image
62+
type: registry-image
6263
source:
63-
repository: karlkfi/concourse-dcind
64+
aws_access_key_id: ((ecr-aws-key))
65+
aws_secret_access_key: ((ecr-aws-secret))
66+
repository: pages-dind-v25
67+
aws_region: us-gov-west-1
68+
tag: latest
6469
inputs:
6570
- name: src
6671
run:
@@ -138,9 +143,6 @@ jobs:
138143
resource: src
139144
trigger: true
140145
params: { depth: 1 }
141-
- put: gh-status
142-
inputs: [src]
143-
params: { state: pending }
144146
- do: *test-redirects
145147

146148
- task: deploy
@@ -166,9 +168,6 @@ jobs:
166168

167169
on_failure:
168170
in_parallel:
169-
- put: gh-status
170-
inputs: [src]
171-
params: { state: failure }
172171
- put: slack
173172
params:
174173
text: |
@@ -179,9 +178,6 @@ jobs:
179178
icon_url: ((slack-icon-url))
180179
on_success:
181180
in_parallel:
182-
- put: gh-status
183-
inputs: [src]
184-
params: { state: success }
185181
- put: slack
186182
params:
187183
text: |
@@ -250,31 +246,44 @@ resources:
250246
source:
251247
url: ((slack-webhook-url))
252248

253-
- name: gh-status
254-
type: cogito
255-
check_every: 1h
256-
source:
257-
owner: cloud-gov
258-
repo: pages-redirects
259-
access_token: ((gh-access-token))
260-
context_prefix: concourse
261249

262250
############################
263251
# RESOURCE TYPES
264252

265253
resource_types:
266-
- name: cogito
267-
type: docker-image
268-
check_every: 24h
254+
255+
- name: git
256+
type: registry-image
269257
source:
270-
repository: pix4d/cogito
258+
aws_access_key_id: ((ecr_aws_key))
259+
aws_secret_access_key: ((ecr_aws_secret))
260+
repository: git-resource
261+
aws_region: us-gov-west-1
262+
tag: latest
263+
264+
- name: slack-notification
265+
type: registry-image
266+
source:
267+
aws_access_key_id: ((ecr_aws_key))
268+
aws_secret_access_key: ((ecr_aws_secret))
269+
repository: slack-notification-resource
270+
aws_region: us-gov-west-1
271+
tag: latest
271272

272273
- name: pull-request
273-
type: docker-image
274+
type: registry-image
274275
source:
275-
repository: teliaoss/github-pr-resource
276+
aws_access_key_id: ((ecr_aws_key))
277+
aws_secret_access_key: ((ecr_aws_secret))
278+
repository: github-pr-resource
279+
aws_region: us-gov-west-1
280+
tag: latest
276281

277-
- name: slack-notification
278-
type: docker-image
282+
- name: time
283+
type: registry-image
279284
source:
280-
repository: cfcommunity/slack-notification-resource
285+
aws_access_key_id: ((ecr_aws_key))
286+
aws_secret_access_key: ((ecr_aws_secret))
287+
repository: time-resource
288+
aws_region: us-gov-west-1
289+
tag: latest

0 commit comments

Comments
 (0)