Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Wiki Replica
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
TPA
Wiki Replica
Commits
1b8b9dbc
Verified
Commit
1b8b9dbc
authored
1 year ago
by
Jérôme Charaoui
Browse files
Options
Downloads
Patches
Plain Diff
ci: merge find-files into a single job
this job should work with both merge requests and regular commits
parent
7cc9ac80
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
+4
-26
4 additions, 26 deletions
.gitlab-ci.yml
with
4 additions
and
26 deletions
.gitlab-ci.yml
+
4
−
26
View file @
1b8b9dbc
...
...
@@ -8,17 +8,15 @@
# those files. it uses a separate image because
# markdownlint/markdownlint doesn't ship with git (and runs as a
# regular user, so we can't install it either)
find-files
-commit
:
find-files
:
stage
:
build
image
:
debian:stable-slim
script
:
-
apt update && apt install -yy --no-install-recommends git ca-certificates
-
echo "commit SHA $CI_COMMIT_SHA"
-
export LATEST_COMMIT_SHA="${CI_MERGE_REQUEST_SOURCE_BRANCH_SHA:-${CI_COMMIT_SHA}}"
-
echo "commit SHA $LATEST_COMMIT_SHA"
-
|
echo "working on files... $(git diff-tree --no-commit-id --name-only -r $CI_COMMIT_SHA | tee changed-files.txt)"
except
:
refs
:
-
merge_requests
echo "working on files... $(git diff-tree --no-commit-id --name-only -r $LATEST_COMMIT_SHA | tee changed-files.txt)"
only
:
changes
:
-
"
*.md"
...
...
@@ -28,26 +26,6 @@ find-files-commit:
-
changed-files.txt
expose_as
:
'
changed
files'
# this is the same as the above, but for merge requests
find-files-mr
:
stage
:
build
image
:
debian:stable-slim
script
:
-
apt update && apt install -yy --no-install-recommends git ca-certificates
-
echo "MR target SHA $CI_MERGE_REQUEST_TARGET_BRANCH_SHA"
-
|
echo "working on files: $(git diff-tree --no-commit-id --name-only -r $CI_MERGE_REQUEST_TARGET_BRANCH_SHA | tee changed-files.txt)"
only
:
refs
:
-
merge_requests
changes
:
-
"
*.md"
-
"
**/*.md"
artifacts
:
paths
:
-
changed-files.txt
expose_as
:
'
changed
files'
# this compares the current repo with the actual wiki to make sure
# we're not missing any commits, and will fail the push if we need to
# pull from the wiki
...
...
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