Skip to content
Snippets Groups Projects
Commit 7501c731 authored by Dylan Aïssi's avatar Dylan Aïssi
Browse files

Add variables to select which part (build dashboard or trigger) to include in the pipeline


Signed-off-by: default avatarDylan Aïssi <dylan.aissi@collabora.com>
parent cc12f6bd
No related branches found
No related tags found
1 merge request!231Split pipeline in two parts: one for building dashboard, the other one for triggering jobs
Pipeline #740371 passed
......@@ -78,10 +78,28 @@ variables:
options:
- "yes"
- "no"
SKIP_BUILD_DASHBOARD:
description: |
Set to yes to skip jobs building the dashboard.
value: ""
options:
- ""
- "yes"
SKIP_TRIGGER_JOBS:
description: |
Set to yes to skip jobs triggering gitlab-rulez and trigger-updates.
value: ""
options:
- ""
- "yes"
include:
- local: .gitlab-ci/dashboard.yml
rules:
- if: '$SKIP_BUILD_DASHBOARD != "yes"'
- local: .gitlab-ci/trigger-jobs.yml
rules:
- if: '$SKIP_TRIGGER_JOBS != "yes"'
stages:
- lint
......
......@@ -17,8 +17,13 @@ trigger-updates:
JOB_ID=${TRIGGER_FROM_JOB##*/}
JOB_API_URL=$CI_API_V4_URL/projects/$CI_PROJECT_ID/jobs/$JOB_ID/
wget --header "JOB-TOKEN: $CI_JOB_TOKEN" "$JOB_API_URL/artifacts/public/packaging.json"
else
elif [ -e public/packaging.json ]
then
echo "Using public/packaging.json to define updatable packages"
cp public/packaging.json .
else
echo "🛑 packaging.json is unavailable, please define TRIGGER_FROM_JOB or set INCLUDE_BUILD_DASHBOARD to yes"
exit 1
fi
- |
if [ -z "$TRIGGER_UPDATES" ]
......
......@@ -193,18 +193,18 @@
<ul class="list-inline mr-auto">
<a class="btn btn-primary {{'disabled' if not summary.wrong_settings_count }}"
title="Apply default settings to packages repositories"
href="{{- meta.new_pipeline_url -}}&amp;var[TRIGGER_GITLAB_RULEZ]=apply
href="{{- meta.new_pipeline_url -}}&amp;var[TRIGGER_GITLAB_RULEZ]=apply&amp;var[INCLUDE_BUILD_DASHBOARD]=no
">Run gitlab-rulez</a>
<a class="btn btn-primary {{'disabled' if not summary.total_updates_count }}"
title="Trigger pipelines importing updates"
href="{{- meta.new_pipeline_url -}}&amp;var[TRIGGER_UPDATES]=*
href="{{- meta.new_pipeline_url -}}&amp;var[TRIGGER_UPDATES]=*&amp;var[INCLUDE_BUILD_DASHBOARD]=no
{%- if meta.current_job_url -%}
&amp;var[TRIGGER_FROM_JOB]={{- meta.current_job_url -}}
{%- endif -%}
">Update all</a>
<a class="btn btn-danger {{'disabled' if not summary.update_errors_count }}"
title="Trigger pipelines importing security updates"
href="{{- meta.new_pipeline_url -}}&amp;var[TRIGGER_UPDATES]=*&amp;var[TRIGGER_SECURITY_UPDATES]=1
href="{{- meta.new_pipeline_url -}}&amp;var[TRIGGER_UPDATES]=*&amp;var[TRIGGER_SECURITY_UPDATES]=1&amp;var[INCLUDE_BUILD_DASHBOARD]=no
{%- if meta.current_job_url -%}
&amp;var[TRIGGER_FROM_JOB]={{- meta.current_job_url -}}
{%- endif -%}
......
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