diff --git a/.gitlab/ci/cng-images.yml b/.gitlab/ci/cng-images.yml new file mode 100644 index 0000000..e349534 --- /dev/null +++ b/.gitlab/ci/cng-images.yml @@ -0,0 +1,18 @@ +# Used by GitLab: https://gitlab.com/gitlab-org/gitlab/blob/master/.gitlab-ci.yml +.gitlab-cng-matrix: + # image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.7.patched-golang-1.14-git-2.31-lfs-2.9-chrome-89-node-14.15-yarn-1.22-postgresql-11-graphicsmagick-1.3.36 + variables: + LFS: '2.9' + CHROME: '89' + NODE: '14.15' + YARN: '1.22' + GRAPHICSMAGICK: '1.3.36' + POSTGRESQL: '11' + RUBY: '2.7.patched' + GIT: '2.31' + GOLANG: '1.14' + +gitlab-cng push: + extends: + - .gitlab-cng-matrix + - .build_and_deploy_custom diff --git a/scripts/install-k8s-tooling b/scripts/install-k8s-tooling new file mode 100644 index 0000000..8a1a406 --- /dev/null +++ b/scripts/install-k8s-tooling @@ -0,0 +1,32 @@ +#!/bin/bash + +export KUBECTL_VERSION=${KUBECTL_VERSION:-"v1.19.7"} +export HELM_VERSION=${HELM_VERSION:-"3.3.1"} +export FETCH_TIMEOUT=${FETCH_TIMEOUT:-"5m"} + +_fetch_helm(){ + curl -Ls https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz | tar zxf - \ + && chmod +x linux-amd64/helm \ + && mv linux-amd64/helm /usr/local/bin/ \ + && rm -rf linux-amd64/ +} + +fetch_helm(){ + until _fetch_helm ; do sleep 30; done +} + +export -f fetch_helm _fetch_helm +timeout ${FETCH_TIMEOUT} bash -xc fetch_helm + +_fetch_kubectl(){ + curl -LsO https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl \ + && chmod +x kubectl \ + && mv kubectl /usr/local/bin/kubectl +} + +fetch_kubectl(){ + until _fetch_kubectl ; do sleep 30 ; done +} + +export -f fetch_kubectl _fetch_kubectl +timeout ${FETCH_TIMEOUT} bash -xc fetch_kubectl \ No newline at end of file