forked from strimzi/drain-cleaner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Push Helm Chart to Quay and update some pipeline steps (strimzi#88)
Signed-off-by: Jakub Scholz <[email protected]>
- Loading branch information
Showing
13 changed files
with
120 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
set -x | ||
|
||
TEST_HELM3_VERSION=${TEST_HELM3_VERSION:-'v3.12.0'} | ||
|
||
function install_helm3 { | ||
export HELM_INSTALL_DIR=/usr/bin | ||
curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh | ||
# we need to modify the script with a different path because on the Azure pipelines the HELM_INSTALL_DIR env var is not honoured | ||
sed -i 's#/usr/local/bin#/usr/bin#g' get_helm.sh | ||
chmod 700 get_helm.sh | ||
|
||
echo "Installing helm 3..." | ||
sudo ./get_helm.sh --version "${TEST_HELM3_VERSION}" | ||
|
||
echo "Verifying the installation of helm binary..." | ||
# run a proper helm command instead of, for example, "which helm", to verify that we can call the binary | ||
helm --help | ||
helmCommandOutput=$? | ||
|
||
if [ $helmCommandOutput != 0 ]; then | ||
echo "helm binary hasn't been installed properly - exiting..." | ||
exit 1 | ||
fi | ||
} | ||
|
||
install_helm3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
jobs: | ||
- job: 'push_helm_chart_oci' | ||
displayName: 'Push Helm Chart as OCI artifact' | ||
# Set timeout for jobs | ||
timeoutInMinutes: 60 | ||
# Base system | ||
pool: | ||
vmImage: 'Ubuntu-22.04' | ||
# Pipeline steps | ||
steps: | ||
# Install Prerequisites | ||
- template: "../steps/prerequisites/install_helm.yaml" | ||
|
||
# Unpack the release artifacts | ||
- task: DownloadPipelineArtifact@2 | ||
inputs: | ||
source: '${{ parameters.artifactSource }}' | ||
artifact: ReleaseArchives | ||
path: $(System.DefaultWorkingDirectory)/ | ||
project: '${{ parameters.artifactProject }}' | ||
pipeline: '${{ parameters.artifactPipeline }}' | ||
runVersion: '${{ parameters.artifactRunVersion }}' | ||
runId: '${{ parameters.artifactRunId }}' | ||
- bash: tar -xvf release.tar | ||
displayName: "Untar the release artifacts" | ||
|
||
# Login Helm to the OCI Registry | ||
- bash: "helm registry login -u $DOCKER_USER -p $DOCKER_PASS $DOCKER_REGISTRY" | ||
displayName: "Login to OCI registry" | ||
env: | ||
DOCKER_USER: $(QUAY_HELM_USER) | ||
DOCKER_PASS: $(QUAY_HELM_PASS) | ||
DOCKER_REGISTRY: "quay.io" | ||
|
||
# Push the Helm Chart to the OCI Registry | ||
- bash: "helm push strimzi-drain-cleaner-helm-3-chart-${{ parameters.releaseVersion }}.tgz oci://$DOCKER_REGISTRY/$DOCKER_ORG" | ||
displayName: "Push Helm Chart OCI artifact" | ||
env: | ||
DOCKER_REGISTRY: "quay.io" | ||
DOCKER_ORG: "strimzi-helm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.azure/templates/steps/setup_docker.yaml → ...s/steps/prerequisites/install_docker.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
steps: | ||
- bash: ".azure/scripts/setup-helm.sh" | ||
displayName: "Install Helm" | ||
env: | ||
TEST_HELM3_VERSION: 'v3.12.0' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
steps: | ||
- bash: ".azure/scripts/setup-kubernetes.sh" | ||
displayName: "Setup Minikube cluster" | ||
env: | ||
TEST_CLUSTER: minikube | ||
TEST_KUBECTL_VERSION: latest | ||
TEST_MINIKUBE_VERSION: latest |
This file was deleted.
Oops, something went wrong.