Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gcloud to piped-base image #629

Merged
merged 1 commit into from
Aug 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dockers/piped-base/DOCKER_BUILD
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
version: 0.0.4
version: 0.0.5
registry: gcr.io/pipecd/piped-base
8 changes: 8 additions & 0 deletions dockers/piped-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@ FROM alpine:3.10.1

ENV PIPED_BIN_DIR=/usr/local/piped
ENV PATH="${PIPED_BIN_DIR}:${PATH}"
ENV CLOUDSDK_PYTHON=python3
ENV PATH /google-cloud-sdk/bin:$PATH

ADD install-helm.sh /installer/install-helm.sh
ADD install-kubectl.sh /installer/install-kubectl.sh
ADD install-kustomize.sh /installer/install-kustomize.sh
ADD install-gcloud.sh /installer/install-gcloud.sh

RUN \
apk add --no-cache \
ca-certificates \
git \
openssh \
python3 \
py3-crcmod \
gnupg \
curl \
bash && \
update-ca-certificates && \
Expand All @@ -22,6 +28,8 @@ RUN \
/installer/install-kubectl.sh && \
# Pre-install kustomize.
/installer/install-kustomize.sh && \
# Pre-install gcloud.
/installer/install-gcloud.sh && \
# Delete installer directory.
rm -rf /installer && \
rm -f /var/cache/apk/*
8 changes: 7 additions & 1 deletion dockers/piped-base/install-gcloud.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,10 @@ set -o errexit
set -o nounset
set -o pipefail

echo "Installing various versions of gcloud..."
BASE_URL="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads"
VERSION="305.0.0"

echo "Installing gcloud-${VERSION}..."
curl -L ${BASE_URL}/google-cloud-sdk-${VERSION}-linux-x86_64.tar.gz | tar xvz
gcloud components install beta
echo "Successfully installed gcloud-${VERSION}..."