Shared functionality for Jenkins Pipeline Groovy scripts.
Included by the Pipeline Shared Groovy Libraries Plugin
Documentation: https://jenkins.io/doc/book/pipeline/shared-libraries/
Ensures that the given executable is available on the current Jenkins agent, installing it with a Jenkins tool installer if necessary.
Returns the customized configuration per contents of a kustomization.yaml as a string.
Requests OpenShift to apply the given configuration and waits for the rollout to be finished.
Compares the OpenShift configuration/resources given in the configuration argument against the resources in an OpenShift project.
Processes an OpenShift template to get the final configuration. Use the output with openshiftApply to apply the configuration against your project.
Requests OpenShift to start build from the specified build config and waits for the build to be finished.
Runs the OWASP dependency-check tool.
Sends message to the specified WebHook.
This class was implemented to read and delete Docker Images by tag names.
File: DockerHub.groovy
This class was implemented to organize images by API on the Quay registry.
File: Quay.groovy
Sample pipeline:
import com.puzzleitc.jenkins.Quay
pipeline {
agent any
environment {
CRED = 'quay-token'
REGISTRY_URL = 'https://quay.io'
ORG = 'test-org'
REPOSITORY = 'test-repository'
TAG='latest'
NEW_TAG='later'
}
stages {
stage('set tag') {
steps {
script {
Quay quay = new Quay(this, env.CRED, env.REGISTRY_URL)
// get sha of image referenced by the tag
def sha = quay.getTagManifest(env.ORG, env.REPOSITORY, env.TAG)
println "SHA: " + sha
// add new tag to image
quay.addTag(env.ORG, env.REPOSITORY, sha, env.NEW_TAG)
}
}
}
}
}
The Integration Pipeline provides functionality that helps with microservice promotion and deployment.
See the testing concept