Verified Commit c38709fc authored by Laurent Heirendt's avatar Laurent Heirendt
Browse files

add deploy script draft

parent 8a7e7c72
#!/bin/bash
# for your information
whoami
printenv
# we need to extract the ssh/git URL as the runner uses a tokenized URL
export CI_PUSH_REPO=`echo $CI_BUILD_REPO | perl -pe 's#.*@(.+?(\:\d+)?)/#git@\1:#'`
# runner runs on a detached HEAD, create a temporary local branch for editing
git checkout -b tmpBranch
git config --global user.name "artenobot"
git config --global user.email "artenobot@uni.lu"
git remote set-url --push origin "${CI_PUSH_REPO}"
# commit
git commit -am "Update models"
# push changes
# always return true so that the build does not fail if there are no changes
git push origin tmpBranch:${CI_BUILD_REF_NAME} || true
......@@ -19,4 +19,4 @@ commit:
- if: $CI_COMMIT_BRANCH == "build-ci"
- if: $CI_COMMIT_BRANCH == "master"
script:
- echo " > This is the commit stage"
\ No newline at end of file
- sh .ci/deploy.sh
\ 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