Newer
Older
stages:
- pipeline
- staging
- release
prepare-prerelease:
stage: pipeline
allow_failure: true
script:
- curl -L -o saref-pipeline.jar "https://gitlab.emse.fr/saref/saref-pipeline/-/jobs/artifacts/master/raw/target/saref-pipeline.jar?job=build"
- java -jar saref-pipeline.jar prerelease-portal -t && touch target/success
reports:
junit: target/report_output.xml
prepare-release:
stage: pipeline
script:
- curl -L -o saref-pipeline.jar "https://gitlab.emse.fr/saref/saref-pipeline/-/jobs/artifacts/master/raw/target/saref-pipeline.jar?job=build"
- java -jar saref-pipeline.jar release-portal && touch target/success
reports:
junit: target/report_output.xml
staging:
- eval $(ssh-agent -s)
- ssh-add <(echo "$SAREF_DEV_KEY")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- scp -pr '-P 29419' target/site saref-dev@saref.etsi.org:~/staging/$CI_PIPELINE_ID
- echo "SAREF staging portal https://saref.etsi.org/staging/$CI_PIPELINE_ID/"
- exit $(test -f target/success) $?
deploy:
image: maximelefrancois86/alpine-ssh-rsync
stage: release
when: manual
- eval $(ssh-agent -s)
- ssh-add <(echo "$SAREF_PORTAL_KEY")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- rsync -rtcv -e 'ssh -p 29419' error-documents/ saref-portal@saref.etsi.org:~/error-documents
- rsync -rtcv -e 'ssh -p 29419' target/site/ saref-portal@saref.etsi.org:~/site
- scp -pr '-P 29419' target/dataset/ saref-portal@saref.etsi.org:~/dataset-new
- ssh saref-portal@saref.etsi.org "rm ~/dataset && mv ~/dataset-new ~/dataset"