Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sec23
korte
pymagglobal
Commits
ee7a87cb
Commit
ee7a87cb
authored
Jan 13, 2021
by
Maximilian Schanner
Browse files
grep only first instance, as there are now multiple ids on the page... [skip ci]
parent
40750649
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
ee7a87cb
...
...
@@ -19,7 +19,7 @@ build-job:
-
python3 setup.py sdist bdist_wheel
-
apt-get install -y -qq curl
# get the current package id
-
'
export
ID=$(curl
--request
GET
--header
"PRIVATE-TOKEN:
${API_ACCES_TOKEN}"
"https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages"
|
grep
-P
"(?<=.id.:)(\\d+)"
-o
)'
-
'
export
ID=$(curl
--request
GET
--header
"PRIVATE-TOKEN:
${API_ACCES_TOKEN}"
"https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages"
|
grep
-P
"(?<=.id.:)(\\d+)"
-o
|
head
-1
)'
# remove the package, as we want a new build even if the version number did not change
-
'
echo
$ID'
-
'
curl
--request
DELETE
--header
"PRIVATE-TOKEN:
${API_ACCES_TOKEN}"
"https://git.gfz-potsdam.de/api/v4/projects/${CI_PROJECT_ID}/packages/$ID"'
...
...
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