mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
eae221f9e5
These were always showing up as dev due to the build arg not being set by the drone step. Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
20 lines
611 B
Bash
Executable File
20 lines
611 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
cd $(dirname $0)/..
|
|
|
|
. ./scripts/version.sh
|
|
|
|
TAG=${TAG:-${VERSION_TAG}${SUFFIX}}
|
|
REPO=${REPO:-rancher}
|
|
IMAGE_NAME=${IMAGE_NAME:-k3s}
|
|
|
|
IMAGE=${REPO}/${IMAGE_NAME}:${TAG}
|
|
PROXY_OPTS=
|
|
[ -z "$http_proxy" ] || PROXY_OPTS="$PROXY_OPTS --build-arg http_proxy=$http_proxy"
|
|
[ -z "$https_proxy" ] || PROXY_OPTS="$PROXY_OPTS --build-arg https_proxy=$https_proxy"
|
|
[ -z "$no_proxy" ] || PROXY_OPTS="$PROXY_OPTS --build-arg no_proxy=$no_proxy"
|
|
docker build ${PROXY_OPTS} --build-arg DRONE_TAG=${VERSION_TAG} -t ${IMAGE} -f package/Dockerfile .
|
|
./scripts/image_scan.sh ${IMAGE} ${ARCH}
|
|
echo Built ${IMAGE}
|