Skip to content
Snippets Groups Projects
Commit 3cd31760 authored by Daniel Dehennin's avatar Daniel Dehennin
Browse files

Merge branch 'dev' into 'testing'

Prepare a new release

See merge request !28
parents a2b2177c 043b0f00
No related branches found
No related tags found
No related merge requests found
# Changelog # Changelog
# [1.3.0](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/compare/release/1.2.1...release/1.3.0) (2022-01-11)
### Bug Fixes
* **semantic-release:** the branch must be `stable` ([4b9152d](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/4b9152dcae29a8cd792de452041d47da6bf6807c))
### Code Refactoring
* **commitlint:** the upstream extra repository is useless ([cdff4ab](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/cdff4abd8af608b8ab31398c0a6703a50eae0e08))
### Documentation
* **commitlint:** describe usage of the commitlint job ([8b3749f](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/8b3749f044227c390e15480c63f125c24e99767a))
* **getting-started:** quick setup and detailed explanations ([007aa21](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/007aa2195252d8140d8ecd4438f231a973aa30e9))
* **readme:** demonstrate a possible release cycle ([8d02a0c](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/8d02a0cf712cb590cfc3a65d7231a9157bcbbbb6))
### Features
* **commitlint:** users can configure image with `$COMMITLINT_IMAGE` ([bc7f19c](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/bc7f19c3be02a00e03a39ffe31b4fecbd5454964))
* **commitlint:** users can configure the base branch ([612dc3e](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/612dc3ea47080f3213cc6610ec321b4c57fa8e72))
* **docker:** .build-docker-image must accept kaniko arguments ([bd5c77e](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/bd5c77eabbc03fec73b9405ef392197a5029ae29))
* **semantic-release:** don't build changelog on prerelease branches ([5a02f5d](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/5a02f5d23aca195cb18f2e0d865eaf4c13b7351f))
* **semantic-release:** manage python projects releases ([9794bcb](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/9794bcb0b7d427af10e99a65723456953f575182))
### Styles
* **js:** js configuration files do not pass eslint ([5874dca](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/5874dca35effe04f82ff848918706a15012dcf73))
## [1.2.1](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/compare/release/1.2.0...release/1.2.1) (2021-12-09)
### Code Refactoring
* **rules:** permit to combine individual rules ([075712a](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/075712a9d7e7d9cac8731debb0312a092bcefbb2)), closes [#3](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/issues/3)
# [1.2.0](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/compare/release/1.1.0...release/1.2.0) (2021-12-06)
### Features
* **rules:** we want to skip pipelines on more keywords ([0a24edb](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/0a24edbeb188efe3163e28b75cc42e9d1ed21c2e)), closes [#2](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/issues/2)
* **runners:** apps.education projects will use dedicated runners ([3f447c4](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/3f447c40f4d60d84a93e59d14d70c274edc6465b)), closes [#1](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/issues/1)
# [1.1.0](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/compare/release/1.0.0...release/1.1.0) (2021-11-30)
### Features
* **semantic-release:** use the image build by CI itself ([ba0d024](https://gitlab.mim-libre.fr/EOLE/infra/ci-tools/commit/ba0d02416182df2e8ef66d1f4613c95d7ff841ec))
# 1.0.0 (2021-11-30) # 1.0.0 (2021-11-30)
......
...@@ -6,8 +6,32 @@ ...@@ -6,8 +6,32 @@
const branch = process.env.CI_COMMIT_REF_NAME; const branch = process.env.CI_COMMIT_REF_NAME;
const gitAssets = []; const gitAssets = [];
// Configure your branches names
const stableBranch = 'stable';
// Assign a branch name to produce a `testing` prerelease tag
const testingBranch = undefined;
// Assign a branch name to produce a `dev` prerelease tag
const devBranch = undefined;
const semanticBranches = [stableBranch];
if (testingBranch) {
semanticBranches.push({
name: testingBranch,
prerelease: true
});
}
if (devBranch) {
semanticBranches.push({
name: devBranch,
prerelease: true
});
}
const config = { const config = {
branches: 'master', branches: semanticBranches,
/* eslint no-template-curly-in-string: "off" */ /* eslint no-template-curly-in-string: "off" */
tagFormat: 'release/${version}', tagFormat: 'release/${version}',
plugins: [ plugins: [
......
...@@ -47,6 +47,9 @@ ...@@ -47,6 +47,9 @@
# We can't merge rules with `!reference` until we switch to Gitlab >= 14.3 # We can't merge rules with `!reference` until we switch to Gitlab >= 14.3
# https://gitlab.com/gitlab-org/gitlab/-/issues/322992 # https://gitlab.com/gitlab-org/gitlab/-/issues/322992
# Use a `.rules-map` as a workaround # Use a `.rules-map` as a workaround
#
semantic-release:
extends: .semantic-release:stable
.on-stable-with-semantic-release-config: .on-stable-with-semantic-release-config:
rules: rules:
...@@ -63,7 +66,37 @@ ...@@ -63,7 +66,37 @@
- .releaserc.js - .releaserc.js
when: on_success when: on_success
semantic-release: .on-testing-with-semantic-release-config:
rules:
- !reference [.rules-map, not-on-schedule]
- !reference [.rules-map, not-on-draft]
- !reference [.rules-map, not-on-semantic-release-commit]
- if: $CI_COMMIT_BRANCH == $TESTING_BRANCH
exists:
- release.config.js
- .releaserc
- .releaserc.yaml
- .releaserc.yml
- .releaserc.json
- .releaserc.js
when: on_success
.on-dev-with-semantic-release-config:
rules:
- !reference [.rules-map, not-on-schedule]
- !reference [.rules-map, not-on-draft]
- !reference [.rules-map, not-on-semantic-release-commit]
- if: $CI_COMMIT_BRANCH == $DEV_BRANCH
exists:
- release.config.js
- .releaserc
- .releaserc.yaml
- .releaserc.yml
- .releaserc.json
- .releaserc.js
when: on_success
.semantic-release:stable:
stage: release stage: release
extends: .on-stable-with-semantic-release-config extends: .on-stable-with-semantic-release-config
image: "$SEMANTIC_RELEASE_IMAGE" image: "$SEMANTIC_RELEASE_IMAGE"
......
...@@ -101,6 +101,20 @@ variables: ...@@ -101,6 +101,20 @@ variables:
- !reference [.rules-map, not-on-draft] - !reference [.rules-map, not-on-draft]
- !reference [.rules-map, on-release-tag] - !reference [.rules-map, on-release-tag]
# Select the protected testing tags
.on-testing-tag:
rules:
- !reference [.rules-map, not-on-schedule]
- !reference [.rules-map, not-on-draft]
- !reference [.rules-map, on-testing-tag]
# Select the protected dev tags
.on-dev-tag:
rules:
- !reference [.rules-map, not-on-schedule]
- !reference [.rules-map, not-on-draft]
- !reference [.rules-map, on-dev-tag]
# We use a single rules hash to be referenced as array elements by # We use a single rules hash to be referenced as array elements by
# individual rules templates above. # individual rules templates above.
# This avoid the duplication of rules conditions # This avoid the duplication of rules conditions
...@@ -152,6 +166,12 @@ variables: ...@@ -152,6 +166,12 @@ variables:
if: $CI_COMMIT_TAG if: $CI_COMMIT_TAG
when: on_success when: on_success
on-release-tag: on-release-tag:
if: $CI_COMMIT_TAG =~ /^release\// && $CI_COMMIT_REF_PROTECTED if: $CI_COMMIT_TAG =~ /^release\/[0-9]+\.[0-9]+\.[0-9]+$/ && $CI_COMMIT_REF_PROTECTED
when: on_success
on-testing-tag:
if: $CI_COMMIT_TAG =~ /^release\/[0-9]+\.[0-9]+\.[0-9]+-testing/ && $CI_COMMIT_REF_PROTECTED
when: on_success
on-dev-tag:
if: $CI_COMMIT_TAG =~ /^release\/[0-9]+\.[0-9]+\.[0-9]+-dev/ && $CI_COMMIT_REF_PROTECTED
when: on_success when: on_success
... ...
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