GitLab system status is available here and here

Commit ef3334d8 authored by Kabir Kwatra's avatar Kabir Kwatra
Browse files

fix(ci): Changed GitLab CI Build Tool to Kaniko for Rootless Runners

parent 305e0b6d
# Author: Kabir Kwatra <kabir@kwatra.me>
image: docker:19
services: ["docker:19-dind"]
variables:
DOCKER_TLS_CERTDIR: "/certs"
stages: [build]
before_script:
- docker info
- echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
build:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- docker pull $CI_REGISTRY_IMAGE:latest || true
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- >
for containerfile_path in $(ls .github/containerfiles/*.Containerfile); do
containerfile_name=${containerfile_path##*/}
container_tag=${containerfile_name%%.*}
container_fulltag="$CI_REGISTRY_IMAGE:$container_tag"
echo "Building $containerfile_name with tag $container_fulltag"
docker build \
/kaniko/executor \
--context $CI_PROJECT_DIR \
--dockerfile $containerfile_path \
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
--build-arg VCS_REF=`git rev-parse --short HEAD` \
--build-arg OCI_SRC_URL=$CI_PROJECT_URL \
--cache-from $container_fulltag \
-f $containerfile_path \
-t $container_fulltag \
.
docker push $container_fulltag
--destination $container_fulltag
done
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment