
Updating example configmap data and adding an example standardized container to be used for the gates. Added Chart tasks in order to make testing easier for the chart workflow. Removing the triggers and cluster roles settings to get ready to move the pipeline to a new location. Added pipelinerun to allow for testing via kubectl create -f co-author: sshturm@mirantis.com - Combined feat(chart) Chart task in Development Pipeline Change-Id: Icdb6bfe391e0e30883eeca661668763515a5565a Signed-off-by: Pete Birley <pete@port.direct>
45 lines
1.6 KiB
Bash
Executable File
45 lines
1.6 KiB
Bash
Executable File
#!/bin/bash
|
|
set -ex
|
|
|
|
make -C ./charts harbor
|
|
|
|
# shellcheck disable=SC2046
|
|
helm upgrade \
|
|
--create-namespace \
|
|
--install \
|
|
--namespace=harbor \
|
|
harbor \
|
|
./charts/harbor \
|
|
$(./tools/deployment/common/get-values-overrides.sh harbor)
|
|
|
|
./tools/deployment/common/wait-for-pods.sh harbor
|
|
|
|
helm -n harbor test harbor --logs
|
|
|
|
function validate() {
|
|
helm plugin update push || helm plugin install https://github.com/chartmuseum/helm-push
|
|
|
|
# Downloads a chartmuseum tarball and upload it to a newly created repo in harbor
|
|
helm repo add stable https://charts.helm.sh/stable
|
|
local source_chart_dir
|
|
source_chart_dir="$(mktemp -d)"
|
|
helm pull stable/chartmuseum --destination "${source_chart_dir}"
|
|
helm repo add jarvis-harbor "https://harbor-core.jarvis.local/chartrepo" --username=admin --password=Harbor12345
|
|
helm push --username=admin --password=Harbor12345 "$(ls "${source_chart_dir}"/chartmuseum*.tgz)" jarvis-harbor
|
|
helm repo update
|
|
local chart_dir
|
|
chart_dir="$(mktemp -d)"
|
|
helm pull jarvis-harbor/library/chartmuseum --destination "${chart_dir}"
|
|
# Tests that we can upload an image
|
|
sudo -E docker login harbor-core.jarvis.local --username admin --password Harbor12345
|
|
sudo -E docker pull debian:buster-slim
|
|
sudo -E docker tag debian:buster-slim harbor-core.jarvis.local/library/debian:buster-slim
|
|
sudo -E docker push harbor-core.jarvis.local/library/debian:buster-slim
|
|
|
|
# Test that we can download an image
|
|
sudo -E docker rmi harbor-core.jarvis.local/library/debian:buster-slim
|
|
sudo -E docker pull harbor-core.jarvis.local/library/debian:buster-slim
|
|
}
|
|
|
|
validate
|