From 63d976a44f513d01133d7f20df87baa1fc46a25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Borbo=C3=ABn?= <ponsfrilus@gmail.com> Date: Fri, 30 Aug 2019 17:25:00 +0200 Subject: [PATCH] [WIP] Explore var --- .gitlab-ci.yml | 2 +- deploy.sh | 30 ++++++++++++++---------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fc5bc8e..520208c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ create_release: - pdf@idevelop/howtogitlabrunner script: - ls -al * - - MY_TOKEN=$MY_TOKEN sh deploy.sh $MY_TOKEN + - sh deploy.sh deploy_to_production: stage: deploy diff --git a/deploy.sh b/deploy.sh index d0bdc8c..2c4e2bc 100755 --- a/deploy.sh +++ b/deploy.sh @@ -7,22 +7,20 @@ echo $MY_TOKEN echo "Hello from deploy.sh" -echo $1 # -# # - git clone git@gitlab.epfl.ch:idevelop/howtogitlabrunner.wiki.git wiki -# # - cp README.pdf wiki/public/ -# # - echo \n$(date '+%Y-%m-%d %H:%M:%S') >> wiki/home.md -# # - cd wiki -# - git config user.email "gitlab@epfl.ch" -# - git config user.name "gitlab-runner" -# # - git commit -am "New PDF file $(date '+%Y-%m-%d %H:%M:%S')" -# # - git push --push-option=ci.skip origin master +# git clone git@gitlab.epfl.ch:idevelop/howtogitlabrunner.wiki.git wiki +# cp README.pdf wiki/public/ +# echo \n$(date '+%Y-%m-%d %H:%M:%S') >> wiki/home.md +# cd wiki +# git config user.email "gitlab@epfl.ch" +# git config user.name "gitlab-runner" +# git commit -am "New PDF file $(date '+%Y-%m-%d %H:%M:%S')" +# git push --push-option=ci.skip origin master # # https://docs.gitlab.com/ee/ci/yaml/README.html#skipping-jobs -# - export RELEASE_V=v$(date '+%s') -# - git tag -f -a -m "My sweet release $(date '+%Y-%m-%d %H:%M:%S')" ${RELEASE_V} -# - git push -f --tags -# - export UPLOADED_FILE_URL=$(curl --request POST --header "Private-Token: ${MY_TOKEN}" --form "file=@README.pdf" "https://gitlab.epfl.ch/api/v4/projects/1298/uploads" | jq .url) -# - curl --request POST --header 'Content-Type: application/json' --header "Private-Token: ${MY_TOKEN}" --data '{"name": "New README release", "tag_name": "${RELEASE_V}", "description": "Release with the PDF [README.pdf](${UPLOADED_FILE_URL})"}' "https://gitlab.epfl.ch/api/v4/projects/1298/releases" -# -# +# export RELEASE_V=v$(date '+%s') +# git tag -f -a -m "My sweet release $(date '+%Y-%m-%d %H:%M:%S')" ${RELEASE_V} +# git push -f --tags +# export UPLOADED_FILE_URL=$(curl --request POST --header "Private-Token: ${MY_TOKEN}" --form "file=@README.pdf" "https://gitlab.epfl.ch/api/v4/projects/1298/uploads" | jq .url) +# curl --request POST --header 'Content-Type: application/json' --header "Private-Token: ${MY_TOKEN}" --data '{"name": "New README release", "tag_name": "${RELEASE_V}", "description": "Release with the PDF [README.pdf](${UPLOADED_FILE_URL})"}' "https://gitlab.epfl.ch/api/v4/projects/1298/releases" +# # -- GitLab