mirror of
https://github.com/kasmtech/workspaces-core-images.git
synced 2025-08-16 09:37:53 +02:00
Resolve KASM-3718 "Feature/ gate images 2"
This commit is contained in:
committed by
Matthew McClaskey
parent
e849325091
commit
515b86b8fe
18
ci-scripts/build.sh
Executable file
18
ci-scripts/build.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Parse input ##
|
||||
NAME1=$(echo $1| awk -F'|' '{print $1}')
|
||||
NAME2=$(echo $1| awk -F'|' '{print $2}')
|
||||
BASE=$(echo $1| awk -F'|' '{print $3}')
|
||||
BG=$(echo $1| awk -F'|' '{print $4}')
|
||||
DISTRO=$(echo $1| awk -F'|' '{print $5}')
|
||||
DOCKERFILE=$(echo $1| awk -F'|' '{print $6}')
|
||||
|
||||
## Build/Push image to cache endpoint by pipeline ID ##
|
||||
docker build \
|
||||
-t ${ORG_NAME}/image-cache-private:$(arch)-core-${NAME1}-${NAME2}-${SANITIZED_BRANCH}-${CI_PIPELINE_ID} \
|
||||
--build-arg BASE_IMAGE="${BASE}" \
|
||||
--build-arg DISTRO="${DISTRO}" \
|
||||
--build-arg BG_IMG="${BG}" \
|
||||
-f ${DOCKERFILE} .
|
||||
docker push ${ORG_NAME}/image-cache-private:$(arch)-core-${NAME1}-${NAME2}-${SANITIZED_BRANCH}-${CI_PIPELINE_ID}
|
Reference in New Issue
Block a user