Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 47c68976 authored by Christophe Chaudier's avatar Christophe Chaudier :rocket:
Browse files

ci: create release on tag

parent 91cd92cd
No related branches found
No related tags found
1 merge request!4Resolve "ci: release on generic packages"
Pipeline #8493 passed with warnings
......@@ -3,6 +3,12 @@
variables:
IMAGE_NAME: "equivs"
# Package version can only contain numbers (0-9), and dots (.).
# Must be in the format of X.Y.Z, i.e. should match /\A\d+\.\d+\.\d+\z/ regular expresion.
# See https://docs.gitlab.com/ee/user/packages/generic_packages/#publish-a-package-file
PACKAGE_VERSION: ${CI_COMMIT_TAG}
PACKAGE_REGISTRY_URL: "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/cdd-commun/${PACKAGE_VERSION}"
include:
- remote: 'https://gitlab.com/lydra/gitlab-ci-templates/-/raw/master/templates/activate-dind.yml'
......@@ -30,15 +36,29 @@ container:security:
debian:build:
image: lab.frogg.it:5050/lydra/compagnons-devops/linux-installation-automatique/equivs:0.0.2
stage: build
# rules:
# - if: $CI_COMMIT_TAG
# - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
rules:
- if: $CI_COMMIT_TAG
script:
- mkdir artifacts && cd artifacts
- equivs-build ../cdd-commun
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ./cdd-commun_0.0.1_all.deb "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/cdd-commun/0.0.1/cdd-commun.deb"'
- 'curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file ./cdd-commun_0.0.1_all.deb "${PACKAGE_REGISTRY_URL}/cdd-commun.deb"'
artifacts:
paths:
- artifacts/
name: "cdd-commun-debian-metapakage"
expire_in: 2 week
release_job:
stage: delivery
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules:
- if: $CI_COMMIT_TAG # Run this job when a tag is created manually
script:
- echo "Running the release job."
release:
tag_name: ${CI_COMMIT_TAG}
description: 'Release created using the release-cli.'
assets:
links:
- name: 'cdd-commun'
url: '${PACKAGE_REGISTRY_URL}/cdd-commun.deb'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment