Loading .gitlab-ci.yml +12 −1 Original line number Diff line number Diff line variables: DOCKER_DRIVER: overlay2 HELM_VERSION: 2.14.0 KUBERNETES_VERSION: 1.11.10 BUILD_IMAGE_NAME: "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA" services: Loading @@ -16,9 +19,17 @@ build: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" script: - docker build --tag "$BUILD_IMAGE_NAME" . - docker build --build-arg "HELM_VERSION=$HELM_VERSION" --build-arg "KUBERNETES_VERSION=$KUBERNETES_VERSION" --tag "$BUILD_IMAGE_NAME" . - docker push "$BUILD_IMAGE_NAME" test_dependencies: stage: test image: "$BUILD_IMAGE_NAME" script: - helm version --client - tiller -version - kubectl version --client test_kube_domain: stage: test image: "$BUILD_IMAGE_NAME" Loading Dockerfile +5 −0 Original line number Diff line number Diff line FROM alpine:latest ARG HELM_VERSION ARG KUBERNETES_VERSION COPY src/ build/ RUN build/install_dependencies.sh src/install_dependencies.sh 0 → 100755 +14 −0 Original line number Diff line number Diff line #! /bin/sh apk add -U openssl curl tar gzip bash ca-certificates git curl -sSL -o /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub curl -sSL -O https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk apk add glibc-2.28-r0.apk rm glibc-2.28-r0.apk curl -sS "https://kubernetes-helm.storage.googleapis.com/helm-v${HELM_VERSION}-linux-amd64.tar.gz" | tar zx mv linux-amd64/helm /usr/bin/ mv linux-amd64/tiller /usr/bin/ curl -sSL -o /usr/bin/kubectl "https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES_VERSION}/bin/linux/amd64/kubectl" chmod +x /usr/bin/kubectl Loading
.gitlab-ci.yml +12 −1 Original line number Diff line number Diff line variables: DOCKER_DRIVER: overlay2 HELM_VERSION: 2.14.0 KUBERNETES_VERSION: 1.11.10 BUILD_IMAGE_NAME: "$CI_REGISTRY_IMAGE/$CI_COMMIT_REF_SLUG:$CI_COMMIT_SHA" services: Loading @@ -16,9 +19,17 @@ build: before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" script: - docker build --tag "$BUILD_IMAGE_NAME" . - docker build --build-arg "HELM_VERSION=$HELM_VERSION" --build-arg "KUBERNETES_VERSION=$KUBERNETES_VERSION" --tag "$BUILD_IMAGE_NAME" . - docker push "$BUILD_IMAGE_NAME" test_dependencies: stage: test image: "$BUILD_IMAGE_NAME" script: - helm version --client - tiller -version - kubectl version --client test_kube_domain: stage: test image: "$BUILD_IMAGE_NAME" Loading
Dockerfile +5 −0 Original line number Diff line number Diff line FROM alpine:latest ARG HELM_VERSION ARG KUBERNETES_VERSION COPY src/ build/ RUN build/install_dependencies.sh
src/install_dependencies.sh 0 → 100755 +14 −0 Original line number Diff line number Diff line #! /bin/sh apk add -U openssl curl tar gzip bash ca-certificates git curl -sSL -o /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub curl -sSL -O https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk apk add glibc-2.28-r0.apk rm glibc-2.28-r0.apk curl -sS "https://kubernetes-helm.storage.googleapis.com/helm-v${HELM_VERSION}-linux-amd64.tar.gz" | tar zx mv linux-amd64/helm /usr/bin/ mv linux-amd64/tiller /usr/bin/ curl -sSL -o /usr/bin/kubectl "https://storage.googleapis.com/kubernetes-release/release/v${KUBERNETES_VERSION}/bin/linux/amd64/kubectl" chmod +x /usr/bin/kubectl