Skip to content
Snippets Groups Projects
Commit b41c92e5 authored by Ricardo Rocha's avatar Ricardo Rocha Committed by Ricardo Rocha
Browse files

[cern] Add gitlab-ci for repo build

parent 1f1482bc
No related branches found
No related tags found
No related merge requests found
Pipeline #924100 passed with stage
in 3 minutes and 25 seconds
stages:
- build
- deploy
before_script:
- mkdir -p .repo
build:
stage: build
image: gitlab-registry.cern.ch/cloud/ciadm
script:
- curl -o helm.tar.gz https://kubernetes-helm.storage.googleapis.com/helm-v2.14.1-linux-amd64.tar.gz; mkdir -p helm; tar zxvf helm.tar.gz -C helm; cp helm/linux-amd64/helm /usr/local/bin; rm -rf helm*
- helm init --client-only
- helm repo add charts http://charts.cern.ch/openstack-infra/
- for chart in $(ls -d */Chart.yaml | xargs dirname); do if [ -f ${chart}/requirements.yaml ]; then sed -i 's#http://localhost:8879/charts#http://charts.cern.ch/openstack-infra/#g' ${chart}/requirements.yaml; fi; helm dep update ${chart}; helm lint ${chart}; helm package ${chart}; done
except:
- tags
deploy:
stage: deploy
image: gitlab-registry.cern.ch/cloud/ciadm
script:
- helm init --client-only
- helm plugin install https://github.com/chartmuseum/helm-push
- helm repo add charts http://charts.cern.ch/openstack-infra/
- for chart in $(ls -d */Chart.yaml | xargs dirname); do if [ -f ${chart}/requirements.yaml ]; then sed -i 's#http://localhost:8879/charts#http://charts.cern.ch/openstack-infra/#g' ${chart}/requirements.yaml; fi; helm dep update ${chart}; helm push ${chart} --version="$(grep -R version ${chart}/Chart.yaml | awk '{print $2}')-${CI_COMMIT_TAG}+$(git log -1 --pretty=format:%h)" charts; done
only:
- tags
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment