Skip to content
Snippets Groups Projects
Unverified Commit 9a68fbcd authored by Maxime Lefrançois's avatar Maxime Lefrançois
Browse files

test release

parent 1fd56c8a
Branches
Tags
No related merge requests found
...@@ -2,36 +2,44 @@ variables: ...@@ -2,36 +2,44 @@ variables:
PORTAL_KEY: <my_private_key> PORTAL_KEY: <my_private_key>
stages: stages:
- build # - build
- upload - deploy_package
# - release - release_job
build: build:
stage: build stage: build
image: maven:3.6.2-jdk-8 image: maven:3.6.2-jdk-8
only:
- develop-ci
script: script:
- mvn package - mvn package
artifacts: artifacts:
paths: paths:
- target/saref-pipeline.jar - target/saref-pipeline.jar
upload: deploy_package:
stage: upload stage: deploy
image: curlimages/curl:latest 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: only:
- develop-ci - develop-ci
needs:
- deploy_package
script: script:
- | - echo "Running the release job for $VERSION from commit $CI_COMMIT_SHA"
echo curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file target/saref-pipeline.jar "${PACKAGE_REGISTRY_URL}/saref-pipeline.jar" release:
tag_name: '$VERSION'
# release: description: '$CI_COMMIT_TAG_MESSAGE'
# stage: release ref: '$CI_COMMIT_SHA'
# image: registry.gitlab.com/gitlab-org/release-cli:latest assets:
# only: links:
# - develop-ci - name: 'saref-pipeline.jar'
# script: url: 'https://labs.etsi.org/rep/api/v4/projects/28/packages/maven/fr/mines-stetienne/ci/saref/saref-pipeline/$VERSION/saref-pipeline-$VERSION.jar'
# - |
# 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\"}"
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<servers>
<server>
<id>gitlab-maven</id>
<configuration>
<httpHeaders>
<property>
<name>Job-Token</name>
<value>${CI_JOB_TOKEN}</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment