diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d5921d2b5203c6fe4c5c103ff9db6302311a997a..520208c4abb56648b1928f091c7ed8c127917af8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,21 +47,7 @@ create_release: - pdf@idevelop/howtogitlabrunner script: - ls -al * - # - 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" - + - sh deploy.sh deploy_to_production: stage: deploy diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000000000000000000000000000000000000..602b5eabd97e96e1a17088f679167c38b45d8de8 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + + +env + +echo $MY_TOKEN + +echo "Hello from deploy.sh" + +# +# # - 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" +# +#