Skip to content

Commit

Permalink
add gitlab runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikke Schirén committed Jan 17, 2024
1 parent 278c5c3 commit eb37966
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
image: docker:20.10.16
workflow:
rules:
- if: $CI_COMMIT_BRANCH
- if: $CI_COMMIT_TAG
variables:
DOCKER_HOST: tcp://docker:2376
DOCKER_TLS_CERTDIR: "/certs"
DOCKER_TLS_VERIFY: 1
DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client"
TAG: $CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA
IMAGE_NAME: "$IMAGE:$TAG"
DOCKER_IMAGE: "$IMAGE_NAME"
KANIKO_CACHE_ARGS: ""

stages:
- build

image:build:release:
stage: build
rules:
- if: $CI_COMMIT_BRANCH
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- mkdir -p /kaniko/.docker
- cat $DOCKER_AUTH_CONFIG > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile Dockerfile --destination $IMAGE:$TAG

0 comments on commit eb37966

Please sign in to comment.