Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Reinier Maas
GHC
Commits
069729d3
Commit
069729d3
authored
1 year ago
by
Bryan R
Committed by
Marge Bot
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Guard against duplicate pipelines in forks
parent
76a4d11b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+26
-7
26 additions, 7 deletions
.gitlab-ci.yml
with
26 additions
and
7 deletions
.gitlab-ci.yml
+
26
−
7
View file @
069729d3
...
...
@@ -57,26 +57,45 @@ stages:
# Note [The CI Story]
# ~~~~~~~~~~~~~~~~~~~
#
# There are
two
different types of pipelines:
# There are
a few
different types of pipelines
. Among them
:
#
#
-
marge-bot merges to `master`. Here we perform an exhaustive validation
#
1.
marge-bot merges to `master`. Here we perform an exhaustive validation
# across all of the platforms which we support. In addition, we push
# performance metric notes upstream, providing a persistent record of the
# performance characteristics of the compiler.
#
#
-
merge requests. Here we perform a slightly less exhaustive battery of
#
2.
merge requests. Here we perform a slightly less exhaustive battery of
# testing. Namely we omit some configurations (e.g. the unregisterised job).
# These use the merge request's base commit for performance metric
# comparisons.
#
# These and other pipelines are defined implicitly by the rules of individual
# jobs.
#
# At the top level, however, we can declare that pipelines (of whatever type)
# only run when:
#
# 1. Processing a merge request (as mentioned above)
#
# 2. Processing a tag
#
# 3. Pushing to master on the root ghc/ghc repo (as mentioned above)
#
# 4. Pushing to a release branch on the root ghc/ghc repo
#
# 5. Somebody manually triggers a pipeline from the GitLab UI
#
# In particular, note that pipelines don't automatically run just when changes
# are pushed to a feature branch.
workflow
:
# N.B. Don't run on wip/ branches, instead on run on merge requests.
rules
:
-
if
:
$CI_MERGE_REQUEST_ID
-
if
:
$CI_COMMIT_TAG
-
if
:
'
$CI_COMMIT_BRANCH
==
"master"'
-
if
:
'
$CI_COMMIT_BRANCH
=~
/ghc-[0-9]+\.[0-9]+/'
# N.B.: If we weren't explicit about CI_PROJECT_ID, the following rule would
# cause a duplicate pipeline for merge requests coming from the master
# branch of a fork.
-
if
:
$CI_PROJECT_ID == "1" && $CI_COMMIT_BRANCH == "master"
-
if
:
$CI_PROJECT_ID == "1" && $CI_COMMIT_BRANCH =~ /ghc-[0-9]+\.[0-9]+/
-
if
:
'
$CI_PIPELINE_SOURCE
==
"web"'
# which versions of GHC to allow bootstrap with
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment