Commit 709ac0a9 authored by Sascha Pfeiffer's avatar Sascha Pfeiffer

added deployment of changelog

Signed-off-by: default avatarSascha Pfeiffer <sascha.pfeiffer@psono.com>
parent d6dc3977
......@@ -238,3 +238,14 @@ deploy-firefox:
only:
- /^v[0-9]*\.[0-9]*\.[0-9]*$/
deploy-changelog:
except:
- schedules
stage: test
image: psono-docker.jfrog.io/ubuntu:16.04
script:
- sh ./var/deploy_changelog.sh
environment:
name: static.psono.com
url: https://static.psono.com/gitlab.com/psono/psono-client/changelog.json
#!/usr/bin/env bash
apt-get update && \
apt-get install -y lsb-release curl && \
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
apt-get update && apt-get -y install google-cloud-sdk && \
echo "$GOOGLE_APPLICATION_CREDENTIALS" > "/root/key.json" && \
gcloud auth activate-service-account --key-file=/root/key.json && \
curl -H "PRIVATE-TOKEN: $GITLAB_PERSONAL_ACCESS_TOKEN" "https://gitlab.com/api/v4/projects/$CI_PROJECT_ID/repository/tags" --output changelog.json && \
gsutil cp changelog.json gs://static.psono.com/gitlab.com/$CI_PROJECT_PATH/changelog.json
\ No newline at end of file
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