Skip to content

Commit fb473db

Browse files
committed
install google-cli from latest version
1 parent 60c8f87 commit fb473db

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

README.MD

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ Tools to be installed within the DMC.
5656
| WORKDIR | no | /root | | | |
5757
| PACKAGES | no | | list of packages to be installed | | packages:<br>&nbsp;&nbsp;- ansible<br>&nbsp;&nbsp;- docker-ce<br>&nbsp;&nbsp;- helm<br>&nbsp;&nbsp;- kubectl |
5858
| REPOSITORIES | no | | further repositories that should be used, currently the following are defined with defaults **_[hashicorp, docker, microsoft]_** | repositories:<br>&nbsp;&nbsp;docker: {}<br>&nbsp;&nbsp;microsoft: {}<br>&nbsp;&nbsp;hashicorp: {} | repositories:<br>&nbsp;&nbsp;mongodb:<br>&nbsp;&nbsp;&nbsp;&nbsp;gpg: https://www.mongodb.org/static/pgp/server-6.0.asc<br>&nbsp;&nbsp;&nbsp;&nbsp;entry: https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse |
59-
| BINARIES | no | | binaries that should be installed, currently the following are supported **_[github, google] | github:<br>&nbsp;&nbsp;- remotemobprogramming/mob=linux_amd64=v3.2.0<br>&nbsp;&nbsp;- derailed/k9s=Linux_x86_64<br>google:<br>&nbsp;&nbsp;- google-cloud-cli=403.0.0-0 | |
60-
| REPOSITORIES_HASHICORP_GPG | no | `https://apt.releases.hashicorp.com/gpg` | default | | |
61-
| REPOSITORIES_HASHICORP_ENTRY | no | `'https://apt.releases.hashicorp.com $(lsb_release -cs) main'` | default | | |
62-
| REPOSITORIES_DOCKER_GPG | no | `https://download.docker.com/linux/ubuntu/gpg` | default | | |
63-
| REPOSITORIES_DOCKER__ENTRY | no | `'https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable'` | default | | |
64-
| REPOSITORIES_MICROSOFT_GPG | no | `https://packages.microsoft.com/keys/microsoft.asc` | default | | |
65-
| REPOSITORIES_MICROSOFT_ENTRY | | `'https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main'` | default | | |
66-
| BINARIES_GITHUB_URI | no | `https://api.github.com/repos` | default | | |
67-
| BINARIES_GOOGLE_URI | no | `https://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-arm64/Packages` | default | | |
59+
| BINARIES | no | | binaries that should be installed, currently the following are supported **_[github, google] | github:<br>&nbsp;&nbsp;- remotemobprogramming/mob=linux_amd64=v3.2.0<br>&nbsp;&nbsp;- derailed/k9s=Linux_x86_64<br>google:<br>&nbsp;&nbsp;- google-cloud-cli | |
60+
| REPOSITORIES_HASHICORP_GPG | no | `https://apt.releases.hashicorp.com/gpg` | default | | |
61+
| REPOSITORIES_HASHICORP_ENTRY | no | `'https://apt.releases.hashicorp.com $(lsb_release -cs) main'` | default | | |
62+
| REPOSITORIES_DOCKER_GPG | no | `https://download.docker.com/linux/ubuntu/gpg` | default | | |
63+
| REPOSITORIES_DOCKER__ENTRY | no | `'https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable'` | default | | |
64+
| REPOSITORIES_MICROSOFT_GPG | no | `https://packages.microsoft.com/keys/microsoft.asc` | default | | |
65+
| REPOSITORIES_MICROSOFT_ENTRY | | `'https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main'` | default | | |
66+
| BINARIES_GITHUB_URI | no | `https://api.github.com/repos` | default | | |
67+
| BINARIES_GOOGLE_URI | no | `https://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-arm64/Packages` | default | | |
6868

6969
#### Tool Config
7070

template.d/13_binaries

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ RUN if [ -n "${BINARIES}" ]; then \
77
BINARY_PACKAGE_URL=$(curl -fsSL "${BINARY_PACKAGE_URI}" | grep -Po '"browser_download_url": "\K.*?(?=\")' | grep -P "${BINARY_PACKAGE_VERSION}") && \
88
mkdir -p ./github && curl -SsL --retry 5 "${BINARY_PACKAGE_URL}" | tar xz -C ./github && \
99
chmod -R +x ./github/* && mv ./github/* /usr/local/bin/; done; fi && \
10-
if [ "${BINARY_REPO}" = "GOOGLE" ]; then for BINARY_PACKAGE in ${BINARY_PACKAGES}; do BINARY_PACKAGE_VERSION=$(curl -fSsL "${BINARY_URI}" | grep -P "${BINARY_PACKAGE//=/.*}" | cut -d '_' -f2 | sort -n | grep "$(echo "${BINARY_PACKAGE}" | cut -d '=' -f2)" | tail -n1 | cut -d '-' -f1) && \
11-
BINARY_PACKAGE_URI="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/$(echo "${BINARY_PACKAGE}" | cut -d '=' -f1)-${BINARY_PACKAGE_VERSION}-linux-x86_64.tar.gz" && \
12-
mkdir -p ./google && curl -SsL --retry 5 "${BINARY_PACKAGE_URI}" | tar xz -C ./google && \
10+
if [ "${BINARY_REPO}" = "GOOGLE" ]; then for BINARY_PACKAGE in ${BINARY_PACKAGES}; do BINARY_PACKAGE_URI=$(echo "${BINARY_PACKAGE}" | awk -F '=' '{ if (!$2) version=""; else version=$2; printf("%s_%s", $1, version)}') && \
11+
BINARY_PACKAGE_VERSION=$(curl -fSsL "${BINARY_URI}" | grep "${BINARY_PACKAGE_URI}" | cut -d '_' -f2 | sort -un | tail -n1 | cut -d '-' -f1) && \
12+
BINARY_PACKAGE_URL="https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/$(echo ${BINARY_PACKAGE} | cut -d '=' -f1)-${BINARY_PACKAGE_VERSION}-linux-x86_64.tar.gz" && \
13+
mkdir -p ./google && curl -SsL --retry 5 "${BINARY_PACKAGE_URL}" | tar xz -C ./google && \
1314
chmod -R +x ./google/* && \
1415
sh ./google/*/install.sh --quiet --command-completion true --bash-completion true --path-update true; done; fi; done \
1516
fi

0 commit comments

Comments
 (0)