Skip to content

Commit

Permalink
Update Salsa CI configuration
Browse files Browse the repository at this point in the history
This is the follow-up to the update of the authoritative copy in pkg-go-tools.
  • Loading branch information
Maytha8 committed Jan 8, 2025
1 parent d70d43c commit 7091e81
Showing 1 changed file with 44 additions and 3 deletions.
47 changes: 44 additions & 3 deletions template.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,53 @@ func writeDebianUpstreamMetadata(dir, gopkg string) error {
}

func writeDebianGitLabCI(dir string) error {
const gitlabciymlTmpl = `# auto-generated, DO NOT MODIFY.
# The authoritative copy of this file lives at:
const gitlabciymlTmpl = `# DO NOT MODIFY
# This file was automatically generated from the authoritative copy at:
# https://salsa.debian.org/go-team/infra/pkg-go-tools/blob/master/config/gitlabciyml.go
---
stages:
- test
- package
include:
- https://salsa.debian.org/go-team/infra/pkg-go-tools/-/raw/master/pipeline/test-archive.yml
- project: go-team/infra/pkg-go-tools
ref: master
file: pipeline/test-archive.yml
# Run the Go team CI only in the go-team project that has access to GitLab
# CI runners tagged 'go-ci'
rules:
- if: $CI_PROJECT_ROOT_NAMESPACE == "go-team"
Salsa CI:
stage: package
trigger:
include:
- project: salsa-ci-team/pipeline
ref: master
file: recipes/debian.yml
strategy: depend
rules:
# Do not create a pipeline for tags unless SALSA_CI_ENABLE_PIPELINE_ON_TAGS is set
- if: $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/
when: never
# Avoid duplicated pipelines, do not run detached pipelines
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
# Run Salsa CI only if the Play button is pressed on the pipeline
- if: $CI_PIPELINE_SOURCE == "push"
when: manual
variables:
SALSA_CI_DISABLE_REPROTEST: 1 # Disable to save CI runner resources
# If Salsa CI is not running at
# https://salsa.debian.org/%{project_path}/-/pipelines, ensure that
# https://salsa.debian.org/%{project_path}/-/settings/ci_cd has in field "CI/CD
# configuration file" the same filename as this file.
#
# If Salsa CI is running, but first job is stuck because the project doesn't
# have any runners online assigned to it, ensure that
# https://salsa.debian.org/%{project_path}/-/settings/ci_cd has under "Runners"
# the setting for "Enable instance runners for this project" enabled.
`

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

0 comments on commit 7091e81

Please sign in to comment.