Skip to content

Commit 415d459

Browse files
authored
Use docker bake (#117)
1 parent d1c49bf commit 415d459

File tree

3 files changed

+6
-21
lines changed

3 files changed

+6
-21
lines changed

.github/workflows/docker-bake.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ on:
44
push:
55
branches:
66
- main
7-
- jp-bake
87
pull_request:
98
branches:
109
- main
11-
- jp-bake
1210

1311
concurrency:
1412
group: ${{ github.workflow }}-${{ github.ref_name }}

buildspec.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,14 @@ phases:
77
build:
88
commands:
99
- echo Build started on `date`
10-
- cd parent
11-
- make build-docker
12-
- CONTAINER_ID=$(docker create parent-vault:latest)
13-
- docker cp $CONTAINER_ID:/app/parent-vault ./parent-vault
14-
- docker rm $CONTAINER_ID
15-
- cd ../enclave
16-
- make build-docker
10+
- docker buildx bake
1711
- echo Build completed on `date`
1812
post_build:
1913
commands:
2014
- '[ ${CODEBUILD_BUILD_SUCCEEDING:-0} -eq 1 ] || exit 1'
15+
- CONTAINER_ID=$(docker create parent-vault:latest)
16+
- docker cp $CONTAINER_ID:/app/parent-vault ./parent-vault
17+
- docker rm $CONTAINER_ID
2118
- echo "${PRIVATE_KEY}" > nitro_vault_key.pem
2219
- openssl req -new -key nitro_vault_key.pem -sha384 -nodes -subj "/CN=AWS/C=US/ST=WA/L=Seattle/O=Amazon/OU=AWS" -out nitro_vault_csr.pem
2320
- openssl x509 -req -days 365 -in nitro_vault_csr.pem -out nitro_vault_cert.pem -sha384 -signkey nitro_vault_key.pem
@@ -29,8 +26,8 @@ phases:
2926
artifacts:
3027
discard-paths: yes
3128
files:
32-
- parent/parent-vault # Used by Deploy:DeployVault
33-
- enclave/enclave-vault.eif # Used by Deploy:DeployVault
29+
- parent-vault # Used by Deploy:DeployVault
30+
- enclave-vault.eif # Used by Deploy:DeployVault
3431
- vault_template.yml # Used by Deploy:DeployVault
3532
- vault_template_configuration.json # Used by Deploy:DeployVault
3633

docker-bake.hcl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,8 @@ target "parent" {
88
args = {
99
TARGETPLATFORM = "x86_64-unknown-linux-gnu"
1010
}
11-
attest = [
12-
"type=provenance,mode=max",
13-
"type=sbom",
14-
]
1511
platforms = ["linux/amd64"]
1612
tags = ["parent-vault:latest"]
17-
output = ["type=cacheonly"]
1813
cache-to = ["type=gha,ignore-error=true,mode=max,scope=parent"]
1914
cache-from = ["type=gha,scope=parent"]
2015
}
@@ -25,13 +20,8 @@ target "enclave" {
2520
args = {
2621
TARGETPLATFORM = "x86_64-unknown-linux-musl"
2722
}
28-
attest = [
29-
"type=provenance,mode=max",
30-
"type=sbom",
31-
]
3223
platforms = ["linux/amd64"]
3324
tags = ["enclave-vault:latest"]
34-
output = ["type=cacheonly"]
3525
cache-to = ["type=gha,ignore-error=true,mode=max,scope=enclave"]
3626
cache-from = ["type=gha,scope=enclave"]
3727
}

0 commit comments

Comments
 (0)