Skip to content

Instantly share code, notes, and snippets.

@shar1z
Created December 8, 2022 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shar1z/8d4283c00cac8a1a374ff488d792407e to your computer and use it in GitHub Desktop.
Save shar1z/8d4283c00cac8a1a374ff488d792407e to your computer and use it in GitHub Desktop.
CI/CD chatgpt
node {
stage("Clone repository") {
git url: "https://github.com/<username>/<repository>.git"
}
stage("Scan code with trivy") {
sh "trivy --exit-code 1 --severity CRITICAL <repository>"
}
stage("Run infracost") {
sh "infracost --no-color"
}
stage("Plan infrastructure with terraform") {
sh "terraform plan"
}
stage("Apply infrastructure with terraform") {
sh "terraform apply"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment