workspaces-core-images/.gitlab-ci.yml

572 lines
27 KiB
YAML

image: docker
services:
- docker:dind
stages:
- build
- readme
variables:
DOCKER_AUTH_CONFIG: ${_DOCKER_AUTH_CONFIG}
before_script:
- docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD
- export SANITIZED_BRANCH="$(echo $CI_COMMIT_REF_NAME | sed -r 's#^release/##' | sed 's/\//_/g')"
- export SANITIZED_ROLLING_BRANCH=${SANITIZED_BRANCH}-rolling
# Jobs for the develop and release branches. They should push to the private and public repos
build_ubuntu_bionic:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-ubuntu-bionic-private:$SANITIZED_BRANCH -t ${ORG_NAME}/core-ubuntu-bionic-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-ubuntu-bionic:$SANITIZED_BRANCH -t ${ORG_NAME}/core-ubuntu-bionic:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE="ubuntu:18.04" --build-arg BG_IMG=bg_bionic.png -f dockerfile-kasm-core .
only:
- develop
- /^release\/.*$/
except:
- schedules
tags:
- aws-autoscale
build_ubuntu_focal:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-ubuntu-focal-private:$SANITIZED_BRANCH -t ${ORG_NAME}/core-ubuntu-focal-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-ubuntu-focal:$SANITIZED_BRANCH -t ${ORG_NAME}/core-ubuntu-focal:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg BASE_IMAGE="ubuntu:20.04" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_focal.png -f dockerfile-kasm-core .
only:
- develop
- /^release\/.*$/
except:
- schedules
tags:
- aws-autoscale
build_cuda_bionic:
stage: build
script:
- docker build -t ${ORG_NAME}/core-cuda-bionic-private:$SANITIZED_BRANCH -t ${ORG_NAME}/core-cuda-bionic-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-cuda-bionic:$SANITIZED_BRANCH -t ${ORG_NAME}/core-cuda-bionic:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE="nvidia/cuda:11.3.0-devel-ubuntu18.04" --build-arg BG_IMG=bg_bionic.png -f dockerfile-kasm-core .
- docker push ${ORG_NAME}/core-cuda-bionic-private:$SANITIZED_BRANCH
- docker push ${ORG_NAME}/core-cuda-bionic-private:$SANITIZED_ROLLING_BRANCH
- docker push ${ORG_NAME}/core-cuda-bionic:$SANITIZED_BRANCH
- docker push ${ORG_NAME}/core-cuda-bionic:$SANITIZED_ROLLING_BRANCH
only:
- develop
- /^release\/.*$/
except:
- schedules
build_cuda_focal:
stage: build
script:
- docker build -t ${ORG_NAME}/core-cuda-focal-private:$SANITIZED_BRANCH -t ${ORG_NAME}/core-cuda-focal-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-cuda-focal:$SANITIZED_BRANCH -t ${ORG_NAME}/core-cuda-focal:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg BASE_IMAGE="nvidia/cuda:11.6.0-devel-ubuntu20.04" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_focal.png -f dockerfile-kasm-core .
- docker push ${ORG_NAME}/core-cuda-focal-private:$SANITIZED_BRANCH
- docker push ${ORG_NAME}/core-cuda-focal-private:$SANITIZED_ROLLING_BRANCH
- docker push ${ORG_NAME}/core-cuda-focal:$SANITIZED_BRANCH
- docker push ${ORG_NAME}/core-cuda-focal:$SANITIZED_ROLLING_BRANCH
only:
- develop
- /^release\/.*$/
except:
- schedules
build_nvidia_focal:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-nvidia-focal-private:$SANITIZED_BRANCH -t ${ORG_NAME}/core-nvidia-focal-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-nvidia-focal:$SANITIZED_BRANCH -t ${ORG_NAME}/core-nvidia-focal:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg BASE_IMAGE="ubuntu:20.04" --build-arg BG_IMG=bg_focal.png -f dockerfile-kasm-core-nvidia .
tags:
- aws-autoscale
only:
- develop
- /^release\/.*$/
except:
- schedules
build_remnux_bionic:
stage: build
script:
- docker build -t ${ORG_NAME}/core-remnux-bionic-private:$SANITIZED_BRANCH -t ${ORG_NAME}/core-remnux-bionic-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-remnux-bionic:$SANITIZED_BRANCH -t ${ORG_NAME}/core-remnux-bionic:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE="remnux/remnux-distro:bionic" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_remnux.png --build-arg EXTRA_SH=remnux.sh -f dockerfile-kasm-core .
- docker push ${ORG_NAME}/core-remnux-bionic-private:$SANITIZED_BRANCH
- docker push ${ORG_NAME}/core-remnux-bionic-private:$SANITIZED_ROLLING_BRANCH
- docker push ${ORG_NAME}/core-remnux-bionic:$SANITIZED_BRANCH
- docker push ${ORG_NAME}/core-remnux-bionic:$SANITIZED_ROLLING_BRANCH
only:
- develop
- /^release\/.*$/
except:
- schedules
build_remnux_focal:
stage: build
script:
- docker build -t ${ORG_NAME}/core-remnux-focal-private:$SANITIZED_BRANCH -t ${ORG_NAME}/core-remnux-focal-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-remnux-focal:$SANITIZED_BRANCH -t ${ORG_NAME}/core-remnux-focal:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg BASE_IMAGE="remnux/remnux-distro:focal" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_remnux.png --build-arg EXTRA_SH=remnux.sh -f dockerfile-kasm-core .
- docker push ${ORG_NAME}/core-remnux-focal-private:$SANITIZED_BRANCH
- docker push ${ORG_NAME}/core-remnux-focal-private:$SANITIZED_ROLLING_BRANCH
- docker push ${ORG_NAME}/core-remnux-focal:$SANITIZED_BRANCH
- docker push ${ORG_NAME}/core-remnux-focal:$SANITIZED_ROLLING_BRANCH
only:
- develop
- /^release\/.*$/
except:
- schedules
tags:
- aws-autoscale
build_kali_rolling:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-kali-rolling-private:$SANITIZED_BRANCH -t ${ORG_NAME}/core-kali-rolling-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-kali-rolling:$SANITIZED_BRANCH -t ${ORG_NAME}/core-kali-rolling:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE="kalilinux/kali-rolling:latest" --build-arg START_PULSEAUDIO="1" --build-arg EXTRA_SH="kali.sh" --build-arg DISTRO="kali" --build-arg LANG="" --build-arg LANGUAGE="" --build-arg LC_ALL="" -f dockerfile-kasm-core .
only:
- develop
- /^release\/.*$/
except:
- schedules
tags:
- aws-autoscale
build_centos:
stage: build
script:
- docker build -t ${ORG_NAME}/core-centos-7-private:$SANITIZED_BRANCH -t ${ORG_NAME}/core-centos-7-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-centos-7:$SANITIZED_BRANCH -t ${ORG_NAME}/core-centos-7:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE="centos:centos7" --build-arg START_PULSEAUDIO="1" --build-arg START_XFCE4=1 --build-arg DISTRO="centos" --build-arg LANG="" --build-arg LANGUAGE="" --build-arg LC_ALL="" -f dockerfile-kasm-core-centos .
- docker push ${ORG_NAME}/core-centos-7-private:$SANITIZED_BRANCH
- docker push ${ORG_NAME}/core-centos-7-private:$SANITIZED_ROLLING_BRANCH
- docker push ${ORG_NAME}/core-centos-7:$SANITIZED_BRANCH
- docker push ${ORG_NAME}/core-centos-7:$SANITIZED_ROLLING_BRANCH
only:
- develop
- /^release\/.*$/
except:
- schedules
build_oracle_7:
stage: build
script:
- docker build -t ${ORG_NAME}/core-oracle-7-private:$SANITIZED_BRANCH -t ${ORG_NAME}/core-oracle-7-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-oracle-7:$SANITIZED_BRANCH -t ${ORG_NAME}/core-oracle-7:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE="oraclelinux:7" --build-arg START_PULSEAUDIO="1" --build-arg START_XFCE4="1" --build-arg DISTRO="oracle7" --build-arg LANG="" --build-arg LANGUAGE="" --build-arg LC_ALL="" -f dockerfile-kasm-core-oracle .
- docker push ${ORG_NAME}/core-oracle-7-private:$SANITIZED_BRANCH
- docker push ${ORG_NAME}/core-oracle-7-private:$SANITIZED_ROLLING_BRANCH
- docker push ${ORG_NAME}/core-oracle-7:$SANITIZED_BRANCH
- docker push ${ORG_NAME}/core-oracle-7:$SANITIZED_ROLLING_BRANCH
only:
- develop
- /^release\/.*$/
except:
- schedules
tags:
- aws-autoscale
build_oracle_8:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-oracle-8-private:$SANITIZED_BRANCH -t ${ORG_NAME}/core-oracle-8-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-oracle-8:$SANITIZED_BRANCH -t ${ORG_NAME}/core-oracle-8:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg START_XFCE4=1 --build-arg BASE_IMAGE="oraclelinux:8" --build-arg DISTRO="oracle8" -f dockerfile-kasm-core-oracle .
only:
- develop
- /^release\/.*$/
except:
- schedules
tags:
- aws-autoscale
build_opensuse_15:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-opensuse-15-private:$SANITIZED_BRANCH -t ${ORG_NAME}/core-opensuse-15-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-opensuse-15:$SANITIZED_BRANCH -t ${ORG_NAME}/core-opensuse-15:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg START_XFCE4=1 --build-arg BASE_IMAGE="opensuse/leap:15" --build-arg DISTRO="opensuse" -f dockerfile-kasm-core-suse .
only:
- develop
- /^release\/.*$/
except:
- schedules
tags:
- aws-autoscale
# These jobs should run on the feature/bugfix branches - anything that is not the develop or release branches. It should only push images to the private repos
build_ubuntu_bionic_dev:
image: ${ORG_NAME}/docker-buildx-private:develop
stage: build
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-ubuntu-bionic-private:$SANITIZED_BRANCH --build-arg BASE_IMAGE="ubuntu:18.04" --build-arg BG_IMG=bg_bionic.png -f dockerfile-kasm-core .
except:
- develop
- /^release\/.*$/
tags:
- aws-autoscale
build_ubuntu_focal_dev:
image: ${ORG_NAME}/docker-buildx-private:develop
stage: build
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-ubuntu-focal-private:$SANITIZED_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg BASE_IMAGE="ubuntu:20.04" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_focal.png -f dockerfile-kasm-core .
except:
- develop
- /^release\/.*$/
tags:
- aws-autoscale
build_cuda_bionic_dev:
stage: build
script:
- docker build -t ${ORG_NAME}/core-cuda-bionic-private:$SANITIZED_BRANCH --build-arg BASE_IMAGE="nvidia/cuda:11.3.0-devel-ubuntu18.04" --build-arg BG_IMG=bg_bionic.png -f dockerfile-kasm-core .
- docker push ${ORG_NAME}/core-cuda-bionic-private:$SANITIZED_BRANCH
except:
- develop
- /^release\/.*$/
build_cuda_focal_dev:
stage: build
script:
- docker build -t ${ORG_NAME}/core-cuda-focal-private:$SANITIZED_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg BASE_IMAGE="nvidia/cuda:11.6.0-devel-ubuntu20.04" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_focal.png -f dockerfile-kasm-core .
- docker push ${ORG_NAME}/core-cuda-focal-private:$SANITIZED_BRANCH
except:
- develop
- /^release\/.*$/
build_nvidia_focal_dev:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-nvidia-focal-private:$SANITIZED_BRANCH --build-arg BASE_IMAGE="ubuntu:20.04" --build-arg BG_IMG=bg_bionic.png -f dockerfile-kasm-core-nvidia .
tags:
- aws-autoscale
except:
- develop
- /^release\/.*$/
build_remnux_bionic_dev:
stage: build
script:
- docker build -t ${ORG_NAME}/core-remnux-bionic-private:$SANITIZED_BRANCH --build-arg BASE_IMAGE="remnux/remnux-distro:bionic" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_remnux.png --build-arg EXTRA_SH=remnux.sh -f dockerfile-kasm-core .
- docker push ${ORG_NAME}/core-remnux-bionic-private:$SANITIZED_BRANCH
except:
- develop
- /^release\/.*$/
build_remnux_focal_dev:
stage: build
script:
- docker build -t ${ORG_NAME}/core-remnux-focal-private:$SANITIZED_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg BASE_IMAGE="remnux/remnux-distro:focal" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_remnux.png --build-arg EXTRA_SH=remnux.sh -f dockerfile-kasm-core .
- docker push ${ORG_NAME}/core-remnux-focal-private:$SANITIZED_BRANCH
tags:
- aws-autoscale
except:
- develop
- /^release\/.*$/
build_kali_rolling_dev:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-kali-rolling-private:$SANITIZED_BRANCH --build-arg BASE_IMAGE="kalilinux/kali-rolling:latest" --build-arg START_PULSEAUDIO="1" --build-arg EXTRA_SH="kali.sh" --build-arg DISTRO="kali" --build-arg LANG="" --build-arg LANGUAGE="" --build-arg LC_ALL="" -f dockerfile-kasm-core .
except:
- develop
- /^release\/.*$/
tags:
- aws-autoscale
build_centos_dev:
stage: build
script:
- docker build -t ${ORG_NAME}/core-centos-7-private:$SANITIZED_BRANCH --build-arg BASE_IMAGE="centos:centos7" --build-arg START_PULSEAUDIO="1" --build-arg START_XFCE4=1 --build-arg DISTRO="centos" --build-arg LANG="" --build-arg LANGUAGE="" --build-arg LC_ALL="" -f dockerfile-kasm-core-centos .
- docker push ${ORG_NAME}/core-centos-7-private:$SANITIZED_BRANCH
except:
- develop
- /^release\/.*$/
build_oracle_7_dev:
stage: build
script:
- docker build -t ${ORG_NAME}/core-oracle-7-private:$SANITIZED_BRANCH --build-arg BASE_IMAGE="oraclelinux:7" --build-arg START_PULSEAUDIO="1" --build-arg START_XFCE4="1" --build-arg DISTRO="oracle7" --build-arg LANG="" --build-arg LANGUAGE="" --build-arg LC_ALL="" -f dockerfile-kasm-core-oracle .
- docker push ${ORG_NAME}/core-oracle-7-private:$SANITIZED_BRANCH
except:
- develop
- /^release\/.*$/
tags:
- aws-autoscale
build_oracle_8_dev:
image: ${ORG_NAME}/docker-buildx-private:develop
stage: build
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-oracle-8-private:$SANITIZED_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg START_XFCE4=1 --build-arg BASE_IMAGE="oraclelinux:8" --build-arg DISTRO="oracle8" -f dockerfile-kasm-core-oracle .
except:
- develop
- /^release\/.*$/
tags:
- aws-autoscale
build_opensuse_15_dev:
image: ${ORG_NAME}/docker-buildx-private:develop
stage: build
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-opensuse-15-private:$SANITIZED_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg START_XFCE4=1 --build-arg BASE_IMAGE="opensuse/leap:15" --build-arg DISTRO="opensuse" -f dockerfile-kasm-core-suse .
except:
- develop
- /^release\/.*$/
tags:
- aws-autoscale
# These jobs are for the "rolling" release of the images. They should only run for scheduled jobs and should only push the rolling tags
build_ubuntu_bionic_scheduled:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-ubuntu-bionic-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-ubuntu-bionic:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE="ubuntu:18.04" --build-arg BG_IMG=bg_bionic.png -f dockerfile-kasm-core .
only:
- schedules
tags:
- aws-autoscale
build_ubuntu_focal_scheduled:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-ubuntu-focal-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-ubuntu-focal:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg BASE_IMAGE="ubuntu:20.04" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_focal.png -f dockerfile-kasm-core .
only:
- schedules
tags:
- aws-autoscale
build_cuda_bionic_schedules:
stage: build
script:
- docker build -t ${ORG_NAME}/core-cuda-bionic-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-cuda-bionic:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE="nvidia/cuda:11.3.0-devel-ubuntu18.04" --build-arg BG_IMG=bg_bionic.png -f dockerfile-kasm-core .
- docker push ${ORG_NAME}/core-cuda-bionic-private:$SANITIZED_ROLLING_BRANCH
- docker push ${ORG_NAME}/core-cuda-bionic:$SANITIZED_ROLLING_BRANCH
only:
- schedules
build_cuda_focal_schedules:
stage: build
script:
- docker build -t ${ORG_NAME}/core-cuda-focal-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-cuda-focal:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg BASE_IMAGE="nvidia/cuda:11.6.0-devel-ubuntu20.04" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_focal.png -f dockerfile-kasm-core .
- docker push ${ORG_NAME}/core-cuda-focal-private:$SANITIZED_ROLLING_BRANCH
- docker push ${ORG_NAME}/core-cuda-focal:$SANITIZED_ROLLING_BRANCH
only:
- schedules
build_nvidia_focal_schedules:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-nvidia-focal-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-nvidia-focal:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE="ubuntu:20.04" --build-arg BG_IMG=bg_bionic.png -f dockerfile-kasm-core-nvidia .
tags:
- aws-autoscale
only:
- schedules
build_remnux_bionic_schedules:
stage: build
script:
- docker build -t ${ORG_NAME}/core-remnux-bionic-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-remnux-bionic:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE="remnux/remnux-distro:bionic" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_remnux.png --build-arg EXTRA_SH=remnux.sh -f dockerfile-kasm-core .
- docker push ${ORG_NAME}/core-remnux-bionic-private:$SANITIZED_ROLLING_BRANCH
- docker push ${ORG_NAME}/core-remnux-bionic:$SANITIZED_ROLLING_BRANCH
only:
- schedules
build_remnux_focal_schedules:
stage: build
script:
- docker build -t ${ORG_NAME}/core-remnux-focal-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-remnux-focal:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg BASE_IMAGE="remnux/remnux-distro:focal" --build-arg START_XFCE4=1 --build-arg BG_IMG=bg_remnux.png --build-arg EXTRA_SH=remnux.sh -f dockerfile-kasm-core .
- docker push ${ORG_NAME}/core-remnux-focal-private:$SANITIZED_ROLLING_BRANCH
- docker push ${ORG_NAME}/core-remnux-focal:$SANITIZED_ROLLING_BRANCH
tags:
- aws-autoscale
only:
- schedules
build_kali_rolling_schedules:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-kali-rolling-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-kali-rolling:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE="kalilinux/kali-rolling:latest" --build-arg START_PULSEAUDIO="1" --build-arg EXTRA_SH="kali.sh" --build-arg DISTRO="kali" --build-arg LANG="" --build-arg LANGUAGE="" --build-arg LC_ALL="" -f dockerfile-kasm-core .
only:
- schedules
tags:
- aws-autoscale
build_centos_schedules:
stage: build
script:
- docker build -t ${ORG_NAME}/core-centos-7-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-centos-7:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE="centos:centos7" --build-arg START_PULSEAUDIO="1" --build-arg START_XFCE4=1 --build-arg DISTRO="centos" --build-arg LANG="" --build-arg LANGUAGE="" --build-arg LC_ALL="" -f dockerfile-kasm-core-centos .
- docker push ${ORG_NAME}/core-centos-7-private:$SANITIZED_ROLLING_BRANCH
- docker push ${ORG_NAME}/core-centos-7:$SANITIZED_ROLLING_BRANCH
only:
- schedules
build_oracle_7_schedules:
stage: build
script:
- docker build -t ${ORG_NAME}/core-oracle-7-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-oracle-7:$SANITIZED_ROLLING_BRANCH --build-arg BASE_IMAGE="oraclelinux:7" --build-arg START_PULSEAUDIO="1" --build-arg START_XFCE4="1" --build-arg DISTRO="oracle7" --build-arg LANG="" --build-arg LANGUAGE="" --build-arg LC_ALL="" -f dockerfile-kasm-core-oracle .
- docker push ${ORG_NAME}/core-oracle-7-private:$SANITIZED_ROLLING_BRANCH
- docker push ${ORG_NAME}/core-oracle-7:$SANITIZED_ROLLING_BRANCH
only:
- schedules
tags:
- aws-autoscale
build_oracle_8_scheduled:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-oracle-8-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-oracle-8:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg START_XFCE4=1 --build-arg BASE_IMAGE="oraclelinux:8" --build-arg DISTRO="oracle8" -f dockerfile-kasm-core-oracle .
only:
- schedules
tags:
- aws-autoscale
build_opensuse_15_scheduled:
stage: build
image: ${ORG_NAME}/docker-buildx-private:develop
variables:
BUILD_PLATFORMS: "linux/amd64,linux/arm64"
script:
# get qemu ready
- docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
# prep the buildx env
- docker buildx create --use
# build for multiple architectures
- docker buildx build --push --platform $BUILD_PLATFORMS -t ${ORG_NAME}/core-opensuse-15-private:$SANITIZED_ROLLING_BRANCH -t ${ORG_NAME}/core-opensuse-15:$SANITIZED_ROLLING_BRANCH --build-arg START_PULSEAUDIO=1 --build-arg START_XFCE4=1 --build-arg BASE_IMAGE="opensuse/leap:15" --build-arg DISTRO="opensuse" -f dockerfile-kasm-core-suse .
only:
- schedules
tags:
- aws-autoscale
update_readmes:
stage: readme
script:
- apk add git
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@${README_TEMPLATE_REPO}
- sed -e "/{about}/r docs/$KASM_IMAGE/README.md" -e "/{about}/d" dockerhub-readme-template/TEMPLATE.md > docs/$KASM_IMAGE/FULL_README.md
- cat docs/$KASM_IMAGE/FULL_README.md
- docker run -v $PWD:/workspace -e DOCKER_USERNAME="$README_USERNAME" -e DOCKER_PASSWORD="$README_PASSWORD" -e DOCKERHUB_REPOSITORY="${ORG_NAME}/$KASM_IMAGE-private" -e README_FILEPATH="/workspace/docs/$KASM_IMAGE/FULL_README.md" -e DESCRIPTION_FILEPATH="/workspace/docs/$KASM_IMAGE/description.txt" ${ORG_NAME}/dockerhub-updater:latest
- docker run -v $PWD:/workspace -e DOCKER_USERNAME="$README_USERNAME" -e DOCKER_PASSWORD="$README_PASSWORD" -e DOCKERHUB_REPOSITORY="${ORG_NAME}/$KASM_IMAGE" -e README_FILEPATH="/workspace/docs/$KASM_IMAGE/FULL_README.md" -e DESCRIPTION_FILEPATH="/workspace/docs/$KASM_IMAGE/description.txt" ${ORG_NAME}/dockerhub-updater:latest
only:
variables:
- $README_USERNAME
- $README_PASSWORD
parallel:
matrix:
- KASM_IMAGE: [core-centos-7, core-oracle-7, core-oracle-8, core-opensuse-15, core-kali-rolling, core-remnux-bionic, core-remnux-focal, core-cuda-bionic, core-cuda-focal, core-ubuntu-bionic, core-ubuntu-focal, core-nvidia-focal]