From 60c8f8715c8c428979fa3db4cd081f49f367d620 Mon Sep 17 00:00:00 2001 From: Sebastian Gumprich Date: Mon, 30 Jan 2023 11:18:49 +0100 Subject: [PATCH 1/2] remove version pinnings from example --- examples/full_build.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/full_build.yaml b/examples/full_build.yaml index 9e0e0d5..c043701 100644 --- a/examples/full_build.yaml +++ b/examples/full_build.yaml @@ -2,7 +2,7 @@ packages: - ansible - kubectl - helm - - terraform=1.1.7 + - terraform - nomad - consul - docker-ce @@ -18,33 +18,33 @@ repositories: entry: https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse binaries: github: - - remotemobprogramming/mob=linux_amd64=v3.2.0 + - remotemobprogramming/mob=linux_amd64 - derailed/k9s=Linux_x86_64 google: - - google-cloud-cli=403.0.0-0 + - google-cloud-cli requirements: pip: - packaging - requests[security] - xmltodict - - azure-cli-core=2.34.0 - - azure-common=1.1.11 + - azure-cli-core + - azure-common - awsume ansible: roles: - t_systems_mms.grafana collections: - - t_systems_mms.acme=2.3.1 - - t_systems_mms.icinga_director=1.28.0 + - t_systems_mms.acme + - t_systems_mms.icinga_director extensions: az: - - front-door=1.0.15 + - front-door google: - gsutil - gke-gcloud-auth-plugin - kubectl helm: - - https://github.com/databus23/helm-diff=3.5.0 + - https://github.com/databus23/helm-diff - https://github.com/jkroepke/helm-secrets profiles: .vimrc: From fb473db6442a5f94f1bbc379362287e41278db94 Mon Sep 17 00:00:00 2001 From: michaelamattes Date: Mon, 30 Jan 2023 14:57:55 +0100 Subject: [PATCH 2/2] install google-cli from latest version --- README.MD | 18 +++++++++--------- template.d/13_binaries | 7 ++++--- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.MD b/README.MD index 8f61783..b03ef44 100644 --- a/README.MD +++ b/README.MD @@ -56,15 +56,15 @@ Tools to be installed within the DMC. | WORKDIR | no | /root | | | | | PACKAGES | no | | list of packages to be installed | | packages:
  - ansible
  - docker-ce
  - helm
  - kubectl | | REPOSITORIES | no | | further repositories that should be used, currently the following are defined with defaults **_[hashicorp, docker, microsoft]_** | repositories:
  docker: {}
  microsoft: {}
  hashicorp: {} | repositories:
  mongodb:
    gpg: https://www.mongodb.org/static/pgp/server-6.0.asc
    entry: https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse | -| BINARIES | no | | binaries that should be installed, currently the following are supported **_[github, google] | github:
  - remotemobprogramming/mob=linux_amd64=v3.2.0
  - derailed/k9s=Linux_x86_64
google:
  - google-cloud-cli=403.0.0-0 | | -| REPOSITORIES_HASHICORP_GPG | no | `https://apt.releases.hashicorp.com/gpg` | default | | | -| REPOSITORIES_HASHICORP_ENTRY | no | `'https://apt.releases.hashicorp.com $(lsb_release -cs) main'` | default | | | -| REPOSITORIES_DOCKER_GPG | no | `https://download.docker.com/linux/ubuntu/gpg` | default | | | -| REPOSITORIES_DOCKER__ENTRY | no | `'https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable'` | default | | | -| REPOSITORIES_MICROSOFT_GPG | no | `https://packages.microsoft.com/keys/microsoft.asc` | default | | | -| REPOSITORIES_MICROSOFT_ENTRY | | `'https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main'` | default | | | -| BINARIES_GITHUB_URI | no | `https://api.github.com/repos` | default | | | -| BINARIES_GOOGLE_URI | no | `https://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-arm64/Packages` | default | | | +| BINARIES | no | | binaries that should be installed, currently the following are supported **_[github, google] | github:
  - remotemobprogramming/mob=linux_amd64=v3.2.0
  - derailed/k9s=Linux_x86_64
google:
  - google-cloud-cli | | +| REPOSITORIES_HASHICORP_GPG | no | `https://apt.releases.hashicorp.com/gpg` | default | | | +| REPOSITORIES_HASHICORP_ENTRY | no | `'https://apt.releases.hashicorp.com $(lsb_release -cs) main'` | default | | | +| REPOSITORIES_DOCKER_GPG | no | `https://download.docker.com/linux/ubuntu/gpg` | default | | | +| REPOSITORIES_DOCKER__ENTRY | no | `'https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable'` | default | | | +| REPOSITORIES_MICROSOFT_GPG | no | `https://packages.microsoft.com/keys/microsoft.asc` | default | | | +| REPOSITORIES_MICROSOFT_ENTRY | | `'https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main'` | default | | | +| BINARIES_GITHUB_URI | no | `https://api.github.com/repos` | default | | | +| BINARIES_GOOGLE_URI | no | `https://packages.cloud.google.com/apt/dists/cloud-sdk/main/binary-arm64/Packages` | default | | | #### Tool Config diff --git a/template.d/13_binaries b/template.d/13_binaries index 24a26c6..b1a375d 100644 --- a/template.d/13_binaries +++ b/template.d/13_binaries @@ -7,9 +7,10 @@ RUN if [ -n "${BINARIES}" ]; then \ BINARY_PACKAGE_URL=$(curl -fsSL "${BINARY_PACKAGE_URI}" | grep -Po '"browser_download_url": "\K.*?(?=\")' | grep -P "${BINARY_PACKAGE_VERSION}") && \ mkdir -p ./github && curl -SsL --retry 5 "${BINARY_PACKAGE_URL}" | tar xz -C ./github && \ chmod -R +x ./github/* && mv ./github/* /usr/local/bin/; done; fi && \ - 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) && \ - 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" && \ - mkdir -p ./google && curl -SsL --retry 5 "${BINARY_PACKAGE_URI}" | tar xz -C ./google && \ + 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)}') && \ + BINARY_PACKAGE_VERSION=$(curl -fSsL "${BINARY_URI}" | grep "${BINARY_PACKAGE_URI}" | cut -d '_' -f2 | sort -un | tail -n1 | cut -d '-' -f1) && \ + 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" && \ + mkdir -p ./google && curl -SsL --retry 5 "${BINARY_PACKAGE_URL}" | tar xz -C ./google && \ chmod -R +x ./google/* && \ sh ./google/*/install.sh --quiet --command-completion true --bash-completion true --path-update true; done; fi; done \ fi