forked from cryostatio/cryostat-openshift-console-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bash
More file actions
executable file
·28 lines (21 loc) · 691 Bytes
/
build.bash
File metadata and controls
executable file
·28 lines (21 loc) · 691 Bytes
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
#!/usr/bin/env bash
set -xe
DIR="$(dirname "$(readlink -f "$0")")"
IMAGE_NAMESPACE=${IMAGE_NAMESPACE:-quay.io/cryostat}
IMAGE_NAME=${IMAGE_NAME:-cryostat-openshift-console-plugin}
IMAGE_TAG=${IMAGE_TAG:-latest}
MANIFEST="${IMAGE_NAMESPACE}/${IMAGE_NAME}:${IMAGE_TAG}"
PUSH_MANIFEST=${PUSH_MANIFEST:-false}
if podman manifest exists "${MANIFEST}"; then
podman manifest rm "${MANIFEST}"
fi
podman buildx build \
--platform="${PLATFORMS:-linux/amd64,linux/arm64}" \
--manifest "${MANIFEST}" \
--file "${DIR}/Dockerfile" \
--pull=always \
--ignorefile "${DIR}/.dockerignore" \
"${DIR}"
if [ "${PUSH_MANIFEST}" = "true" ]; then
podman push "${MANIFEST}"
fi