-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildspec.yml
More file actions
74 lines (65 loc) · 1.83 KB
/
buildspec.yml
File metadata and controls
74 lines (65 loc) · 1.83 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
version: 0.2
env:
shell: /bin/bash
parameter-store:
DOCKERHUB_PASSWORD: /prod/sharedInfrastructure/dockerhub/password
DOCKERHUB_USERNAME: /prod/sharedInfrastructure/dockerhub/username
variables:
DOCKER_CLI_EXPERIMENTAL: enabled
batch:
fast-fail: true
build-graph:
- identifier: amd64
env:
compute-type: BUILD_GENERAL1_MEDIUM
privileged-mode: true
variables:
PLATFORMS: linux/amd64
ARCH: amd64
tag_suffix: -amd64
buildspec: buildspec-platform.yml
- identifier: arm64
env:
type: ARM_CONTAINER
image: aws/codebuild/amazonlinux2-aarch64-standard:3.0-24.06.07
compute-type: BUILD_GENERAL1_MEDIUM
privileged-mode: true
variables:
PLATFORMS: linux/arm64
ARCH: arm64
tag_suffix: -arm64
buildspec: buildspec-platform.yml
- identifier: manifest
env:
compute-type: BUILD_GENERAL1_MEDIUM
privileged-mode: true
depend-on:
- amd64
- arm64
phases:
pre_build:
commands:
- echo Logging in to Docker Hub...
- docker login --username $DOCKERHUB_USERNAME --password $DOCKERHUB_PASSWORD
build:
commands:
- IMAGE=joltdesign/php
- |
echo Creating manifests...
for VERSION in "8.2" "8.3" "8.4" "8.5"; do
for RUNTIME in "" "-apache"; do
for SUFFIX in "" "-dev"; do
TAG=${IMAGE}:${VERSION}${RUNTIME}${SUFFIX}
echo "Creating manifest for $TAG"
docker manifest create $TAG \
${TAG}-amd64 \
${TAG}-arm64
docker manifest push $TAG
done
done
done
finally:
- rm -rfv ~/.docker
post_build:
commands:
- echo Build completed at `date`