Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HowToGitLabRunner
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ISAS-FSD
HowToGitLabRunner
Commits
c9eb00a7
Commit
c9eb00a7
authored
5 years ago
by
Nicolas Borboën
Browse files
Options
Downloads
Patches
Plain Diff
[WIP} is WIP
- Fix expansion bug(s) - Constantize PROJECT_ID - Remove unused exports
parent
be88e6bc
No related branches found
No related tags found
Loading
Pipeline
#16548
waiting for manual action
Stage: test
Stage: build
Stage: deploy
Stage: control
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
deploy.sh
+6
-4
6 additions, 4 deletions
deploy.sh
with
6 additions
and
4 deletions
deploy.sh
+
6
−
4
View file @
c9eb00a7
#!/usr/bin/env bash
PROJECT_ID
=
1298
set
-e
-x
env
...
...
@@ -27,7 +29,7 @@ whoami
# 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'
)
RELEASE_V
=
v
$(
date
'+%s'
)
echo
"Creating release:
${
RELEASE_V
}
"
git tag
-f
-a
-m
"My sweet release
$(
date
'+%Y-%m-%d %H:%M:%S'
)
"
${
RELEASE_V
}
echo
"END OF TAGGING"
...
...
@@ -36,7 +38,7 @@ git push -f --tags
echo
"END OF PUSH"
echo
"BEGIN UPLOAD"
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
)
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
)
"
echo
"END UPLOAD"
echo
"BEGIN POST RELEASE"
...
...
@@ -44,8 +46,8 @@ for retry in $(seq 1 5); do
if
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"
\
--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/
'
${
PROJECT_ID
}
'
/releases"
\
| jq
-e
".created_at"
then
break
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment