1
0

added kubectl to image

This commit is contained in:
Hanjo Meinhardt 2018-08-24 14:12:11 +02:00 committed by Hanjo Meinhardt
parent a9a4291fcb
commit d926063a6e
2 changed files with 12 additions and 7 deletions

View File

@ -1,21 +1,21 @@
pipeline:
build:
image: alpine:edge
commands:
- sed -i 's@<VERSION>@${VERSION}@' Dockerfile
docker:
image: plugins/docker
repo: bunix42/google-cloud-sdk
build_args:
- BASE_IMAGE=google/cloud-sdk:${VERSION}
- KUBECTL_VERSION=${KUBECTL_VERSION}
tags:
- ${VERSION}
- ${VERSION}_kubectl-${KUBECTL_VERSION}
secrets: [ docker_username, docker_password ]
when:
branch: master
matrix:
VERSION:
- 193.0.0-alpine
- 193.0.0-alpine
KUBECTL_VERSION:
- v1.9.10
- v1.10.7
- v1.11.2

View File

@ -3,3 +3,8 @@ FROM $BASE_IMAGE
RUN apk add -U --no-cache openssl
# download and install kubectl
ARG KUBECTL_VERSION
RUN curl -L https://storage.googleapis.com/kubernetes-release/release/$KUBECTL_VERSION/bin/linux/amd64/kubectl -o /usr/bin/kubectl \
&& chmod +x /usr/bin/kubectl