@@ -460,12 +460,53 @@ func writeDebianUpstreamMetadata(dir, gopkg string) error {
460
460
}
461
461
462
462
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:
465
465
# https://salsa.debian.org/go-team/infra/pkg-go-tools/blob/master/config/gitlabciyml.go
466
466
---
467
+ stages:
468
+ - test
469
+ - package
470
+
467
471
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.
469
510
`
470
511
471
512
f , err := os .Create (filepath .Join (dir , "debian" , "gitlab-ci.yml" ))
0 commit comments