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

variables:
    PORTAL_KEY: <my_private_key>
Maxime Lefrançois's avatar
Maxime Lefrançois committed
stages:
  - build
  - deploy
  - release

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:
Maxime Lefrançois's avatar
Maxime Lefrançois committed
    - develop-ci
Maxime Lefrançois's avatar
Maxime Lefrançois committed
# deploy_website:
#   stage: deploy
#   script:
Maxime Lefrançois's avatar
Maxime Lefrançois committed
#     - eval $(ssh-agent -s)
#     - ssh-add <(echo "$PORTAL_KEY")
#     - mkdir -p ~/.ssh
#     - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
#     - scp -P 29419 -pr target/saref-pipeline.jar saref-dev@saref.etsi.org:~/downloads/saref-pipeline.jar
#   only:
#     - master
Maxime Lefrançois's avatar
Maxime Lefrançois committed
deploy_package:
  stage: deploy
  script:
    - 'mvn deploy -s ci_settings.xml'
  only:
    - develop-ci

# release_job:
#   stage: release
#   image: registry.gitlab.com/gitlab-org/release-cli:latest
#   script:
#     - echo "Running the release job for $CI_COMMIT_TAG"
#     - mvn package
#   release:
#     tag_name: $CI_COMMIT_TAG
#     description: '$CI_COMMIT_TAG_MESSAGE'
#     ref: '$CI_COMMIT_SHA'
#   rules:
#     - if: $CI_COMMIT_TAG