Skip to content

Commit cdc1ff4

Browse files
Maytha8ottok
authored andcommitted
Update Salsa CI configuration
This is the follow-up to the update of the authoritative copy in pkg-go-tools.
1 parent e0737f9 commit cdc1ff4

File tree

1 file changed

+44
-3
lines changed

1 file changed

+44
-3
lines changed

template.go

Lines changed: 44 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,12 +460,53 @@ func writeDebianUpstreamMetadata(dir, gopkg string) error {
460460
}
461461

462462
func writeDebianGitLabCI(dir string) error {
463-
const gitlabciymlTmpl = `# auto-generated, DO NOT MODIFY.
464-
# The authoritative copy of this file lives at:
463+
const gitlabciymlTmpl = `# DO NOT MODIFY
464+
# This file was automatically generated from the authoritative copy at:
465465
# https://salsa.debian.org/go-team/infra/pkg-go-tools/blob/master/config/gitlabciyml.go
466466
---
467+
stages:
468+
- test
469+
- package
470+
467471
include:
468-
- https://salsa.debian.org/go-team/infra/pkg-go-tools/-/raw/master/pipeline/test-archive.yml
472+
- project: go-team/infra/pkg-go-tools
473+
ref: master
474+
file: pipeline/test-archive.yml
475+
# Run the Go team CI only in the go-team project that has access to GitLab
476+
# CI runners tagged 'go-ci'
477+
rules:
478+
- if: $CI_PROJECT_ROOT_NAMESPACE == "go-team"
479+
480+
Salsa CI:
481+
stage: package
482+
trigger:
483+
include:
484+
- project: salsa-ci-team/pipeline
485+
ref: master
486+
file: recipes/debian.yml
487+
strategy: depend
488+
rules:
489+
# Do not create a pipeline for tags unless SALSA_CI_ENABLE_PIPELINE_ON_TAGS is set
490+
- if: $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
491+
when: never
492+
# Avoid duplicated pipelines, do not run detached pipelines
493+
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
494+
when: never
495+
# Run Salsa CI only if the Play button is pressed on the pipeline
496+
- if: $CI_PIPELINE_SOURCE == "push"
497+
when: manual
498+
variables:
499+
SALSA_CI_DISABLE_REPROTEST: 1 # Disable to save CI runner resources
500+
501+
# If Salsa CI is not running at
502+
# https://salsa.debian.org/%{project_path}/-/pipelines, ensure that
503+
# https://salsa.debian.org/%{project_path}/-/settings/ci_cd has in field "CI/CD
504+
# configuration file" the same filename as this file.
505+
#
506+
# If Salsa CI is running, but first job is stuck because the project doesn't
507+
# have any runners online assigned to it, ensure that
508+
# https://salsa.debian.org/%{project_path}/-/settings/ci_cd has under "Runners"
509+
# the setting for "Enable instance runners for this project" enabled.
469510
`
470511

471512
f, err := os.Create(filepath.Join(dir, "debian", "gitlab-ci.yml"))

0 commit comments

Comments
 (0)