Unverified Commit b1312f89 authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

build in kaniko

parent b3b9a371
......@@ -6,22 +6,18 @@ stages:
.build-image:
stage: publish
image: docker:stable
services:
- docker:dind
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASSWORD" "$REGISTRY"
- docker build --pull -t "$IMAGE_TAG" -f "$DOCKERFILE" --build-arg BUILD_WITH="$BUILD_WITH" .
- docker push "$IMAGE_TAG"
- docker logout
- mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/$DOCKERFILE --destination $IMAGE_TAG --build-arg BUILD_WITH="$BUILD_WITH"
build-latest:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:latest"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "kakadu graphicsmagick ffmpeg"
only:
......@@ -31,9 +27,6 @@ build-latest-vanilla:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:latest-vanilla"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: ""
only:
......@@ -43,9 +36,6 @@ build-latest-jp2:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:latest-jp2"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "kakadu"
only:
......@@ -55,9 +45,6 @@ build-latest-jp2-free:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:latest-jp2-free"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "openjpeg"
only:
......@@ -67,9 +54,6 @@ build-latest-video:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:latest-video"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "ffmpeg"
only:
......@@ -79,9 +63,6 @@ build-latest-images:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:latest-images"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "graphicsmagick"
only:
......@@ -91,9 +72,6 @@ build-latest-images-jp2:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:latest-images-jp2"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "graphicsmagick kakadu"
only:
......@@ -103,9 +81,6 @@ build-latest-images-jp2-free:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:latest-images-jp2-free"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "graphicsmagick openjpeg"
only:
......@@ -115,9 +90,6 @@ build-latest-all:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:latest-all"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "kakadu graphicsmagick ffmpeg"
only:
......@@ -127,9 +99,6 @@ build-latest-all-free:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:latest-all-free"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "openjpeg graphicsmagick ffmpeg"
only:
......@@ -139,9 +108,6 @@ build-version:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "kakadu graphicsmagick ffmpeg"
except:
......@@ -152,9 +118,6 @@ build-version-vanilla:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME-vanilla"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: ""
except:
......@@ -165,9 +128,6 @@ build-version-jp2:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME-jp2"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "kakadu"
except:
......@@ -178,9 +138,6 @@ build-version-jp2-free:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME-jp2-free"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "openjpeg"
except:
......@@ -191,9 +148,6 @@ build-version-video:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME-video"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "ffmpeg"
except:
......@@ -204,9 +158,6 @@ build-version-images:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME-images"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "graphicsmagick"
except:
......@@ -217,9 +168,6 @@ build-version-images-jp2:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME-images-jp2"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "graphicsmagick kakadu"
except:
......@@ -230,9 +178,6 @@ build-version-images-jp2-free:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME-images-jp2-free"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "graphicsmagick openjpeg"
except:
......@@ -243,9 +188,6 @@ build-version-all:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME-all"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "kakadu graphicsmagick ffmpeg"
except:
......@@ -256,9 +198,6 @@ build-version-all-free:
extends: .build-image
variables:
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME-all-free"
REGISTRY_PASSWORD: "$CI_REGISTRY_PASSWORD"
REGISTRY_USER: "$CI_REGISTRY_USER"
REGISTRY: "$CI_REGISTRY"
DOCKERFILE: "Dockerfile"
BUILD_WITH: "openjpeg graphicsmagick ffmpeg"
except:
......
Markdown is supported
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