Skip to content

Commit

Permalink
kubectl install direct and use only auth plugin from gcloud (#28501)
Browse files Browse the repository at this point in the history
  • Loading branch information
volatilemolotov committed Sep 19, 2023
1 parent 3402490 commit 8f3a38e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/gh-actions-self-hosted-runners/arc/images/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,15 @@ RUN curl -OL https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-c
rm google-cloud-sdk-367.0.0-linux-x86_64.tar.gz && \
mv google-cloud-sdk /usr/local/google-cloud-sdk && \
/usr/local/google-cloud-sdk/install.sh --quiet && \
/usr/local/google-cloud-sdk/bin/gcloud components install kubectl && \
/usr/local/google-cloud-sdk/bin/gcloud components install gke-gcloud-auth-plugin && \
#revert permission
chown -R runner:runner /home/runner/.config
ENV USE_GKE_GCLOUD_AUTH_PLUGIN=True
ENV PATH="${PATH}:/usr/local/google-cloud-sdk/bin"
#Install Kubectl
RUN curl -OL https://dl.k8s.io/release/v1.28.1/bin/linux/amd64/kubectl && \
chmod +x ./kubectl && \
mv ./kubectl /usr/local/bin/kubectl
#Install Apache Maven
RUN curl -OL https://dlcdn.apache.org/maven/maven-3/3.9.4/binaries/apache-maven-3.9.4-bin.tar.gz && \
tar -xvf apache-maven-3.9.4-bin.tar.gz && \
Expand All @@ -73,4 +78,5 @@ ENV MAVEN_HOME="/usr/local/maven"

# Needed to transfer path addtitions to runner environment
RUN echo PATH=$PATH >> /runnertmp/.env
RUN echo USE_GKE_GCLOUD_AUTH_PLUGIN=$USE_GKE_GCLOUD_AUTH_PLUGIN >> /runnertmp/.env
USER runner

0 comments on commit 8f3a38e

Please sign in to comment.