-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Gitgaurdian scan support #1122
Conversation
[$class: 'StringParameterValue', name: 'FRAMEWORK_BRANCH', value: "${params.FRAMEWORK_BRANCH}"], | ||
[$class: 'StringParameterValue', name: 'VERSION', value: "${params.VERSION}"], | ||
[$class: 'StringParameterValue', name: 'SHARED_LIB_BRANCH', value: "${params.SHARED_LIB_BRANCH}"] | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of the indentation here is pretty deep - I think 8 spaces instead of 4. I recommend reducing to 4 throughout, for consistency and legitibility.
stage('GitGaurdian Scan') { | ||
environment { | ||
GITGUARDIAN_API_KEY = credentials('gitgaudian-ravi-token') | ||
} | ||
agent { label "docker" } | ||
steps { | ||
withDockerContainer(args: "-i --entrypoint=''", image: 'gitguardian/ggshield:latest') { | ||
sh 'ggshield secret scan ci' | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder how long this takes. We may wish to run this in a parallel
block.
sh """# Move the clamav-documentation here. | ||
cp -r ../../clamav_documentation/* . | ||
# Clean-up | ||
rm -rf ../../clamav_documentation | ||
rm -rf .git .nojekyll CNAME Placeholder || true | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit loses some indentation here and in other script blocks that makes it easier to see the script content separate from the jenkins command. I would prefer to keep that.
E.g.
sh """# Move the clamav-documentation here.
cp -r ../../clamav_documentation/* .
# Clean-up
rm -rf ../../clamav_documentation
rm -rf .git .nojekyll CNAME Placeholder || true
"""
or maybe
sh """
# Move the clamav-documentation here.
cp -r ../../clamav_documentation/* .
# Clean-up
rm -rf ../../clamav_documentation
rm -rf .git .nojekyll CNAME Placeholder || true
"""
archiveArtifacts(artifacts: "clamav-${params.VERSION}*.tar.gz", onlyIfSuccessful: true) | ||
stage('GitGaurdian Scan') { | ||
environment { | ||
GITGUARDIAN_API_KEY = credentials('gitgaudian-ravi-token') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GITGUARDIAN_API_KEY = credentials('gitgaudian-ravi-token') | |
GITGUARDIAN_API_KEY = credentials('gitgaudian-ravi-token') |
We may need a generic account/team account for this token so it doesn't have to be a personal one.
Also, minor typo "gitgaudian" should be "gitgaurdian".
Adding GitGaurdian Scan support to scan the CI pipeline for every commit.
Changing Jenkins pipeline to declarative from scripted pipeline.