Commit ad06b252 authored by Stefan Funk's avatar Stefan Funk
Browse files

Add release dep deployment depending on on version name

parent 7a7680cb
......@@ -57,6 +57,9 @@ build_and_deploy_dev:
- ./dhcrud-webapp-public/target/*.deb
# Deploy DEB files to APTLY repository.
# All four DEB files are deployed with SNAPSHOT version (branch: develop)!
# Only the {tg/dh}crud-webapps are deployed for branch main, depending on the version (suffix -TG or -DH)!
# FIXME --> Use a common lib for uploading the deb files to Aptly!
deploy_tgcrud-webapp_dev:
only:
- develop
......@@ -71,9 +74,11 @@ deploy_tgcrud-webapp_dev:
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then echo "---A SNAPSHOT BUILD IS BEING PERFORMED---"; fi
- curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}
- curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-snapshots/file/${DEB_NAME}
- 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy'
deploy_tgcrud-webapp-public_dev:
only:
- develop
......@@ -88,9 +93,11 @@ deploy_tgcrud-webapp-public_dev:
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then echo "---A SNAPSHOT BUILD IS BEING PERFORMED---"; fi
- curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}
- curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-snapshots/file/${DEB_NAME}
- 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy'
deploy_dhcrud-webapp_dev:
only:
- develop
......@@ -105,9 +112,11 @@ deploy_dhcrud-webapp_dev:
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then echo "---A SNAPSHOT BUILD IS BEING PERFORMED---"; fi
- curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}
- curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-snapshots/file/${DEB_NAME}
- 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy'
deploy_dhcrud-webapp-public_dev:
only:
- develop
......@@ -122,6 +131,83 @@ deploy_dhcrud-webapp-public_dev:
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- if [[ $PVERSION =~ .*SNAPSHOT$ ]]; then echo "---A SNAPSHOT BUILD IS BEING PERFORMED---"; fi
- curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}
- curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-snapshots/file/${DEB_NAME}
- 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy'
deploy_tgcrud-webapp_prd:
only:
- main
image: alpine:3.14
stage: deploy_deb
variables:
PNAME: 'tgcrud-webapp'
PPATH: '${PNAME}/target'
script:
- source $VARIABLES_FILE
- 'apk add --no-cache bash'
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
> - if [[ $PVERSION =~ .*TG-RELEASE$ ]]; then echo "---A TGREP RELEASE BUILD IS BEING PERFORMED---"; fi
# - curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}
# - curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-releases/file/${DEB_NAME}
# - 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy'
deploy_tgcrud-webapp-public_prd:
only:
- main
image: alpine:3.14
stage: deploy_deb
variables:
PNAME: 'tgcrud-webapp-public'
PPATH: '${PNAME}/target'
script:
- source $VARIABLES_FILE
- 'apk add --no-cache bash'
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- if [[ $PVERSION =~ .*TG-RELEASE$ ]]; then echo "---A TGREP RELEASE BUILD IS BEING PERFORMED---"; fi
# - curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}
# - curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-releases/file/${DEB_NAME}
# - 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy'
deploy_dhcrud-webapp_prd:
only:
- main
image: alpine:3.14
stage: deploy_deb
variables:
PNAME: 'dhcrud-webapp'
PPATH: '${PNAME}/target'
script:
- source $VARIABLES_FILE
- 'apk add --no-cache bash'
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- if [[ $PVERSION =~ .*DH-RELEASE$ ]]; then echo "---A DHREP RELEASE BUILD IS BEING PERFORMED---"; fi
## - curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}
# - curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-releases/file/${DEB_NAME}
# - 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy'
deploy_dhcrud-webapp-public_prd:
only:
- main
image: alpine:3.14
stage: deploy_deb
variables:
PNAME: 'dhcrud-webapp-public'
PPATH: '${PNAME}/target'
script:
- source $VARIABLES_FILE
- 'apk add --no-cache bash'
- 'apk add --no-cache curl'
- export PLOC="$(ls ./${PPATH}/*.deb)"
- DEB_NAME=$PNAME-$PVERSION.deb
- if [[ $PVERSION =~ .*DH-RELEASE$ ]]; then echo "---A DHREP RELEASE BUILD IS BEING PERFORMED---"; fi
# - curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST --header "Content-Type:multipart/form-data" -F file=@${PLOC} ${APTLY_URL}/files/${DEB_NAME}
# - curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X POST ${APTLY_URL}/repos/indy-releases/file/${DEB_NAME}
# - 'curl -u ${APTLY_USER}:${APTLY_PASSWORD} -X PUT -H "Content-Type: application/json" --data "{}" ${APTLY_URL}/publish/:./indy'
......@@ -117,7 +117,7 @@ import info.textgrid.utils.httpclient.TGHttpClient;
* @version 2021-11-08
* @since 2009-08-26
**/
@Ignore
//@Ignore
public class TestTGCrudServiceOnline {
// **
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment