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
DARIAH-DE
Geo-Browser
Commits
9aa58f6b
Commit
9aa58f6b
authored
Nov 24, 2021
by
malzer
Browse files
Add main deploy stage
parent
fe6cf851
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
9aa58f6b
...
...
@@ -189,25 +189,25 @@ deploy_dev:
-
if test "${response#*"error"}" != "$response"; then exit 1; else echo "Job completed.";fi
#
deploy_live:
#
only:
#
- main
#
image: alpine:3.14
#
stage:
#
deploy
#
variables:
#
build_number: $PIPELINE_ID
#
full_version: '${VERSION}-${build_number}'
#
DEB_NAME: 'dariahde-geobrowser_${full_version}.deb'
#
DEPLOY_DEB_COMMAND: 'curl -u ci:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy'
#
script:
#
- 'apk add --no-cache bash'
#
- 'apk add --no-cache curl'
#
- curl --version
#
- export DEB_FILE="$(ls ./*.deb)"
#
- curl -u ci:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${DEB_FILE} ${APTLY_URL}/files/${DEB_NAME}
#
- curl -u ci:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-releases/file/${DEB_NAME}
#
- echo $DEPLOY_DEB_COMMAND
#
- response=$(eval "$DEPLOY_DEB_COMMAND")
#
- echo $response
#
- if test "${response#*"error"}" != "$response"; then exit 1; else echo "Job completed.";fi
deploy_live
:
only
:
-
main
image
:
alpine:3.14
stage
:
deploy
variables
:
build_number
:
$PIPELINE_ID
full_version
:
'
${VERSION}-${build_number}'
DEB_NAME
:
'
dariahde-geobrowser_${full_version}.deb'
DEPLOY_DEB_COMMAND
:
'
curl
-u
ci:${APTLY_PASSWORD}
-X
PUT
-H
"Content-Type:
application/json"
--data
"{}"
${APTLY_URL}/publish/:./indy'
script
:
-
'
apk
add
--no-cache
bash'
-
'
apk
add
--no-cache
curl'
-
curl --version
-
export DEB_FILE="$(ls ./*.deb)"
-
curl -u ci:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${DEB_FILE} ${APTLY_URL}/files/${DEB_NAME}
-
curl -u ci:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-releases/file/${DEB_NAME}
-
echo $DEPLOY_DEB_COMMAND
-
response=$(eval "$DEPLOY_DEB_COMMAND")
-
echo $response
-
if test "${response#*"error"}" != "$response"; then exit 1; else echo "Job completed.";fi
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