Commit e7521c48 authored by Maxime Lefrançois's avatar Maxime Lefrançois

update ci/cd

parent 6951cad3
Pipeline #3847 failed with stages
in 27 seconds
image: openjdk:8-jdk
develop:
variables:
SAREF_DEV_KEY: <my_private_key>
SAREF_PORTAL_KEY: <my_private_key>
before_script:
- 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'
stages:
- test
- build
- deploy
test-develop:
stage: test
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 develop -s
- java -jar saref-pipeline.jar develop -s && touch target/success
allow_failure: true
except:
- /^prerelease-v/
- /^release-v/
......@@ -11,21 +28,50 @@ develop:
when: always
paths:
- target/site
- target/report_output.xml
- target/success
reports:
junit: target/report_output.xml
release:
test-prerelease:
stage: test
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
only:
- java -jar saref-pipeline.jar release -t && touch target/success
allow_failure: true
only:
- /^prerelease-v/
- /^release-v/
artifacts:
when: always
paths:
- target/site
- target/report_output.xml
- target/success
reports:
junit: target/report_output.xml
deploy-report:
stage: deploy
script:
- scp -pr '-P 29419' target/site saref-dev@saref.etsi.org:~/snapshot/$CI_PIPELINE_ID
- echo "SAREF pipeline report https://saref.etsi.org/snapshot/$CI_PIPELINE_ID/report.html"
- exit $(test -f target/success) $?
except:
- /^release-v/
test-release:
stage: test
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 -t
only:
- /^release-v/
trigger-release:
stage: deploy
only:
- /^release-v/
variables:
SAREF_DEV_KEY: $SAREF_DEV_KEY
SAREF_PORTAL_KEY: $SAREF_PORTAL_KEY
trigger:
project: saref/saref-portal
branch: master
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