Skip to content

Use standard Salsa CI with standard settings instead of custom Go team CI #279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 14 additions & 45 deletions template.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,53 +460,22 @@ func writeDebianUpstreamMetadata(dir, gopkg string) error {
}

func writeDebianGitLabCI(dir string) error {
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
const gitlabciymlTmpl = `# This is a template from
# https://salsa.debian.org/salsa-ci-team/pipeline/-/raw/master/recipes/salsa-ci.yml
#
# If this pipeline is not running at after committing and pushing this file,
# ensure that https://salsa.debian.org/%{project_path}/-/settings/ci_cd has in
# field "CI/CD configuration file" filename "debian/salsa-ci.yml", the filename
# is the same as of this file, and duplicate files with similar contents but
# different filenames have been cleaned away.
#
# Feel free disable and enable tests to find a good balance between extensive
# coverage and having a consistently green pipeline where failures are rare
# enough that they are always investigated and addressed. For documentation
# please read https://salsa.debian.org/salsa-ci-team/pipeline
---
stages:
- test
- package

include:
- 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.
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml
`

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