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

Maxime Lefrançois's avatar
Maxime Lefrançois committed
3
variables:
Maxime Lefrançois's avatar
Maxime Lefrançois committed
4
    SAREF_DEV_KEY: <my_private_key>
Maxime Lefrançois's avatar
Maxime Lefrançois committed
5

Maxime Lefrançois's avatar
Maxime Lefrançois committed
6
7
8
9
10
11
build:
  stage: build
  script:
    - mvn package
  artifacts:
    paths:
Maxime Lefrançois's avatar
Maxime Lefrançois committed
12
      - target/saref-pipeline.jar
Maxime Lefrançois's avatar
Maxime Lefrançois committed
13
14
15
  only:
    - master 

Maxime Lefrançois's avatar
Maxime Lefrançois committed
16
17
18
19
deploy:
  stage: deploy
  script:
    - eval $(ssh-agent -s)
Maxime Lefrançois's avatar
Maxime Lefrançois committed
20
    - ssh-add <(echo "$SAREF_DEV_KEY")
Maxime Lefrançois's avatar
Maxime Lefrançois committed
21
22
    - mkdir -p ~/.ssh
    - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
Maxime Lefrançois's avatar
Maxime Lefrançois committed
23
    - scp -pr target/saref-pipeline.jar saref-dev@saref.etsi.org:~/downloads/saref-pipeline.jar
Maxime Lefrançois's avatar
Maxime Lefrançois committed
24

Maxime Lefrançois's avatar
Maxime Lefrançois committed
25