-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
97 lines (93 loc) · 2.44 KB
/
.gitlab-ci.yml
File metadata and controls
97 lines (93 loc) · 2.44 KB
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
include:
- local: pipeline/docker.yaml
- component: $CI_SERVER_FQDN/uniget-org/components/renovate@renovate/1.0.7
inputs:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_JOB == "renovate"
- if: $CI_PIPELINE_SOURCE == "web" && $SCHEDULED_JOB == "renovate"
token_variable_name: RENOVATE_TOKEN
github_token_variable_name: RENOVATE_GITHUB_TOKEN
test:
rules:
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_PIPELINE_SOURCE == "web" && $SCHEDULED_JOB == "test"
trigger:
include: pipeline/test.yaml
strategy: depend
release_notes:
rules:
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/
image: registry.gitlab.com/uniget-org/cli:noble
variables:
GIT_DEPTH: 0
GLAB_SEND_TELEMETRY: 0
before_script: |
uniget install glab
glab auth login --hostname="${CI_SERVER_HOST}" --token="${BACKLOG_TOKEN}"
script: |
bash scripts/release-notes-gitlab.sh >release-notes.md
artifacts:
paths:
- release-notes.md
release:
rules:
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/
needs:
- test
- release_notes
extends:
- .docker
- .docker:dind
id_tokens:
SIGSTORE_ID_TOKEN:
aud: sigstore
variables:
GIT_DEPTH: 0
RUNNER_GENERATE_ARTIFACTS_METADATA: "true"
before_script: |
if ! test -s release-notes.md; then
echo "Release notes not found"
exit 1
fi
script:
- test -n "$CI_SERVER_HOST"
- test -n "$CI_JOB_TOKEN"
- test -n "$GITLAB_TOKEN"
- test -n "$SIGSTORE_ID_TOKEN"
- |
docker buildx build \
--target=publish-gitlab \
--build-arg=CI_SERVER_HOST \
--build-arg=CI_JOB_TOKEN \
--build-arg=GITLAB_TOKEN \
--build-arg=SIGSTORE_ID_TOKEN \
.
artifacts:
paths:
- "*-metadata.json"
tags:
- saas-linux-medium-amd64
images:
rules:
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/
needs:
- release
variables:
PUSH: "true"
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- Dockerfile
variables:
PUSH: "false"
- if: $CI_PIPELINE_SOURCE == "web"
variables:
PUSH: "true"
- if: $CI_PIPELINE_SOURCE == "schedule" && $SCHEDULED_JOB == "daily_rebuild"
variables:
PUSH: "true"
- if: $CI_PIPELINE_SOURCE == "web" && $SCHEDULED_JOB == "images"
trigger:
include: pipeline/image.yaml
strategy: depend