Skip to content
Snippets Groups Projects
Commit 9d3fb956 authored by Nicolas Borboën's avatar Nicolas Borboën
Browse files

[WIP] Hello deploy.sh

parent 565f97ca
Branches
Tags
No related merge requests found
Pipeline #16533 waiting for manual action
...@@ -47,21 +47,7 @@ create_release: ...@@ -47,21 +47,7 @@ create_release:
- pdf@idevelop/howtogitlabrunner - pdf@idevelop/howtogitlabrunner
script: script:
- ls -al * - ls -al *
# - git clone git@gitlab.epfl.ch:idevelop/howtogitlabrunner.wiki.git wiki - sh deploy.sh
# - 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"
deploy_to_production: deploy_to_production:
stage: deploy stage: deploy
......
#!/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"
#
#
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment