Commit 421863bf authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

image

parent 846c62ed
Loading
Loading
Loading
Loading
+11 −8
Original line number Diff line number Diff line
variables:
    SAREF_DEV_KEY: <my_private_key>
    SAREF_PORTAL_KEY: <my_private_key>

before_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'

stages:
  - pipeline
  - staging
@@ -42,10 +37,14 @@ prepare-release:
      junit: target/report_output.xml

staging:
  image: maximelefrancois86/alpine-ssh-rsync
  image: maximelefrancois86/alpine-ssh-rsynce
  stage: staging
  script:
    - scp -pr '-P 29419' target/site saref-portal@saref.etsi.org:~/staging/$CI_PIPELINE_ID
    - 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 "\tSAREF staging portal  https\://saref.etsi.org/staging/$CI_PIPELINE_ID/" 
    - exit $(test -f target/success) $?

@@ -54,6 +53,10 @@ deploy:
  stage: release
  when: manual
  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'
    - rsync -rtcv -e 'exssh -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