Unverified Commit 6738880a authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

test release

parent 5c0e1c06
Loading
Loading
Loading
Loading
+13 −14
Original line number Diff line number Diff line
@@ -12,31 +12,30 @@ stages:
#     paths:
#       - target/saref-pipeline.jar

# deploy_package:
#   stage: deploy
#   script:
#     - mvn deploy -s ci_settings.xml
#     - echo VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) > target/build.env
#   artifacts:
#     reports:
#       dotenv: target/build.env
#   only:
#     - develop-ci
deploy_package:
  stage: deploy
  script:
    - mvn deploy -s ci_settings.xml
    - echo VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) > target/build.env
  artifacts:
    reports:
      dotenv: target/build.env
  only:
    - develop-ci

release_job:
  stage: release
  image: registry.gitlab.com/gitlab-org/release-cli:latest
  only:
    - develop-ci
  # needs: 
  #   - deploy_package
  needs: 
    - deploy_package
  script:
    - echo "Running the release job for $VERSION from commit $CI_COMMIT_SHA"
    - curl --location --output release-cli "https://gitlab.com/api/v4/projects/gitlab-org%2Frelease-cli/packages/generic/release-cli/latest/release-cli-linux-amd64"
    - chmod +x release-cli
    - ./release-cli -v
    - ./release-cli create --description "Release $VERSION" --tag-name "$VERSION" --ref "$CI_COMMIT_SHA" --assets-link "{\"url\":\"https://labs.etsi.org/rep/api/v4/projects/28/packages/maven/fr/mines-stetienne/ci/saref/saref-pipeline/$VERSION/saref-pipeline-$VERSION.jar\",\"name\":\"saref-pipeline.jar\"}"
    # - hostnamectl ; lsb_release -a ; cat /etc/os-release
    - ./release-cli create --description "Release $VERSION" --tag-name "$VERSION" --ref "$CI_COMMIT_SHA" --job-token $CI_JOB_TOKEN --assets-link "{\"url\":\"https://labs.etsi.org/rep/api/v4/projects/28/packages/maven/fr/mines-stetienne/ci/saref/saref-pipeline/$VERSION/saref-pipeline-$VERSION.jar\",\"name\":\"saref-pipeline.jar\"}"
  # release:
  #   tag_name: '$VERSION'
  #   description: '$CI_COMMIT_TAG_MESSAGE'