.gitlab-ci.yml 828 Bytes
Newer Older
variables:
    PORTAL_KEY: <my_private_key>
Maxime Lefrançois's avatar
Maxime Lefrançois committed
stages:
  - build
Maxime Lefrançois's avatar
Maxime Lefrançois committed
  - upload
Maxime Lefrançois's avatar
Maxime Lefrançois committed
  # - release
Maxime Lefrançois's avatar
Maxime Lefrançois committed
build:
  stage: build
Maxime Lefrançois's avatar
Maxime Lefrançois committed
  image: maven:3.6.2-jdk-8
  only:
    - develop-ci
Maxime Lefrançois's avatar
Maxime Lefrançois committed
  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

upload:
  stage: upload
  image: curlimages/curl:latest
Maxime Lefrançois's avatar
Maxime Lefrançois committed
  only:
Maxime Lefrançois's avatar
Maxime Lefrançois committed
    - develop-ci
  script:
Maxime Lefrançois's avatar
Maxime Lefrançois committed
    - |
Maxime Lefrançois's avatar
Maxime Lefrançois committed
      echo curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file target/saref-pipeline.jar "${PACKAGE_REGISTRY_URL}/saref-pipeline.jar"
Maxime Lefrançois's avatar
Maxime Lefrançois committed

Maxime Lefrançois's avatar
Maxime Lefrançois committed
# release:
#   stage: release
#   image: registry.gitlab.com/gitlab-org/release-cli:latest
#   only:
#     - develop-ci
#   script:
#     - |
#       release-cli create --name "Release $CI_COMMIT_SHA" --ref $CI_COMMIT_SHA \
#         --assets-link "{\"name\":\"saref-pipeline.jar\",\"url\":\"${PACKAGE_REGISTRY_URL}/saref-pipeline.jar\"}"