Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
aeec5e1c
Commit
aeec5e1c
authored
Jan 12, 2021
by
Zach Rice
Committed by
Shinya Maeda
Jan 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Secret detection no run on tag
parent
720bd35b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
changelogs/unreleased/secret-detection-no-run-on-tag.yml
changelogs/unreleased/secret-detection-no-run-on-tag.yml
+5
-0
lib/gitlab/ci/templates/Security/Secret-Detection.gitlab-ci.yml
...tlab/ci/templates/Security/Secret-Detection.gitlab-ci.yml
+1
-0
No files found.
changelogs/unreleased/secret-detection-no-run-on-tag.yml
0 → 100644
View file @
aeec5e1c
---
title
:
Skip secret_detection on tags
merge_request
:
51129
author
:
type
:
changed
lib/gitlab/ci/templates/Security/Secret-Detection.gitlab-ci.yml
View file @
aeec5e1c
...
@@ -37,6 +37,7 @@ secret_detection:
...
@@ -37,6 +37,7 @@ secret_detection:
when
:
never
when
:
never
-
if
:
$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
-
if
:
$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
script
:
script
:
-
if [[ $CI_COMMIT_TAG ]]; echo "Skipping Secret Detection for tags. No code changes have occurred."; then exit 0; fi
-
git fetch origin $CI_DEFAULT_BRANCH $CI_COMMIT_REF_NAME
-
git fetch origin $CI_DEFAULT_BRANCH $CI_COMMIT_REF_NAME
-
git log --left-right --cherry-pick --pretty=format:"%H" refs/remotes/origin/$CI_DEFAULT_BRANCH...refs/remotes/origin/$CI_COMMIT_REF_NAME > "$CI_COMMIT_SHA"_commit_list.txt
-
git log --left-right --cherry-pick --pretty=format:"%H" refs/remotes/origin/$CI_DEFAULT_BRANCH...refs/remotes/origin/$CI_COMMIT_REF_NAME > "$CI_COMMIT_SHA"_commit_list.txt
-
export SECRET_DETECTION_COMMITS_FILE="$CI_COMMIT_SHA"_commit_list.txt
-
export SECRET_DETECTION_COMMITS_FILE="$CI_COMMIT_SHA"_commit_list.txt
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment