Skip to content
Snippets Groups Projects
Commit b1f30265 authored by Michael's avatar Michael :herb: Committed by Marco Wettstein
Browse files

refactor(ci-includes): manual release rules

parent 3746b1ba
No related branches found
No related tags found
1 merge request!225feat(pipeline): do not create pipeline from schedules
...@@ -6,9 +6,7 @@ import { ...@@ -6,9 +6,7 @@ import {
RULES_ALWAYS, RULES_ALWAYS,
getRunnerImage, getRunnerImage,
RULES_RELEASE, RULES_RELEASE,
RULE_NEVER_ON_RELEASE_COMMIT, RULES_MANUAL_RELEASE,
RULE_CONDITION_MAIN_BRANCH,
RULE_CONDITION_HOTFIX_BRANCH,
} from "@catladder/pipeline"; } from "@catladder/pipeline";
type GitlabJobDefWithTrigger = Omit<GitlabJobDef, "script"> & { type GitlabJobDefWithTrigger = Omit<GitlabJobDef, "script"> & {
...@@ -72,17 +70,7 @@ export const createGitlabBaseInclude = () => { ...@@ -72,17 +70,7 @@ export const createGitlabBaseInclude = () => {
image: getRunnerImage("semantic-release"), image: getRunnerImage("semantic-release"),
script: ["semanticRelease"], script: ["semanticRelease"],
needs: [], needs: [],
rules: [ rules: RULES_MANUAL_RELEASE,
RULE_NEVER_ON_RELEASE_COMMIT,
{
if: RULE_CONDITION_MAIN_BRANCH,
when: "manual",
},
{
if: RULE_CONDITION_HOTFIX_BRANCH,
when: "manual",
},
],
}, },
}; };
return { return {
......
...@@ -41,3 +41,15 @@ export const RULES_RELEASE: GitlabRule[] = [ ...@@ -41,3 +41,15 @@ export const RULES_RELEASE: GitlabRule[] = [
when: "manual", when: "manual",
}, },
]; ];
export const RULES_MANUAL_RELEASE: GitlabRule[] = [
RULE_NEVER_ON_RELEASE_COMMIT,
{
if: RULE_CONDITION_MAIN_BRANCH,
when: "manual",
},
{
if: RULE_CONDITION_HOTFIX_BRANCH,
when: "manual",
},
];
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