Skip to content

Commit eaf5392

Browse files
authored
feat: add flag to disable provenance for lambda images (#376)
## Description AWS Lambdas don't like multi-architecture builds. This allows disabling that to get the image format needed
1 parent ea87f23 commit eaf5392

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

src/commands/track/update_track.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ parameters:
103103
description: push the image to the registry
104104
type: boolean
105105
default: true
106+
disable_provenance:
107+
description: disable provenance for image. necessary for lambda images
108+
type: boolean
109+
default: false
106110
steps:
107111
- when:
108112
condition: << parameters.checkout >>
@@ -157,4 +161,5 @@ steps:
157161
UPDATE_TRACK_FILE: << parameters.update_track_file >>
158162
ENABLE_PUSH: "<< parameters.enable_push >>"
159163
SEM_VER_OVERRIDE: "<< parameters.sem_ver_override >>"
164+
DISABLE_PROVENANCE: "<< parameters.disable_provenance >>"
160165
command: <<include(scripts/track/update_track.sh)>>

src/jobs/track/update_track.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ parameters:
107107
description: Determines if the track file will be updated or not
108108
type: boolean
109109
default: true
110+
disable_provenance:
111+
description: disable provenance for image. necessary for lambda images
112+
type: boolean
113+
default: false
110114
steps:
111115
- update_track:
112116
image_repo: "<< parameters.image_repo >>"
@@ -134,3 +138,4 @@ steps:
134138
update_track_file: "<< parameters.update_track_file >>"
135139
enable_push: "<< parameters.enable_push >>"
136140
sem_ver_override: "<< parameters.sem_ver_override >>"
141+
disable_provenance: "<< parameters.disable_provenance >>"

src/scripts/track/update_track.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ echo "ENABLE_CACHE_TO: ${ENABLE_CACHE_TO:=0}"
1919
echo "ENABLE_LOAD: ${ENABLE_LOAD:=0}"
2020
echo "ENABLE_PUSH: ${ENABLE_PUSH:=0}"
2121
echo "UPDATE_TRACK_FILE: ${UPDATE_TRACK_FILE:=0}"
22+
echo "DISABLE_PROVENANCE: ${DISABLE_PROVENANCE:=0}"
2223

2324
# force string to array
2425
read -r -a EXTRA_BUILD_ARGS <<<"$EXTRA_BUILD_ARGS"
@@ -129,6 +130,10 @@ if [[ $IMAGE_EXISTS == "false" || "$CIRCLE_BRANCH" == "master" || "$CIRCLE_BRANC
129130
OUTPUT_ARGS+=(--load)
130131
fi
131132

133+
if ((DISABLE_PROVENANCE)); then
134+
OUTPUT_ARGS+=(--provenance=false)
135+
fi
136+
132137
NPM_TOKEN_SECRET=(--secret id=NPM_TOKEN)
133138

134139
CACHE_FROM_ARG=(--cache-from "${IMAGE_REPO-}:cache-master")

0 commit comments

Comments
 (0)