File: salsa-ci.yml

package info (click to toggle)
debian-codemods 0.171
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 12,312 kB
  • sloc: makefile: 888; xml: 119; python: 80; sh: 69; javascript: 3
file content (124 lines) | stat: -rw-r--r-- 4,450 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
include:
  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml

variables:
  SALSA_CI_DISABLE_BLHC: 1
  # Package is so large best to skip extra builds in Salsa CI to save resources
  SALSA_CI_DISABLE_BUILD_PACKAGE_I386: 1
  SALSA_CI_DISABLE_REPROTEST: 1
  # Build for experimental distribution
  # RELEASE: 'experimental'
  # Enable parallel builds - uses all available CPU cores
  SALSA_CI_DPKG_BUILDPACKAGE_ARGS: "-j$(nproc)"
  # Enable debug logging for tests via DEB_BUILD_OPTIONS
  DEB_BUILD_OPTIONS: "debug"

  # Pull in extra dependencies that may not be in unstable yet, but are needed
  # for the build or tests. This is a temporary measure until they are
  # available in the main Debian repositories.
  SALSA_CI_EXTRA_REPOSITORY: "deb [trusted=yes] https://people.debian.org/~jelmer/debian-codemods-deps ./"
  SALSA_CI_MMDEBSTRAP_EXTRA_ARGS: --include=ca-certificates
  SALSA_CI_IMAGES_BASE_PACKAGES: ca-certificates

stages:
  - lint
  - provisioning
  - build
  - test
  - publish

# Build takes about 60-70 minute without caching on Salsa CI runners
build:
  extends: .build-package
  timeout: 3h

cargo-fmt:
  stage: lint
  image: rust:latest
  script:
    - rustup component add rustfmt
    - cargo fmt --all -- --check
  cache:
    key:
      files:
        - Cargo.lock
    paths:
      - .cargo/registry
      - .cargo/git
      - target/

# Scheduled update jobs - these run on a schedule and create MRs with updates
update-spdx:
  stage: build
  image: debian:unstable
  script:
    - apt-get update
    - apt-get install -y git brz python3 python3-requests ca-certificates
    - git config user.name "Salsa CI Bot"
    - git config user.email "noreply@salsa.debian.org"
    - make update-spdx || true
    - |
      if ! git diff --quiet spdx.json; then
        BRANCH_NAME="auto-update-spdx-$(date +%Y%m%d-%H%M%S)"
        git checkout -b "$BRANCH_NAME"
        git add spdx.json
        git commit -m "Update SPDX license data"
        git push -o merge_request.create -o merge_request.title="Update SPDX license data" -o merge_request.description="Automated update of SPDX license data from scheduled CI job." https://oauth2:${CI_JOB_TOKEN}@salsa.debian.org/${CI_PROJECT_PATH}.git "HEAD:refs/heads/${BRANCH_NAME}"
      else
        echo "No changes to spdx.json"
      fi
  only:
    - schedules
  variables:
    GIT_STRATEGY: clone

update-readme:
  stage: build
  image: debian:unstable
  script:
    - apt-get update
    - apt-get install -y git brz python3 python3-debian python3-breezy ca-certificates build-essential cargo rustc libpq-dev
    - git config user.name "Salsa CI Bot"
    - git config user.email "noreply@salsa.debian.org"
    - make build
    - make update-readme || true
    - |
      if ! git diff --quiet README.md; then
        BRANCH_NAME="auto-update-readme-$(date +%Y%m%d-%H%M%S)"
        git checkout -b "$BRANCH_NAME"
        git add README.md
        git commit -m "Update list of fixers in README.md"
        git push -o merge_request.create -o merge_request.title="Update list of fixers in README.md" -o merge_request.description="Automated update of the list of supported lintian fixers in README.md from scheduled CI job." https://oauth2:${CI_JOB_TOKEN}@salsa.debian.org/${CI_PROJECT_PATH}.git "HEAD:refs/heads/${BRANCH_NAME}"
      else
        echo "No changes to README.md"
      fi
  only:
    - schedules
  variables:
    GIT_STRATEGY: clone
  timeout: 2h

update-renamed-tags:
  stage: build
  image: debian:unstable
  script:
    - apt-get update
    - apt-get install -y git brz python3 python3-debian lintian ca-certificates
    - git config user.name "Salsa CI Bot"
    - git config user.email "noreply@salsa.debian.org"
    - make update-renamed-tags || true
    - |
      if ! git diff --quiet lintian-brush/renamed-tags.json; then
        BRANCH_NAME="auto-update-renamed-tags-$(date +%Y%m%d-%H%M%S)"
        git checkout -b "$BRANCH_NAME"
        git add lintian-brush/renamed-tags.json
        git commit -m "Update renamed tags"
        git push -o merge_request.create -o merge_request.title="Update renamed tags" -o merge_request.description="Automated update of renamed lintian tags from scheduled CI job." https://oauth2:${CI_JOB_TOKEN}@salsa.debian.org/${CI_PROJECT_PATH}.git "HEAD:refs/heads/${BRANCH_NAME}"
      else
        echo "No changes to renamed-tags.json"
      fi
  only:
    - schedules
  variables:
    GIT_STRATEGY: clone