Commit 58a68447 authored by torgiren's avatar torgiren
Browse files

ci

parent a1ef28bb
1 merge request!10ci
Pipeline #117 passed with stages
in 48 seconds
Showing with 28 additions and 20 deletions
+28 -20
......@@ -6,9 +6,13 @@ stages:
upload_all:
stage: upload
image: curlimages/curl:latest
image:
name: alpine/helm:3.2.1
script:
- 'for char in *tgz; do curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@${chart}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"; done'
- apk add --no-cache ca-certificates git
- helm plugin install https://github.com/chartmuseum/helm-push.git
- helm repo add --username ${CI_REGISTRY_USER} --password ${CI_REGISTRY_PASSWORD} my-repo "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/stable"
- sh -c 'for file in *tgz; do helm push ${file} my-repo; done'
only:
- master
......@@ -19,7 +23,7 @@ check_ci_script:
- sh -ec 'for i in $(ls */Chart.yaml); do chart=$(dirname $i); grep "^build_${chart}:" .gitlab-ci.yml; done'
versions_check_exphost:
.versions_check_exphost:
stage: checks
image: curlimages/curl:latest
script:
......@@ -28,7 +32,7 @@ versions_check_exphost:
- export VER; sh -c 'curl -v https://gitlab.home.exphost.pl/api/v4/projects/6/packages/helm/stable/charts/exphost-${VER}.tgz --output /dev/null --fail; [ $? -gt 0 ]'
only:
changes:
- ${chart}/**/*
- exphost/**/*
lint_exphost:
stage: checks
......@@ -36,9 +40,9 @@ lint_exphost:
before_script:
script:
- helm lint exphost
only:
changes:
- ${chart}/**/*
# only:
# changes:
# - exphost/**/*
build_exphost:
stage: pack
......@@ -49,6 +53,6 @@ build_exphost:
artifacts:
paths:
- "exphost-*.tgz"
only:
changes:
- ${chart}/**/*
# only:
# changes:
# - exphost/**/*
......@@ -8,9 +8,13 @@ stages:
upload_all:
stage: upload
image: curlimages/curl:latest
image:
name: alpine/helm:3.2.1
script:
- 'for char in *tgz; do curl --request POST --user gitlab-ci-token:\$CI_JOB_TOKEN --form "chart=@\${chart}" "\${CI_API_V4_URL}/projects/\${CI_PROJECT_ID}/packages/helm/api/stable/charts"; done'
- apk add --no-cache ca-certificates git
- helm plugin install https://github.com/chartmuseum/helm-push.git
- helm repo add --username \${CI_REGISTRY_USER} --password \${CI_REGISTRY_PASSWORD} my-repo "\${CI_API_V4_URL}/projects/\${CI_PROJECT_ID}/packages/helm/stable"
- sh -c 'for file in *tgz; do helm push \${file} my-repo; done'
only:
- master
......@@ -27,7 +31,7 @@ for i in $(ls */Chart.yaml); do
echo "adding $chart"
cat <<EOF >> .gitlab-ci.yml
versions_check_$(echo ${chart}|tr '-' '_'):
.versions_check_$(echo ${chart}|tr '-' '_'):
stage: checks
image: curlimages/curl:latest
script:
......@@ -36,7 +40,7 @@ versions_check_$(echo ${chart}|tr '-' '_'):
- export VER; sh -c 'curl -v https://gitlab.home.exphost.pl/api/v4/projects/6/packages/helm/stable/charts/${chart}-\${VER}.tgz --output /dev/null --fail; [ \$? -gt 0 ]'
only:
changes:
- \${chart}/**/*
- ${chart}/**/*
lint_$(echo ${chart}|tr '-' '_'):
stage: checks
......@@ -44,9 +48,9 @@ lint_$(echo ${chart}|tr '-' '_'):
before_script:
script:
- helm lint ${chart}
only:
changes:
- \${chart}/**/*
# only:
# changes:
# - ${chart}/**/*
build_$(echo ${chart}|tr '-' '_'):
stage: pack
......@@ -57,8 +61,8 @@ build_$(echo ${chart}|tr '-' '_'):
artifacts:
paths:
- "${chart}-*.tgz"
only:
changes:
- \${chart}/**/*
# only:
# changes:
# - ${chart}/**/*
EOF
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment