Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eric Duminil
RegionChooser
Commits
1c8060c2
Commit
1c8060c2
authored
5 years ago
by
Matthias Betz
Browse files
Options
Download
Email Patches
Plain Diff
repairing release CI
parent
3d3eb58f
Pipeline
#294
failed with stage
in 38 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+4
-4
.gitlab-ci.yml
with
4 additions
and
4 deletions
+4
-4
.gitlab-ci.yml
+
4
-
4
View file @
1c8060c2
...
...
@@ -9,17 +9,17 @@ build:
release
:
script
:
-
mvn package -B
-
FILE=
ls target/ | grep '\.zip$' | head -n
1
-
FILE=
$(
ls target/ | grep '\.zip$' | head -n 1
)
-
echo ${FILE}
-
echo ${CI_PROJECT_ID}
-
echo ${CI_COMMIT_TAG}
-
echo ${CI_API_V4_URL}
-
echo ${CI_PROJECT_URL}
-
'
UPLOAD_RESULT=
curl
--request
POST
--header
'
'
P
RIVATE-TOKEN
:
${TOKEN}'
'
--form
"file=@${FILE}"
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/uploads'
-
'
UPLOAD_RESULT=
$(
curl
--request
POST
--header
'
'
P
rivate-Token
:
${TOKEN}'
'
--form
"file=@
target/
${FILE}"
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/uploads
)
'
-
echo ${UPLOAD_RESULT}
-
FILE_URL
=
echo $UPLOAD_RESULT | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["url"]'
-
FILE_URL
=$(
echo $UPLOAD_RESULT | python -c 'import json,sys;obj=json.load(sys.stdin);print obj["url"]
)
'
-
echo ${FILE_URL}
-
'
curl
--header
'
'
Content-Type:
application/json'
'
--header
'
'
P
RIVATE-TOKEN
:
${TOKEN}'
'
--data
'
'
{"name":
"Release
${CI_COMMIT_TAG}",
"tag_name":
"${CI_COMMIT_TAG}",
"description":
"RegionChooser
Release",
"assets":
{
"links":
[{
"name":
"${FILE}",
"url":
"${CI_PROJECT_URL}${FILE_URL}"}]
}
}'
'
--request
POST
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases'
-
'
curl
--header
'
'
Content-Type:
application/json'
'
--header
'
'
P
rivate-Token
:
${TOKEN}'
'
--data
'
'
{"name":
"Release
${CI_COMMIT_TAG}",
"tag_name":
"${CI_COMMIT_TAG}",
"description":
"RegionChooser
Release",
"assets":
{
"links":
[{
"name":
"${FILE}",
"url":
"${CI_PROJECT_URL}${FILE_URL}"}]
}
}'
'
--request
POST
${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/releases'
only
:
refs
:
-
tags
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets