-
Notifications
You must be signed in to change notification settings - Fork 211
/
Copy pathpipeline.sh
executable file
·32 lines (26 loc) · 955 Bytes
/
pipeline.sh
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
#!/bin/bash -ex
EE=${EE:-false}
if [ -z "$SNAPSHOT" ]; then
SNAPSHOT_ARGUMENT=""
else
SNAPSHOT_ARGUMENT="--build-arg SNAPSHOT=${SNAPSHOT}"
fi
if [ -z "$VERSION" ]; then
VERSION_ARGUMENT=""
else
VERSION_ARGUMENT="--build-arg VERSION=${VERSION}"
fi
IMAGE_NAME=camunda/camunda-bpm-platform:${DISTRO}-${PLATFORM}
docker buildx build . \
-t "${IMAGE_NAME}" \
--platform linux/${PLATFORM} \
--build-arg DISTRO=${DISTRO} \
--build-arg EE=${EE} \
--build-arg USER=${NEXUS_USER} \
--build-arg PASSWORD=${NEXUS_PASS} \
${VERSION_ARGUMENT} \
${SNAPSHOT_ARGUMENT} \
--cache-to type=gha,scope="$GITHUB_REF_NAME-$DISTRO-image" \
--cache-from type=gha,scope="$GITHUB_REF_NAME-$DISTRO-image" \
--load
docker inspect "${IMAGE_NAME}" | grep "Architecture" -A2