Commit a56da928 authored by David Diederich's avatar David Diederich Committed by Oleksandr Kosse (EPAM)
Browse files

Move helm charts publishing into the osdu-gcp files

parent 6faea595
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
# OSDU_GCP_INTEGRATION_TESTER # OSDU_GCP_INTEGRATION_TESTER
# OSDU_GCP_NO_DATA_ACCESS_TESTER # OSDU_GCP_NO_DATA_ACCESS_TESTER
include:
- local: 'cloud-providers/osdu-gcp-global.yml'
.osdu-gcp-variables: .osdu-gcp-variables:
variables: variables:
# services' urls # services' urls
......
osdu-gcp-helm-charts:
stage: build
tags: ['osdu-small']
image:
name: alpine/helm:3.5.4
entrypoint: [""]
artifacts:
paths:
- helm-charts
rules:
- if: $OSDU_GCP_HELM_PACKAGE_CHARTS
when: on_success
script:
- mkdir -p helm-charts
- helm package $OSDU_GCP_HELM_PACKAGE_CHARTS --destination helm-charts
- helm repo index --url "${CI_SERVER_URL}/${CI_PROJECT_PATH}/-/jobs/${CI_JOB_ID}/artifacts/raw" .
- mv index.yaml helm-charts
include:
- local: 'cloud-providers/osdu-gcp-global.yml'
.OSDU_GCP_variables: .OSDU_GCP_variables:
variables: variables:
# service's URLs # service's URLs
......
pages: pages:
image: image: alpine
name: alpine/helm:3.5.4
entrypoint: [""]
stage: publish stage: publish
#needs: ['fossa-report']
tags: ['osdu-small'] tags: ['osdu-small']
artifacts: artifacts:
paths: paths:
- public - public
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $OSDU_GCP_HELM_PACKAGE_CHARTS - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: always
script: script:
- apk add curl
- mkdir -p public - mkdir -p public
- echo "<html><head><title>${CI_PROJECT_NAME}</title></head><body>" > public/index.html - echo "<html><head><title>${CI_PROJECT_NAME}</title></head><body>" > public/index.html
- find public -type f -not -name index.html | sed 's|public/\(.*\)|<a href="\1">\1</a>|' >> public/index.html - find public -type f -not -name index.html | sed 's|public/\(.*\)|<a href="\1">\1</a>|' >> public/index.html
- echo "</body></html>" >> public/index.html - echo "</body></html>" >> public/index.html
## publish GCP helm charts
- STATUS_CODE=$(curl --write-out '%{http_code}' --silent --output /dev/null ${CI_PAGES_URL}/index.yaml)
- echo $STATUS_CODE
- 'if [ "$STATUS_CODE" -ne 200 ] ; then touch index.yaml && echo "apiVersion: v1" >> index.yaml ; else curl --silent --show-error ${CI_PAGES_URL}/index.yaml -o "index.yaml" ; fi'
- helm package $OSDU_GCP_HELM_PACKAGE_CHARTS --destination ./public
- helm repo index --url ${CI_PAGES_URL} --merge index.yaml .
- sed -i 's|public/||g' index.yaml
- mv index.yaml ./public
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