.gitlab-ci.yml 525 Bytes
Newer Older
Maxime Lefrançois's avatar
Maxime Lefrançois committed
image: maven:3.6.2-jdk-8

variables:
    SAREF_DEV_KEY: <my_private_key>
Maxime Lefrançois's avatar
Maxime Lefrançois committed
build:
  stage: build
  script:
    - mvn package
  artifacts:
    paths:
Maxime Lefrançois's avatar
Maxime Lefrançois committed
      - target/saref-pipeline.jar
Maxime Lefrançois's avatar
Maxime Lefrançois committed
  only:
    - master 

deploy:
  stage: deploy
  script:
    - 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'
    - scp -pr target/saref-pipeline.jar saref-dev@saref.etsi.org:~/downloads/saref-pipeline.jar