Chapter 1. Configuring Jenkins with the appropriate credentials
To set up Jenkins for seamless integration with ACS, Quay, and GitOps, you need to configure it with the required credentials. This setup allows Jenkins to perform essential security tasks such as vulnerability scanning, image signing, and attestations. Proper configuration ensures that your pipeline runs securely and efficiently.
Prerequisites
- You must have the necessary permissions to create and manage Jenkins jobs.
- You must have appropriate ACS, Quay, and GitOps credentials.
-
You must have the Cosign private key, Cosign public key, and Cosign password, which together are referred to as the “Cosign signing secret”. The values used for these credentials are already Base64-encoded, so you do not need to convert them. You can find these credentials in your
~/install_values.txtfile.
Procedure
- Open your Jenkins instance in a web browser and log in with your admin credentials.
- Select on your username at the top right corner of the Jenkins dashboard.
- From the left sidebar, select Credentials.
- Choose the appropriate domain where you want to add the credentials. Typically, it’s Global credentials (unrestricted).
- Select Add Credentials.
- From the Kind drop-down list, select Secret text.
- Keep the default value in the Scope drop-down list as Global (Jenkins).
- In the Secret field, enter your ACS API token.
-
In the ID field, enter
ROX_API_TOKEN. - In the Description field, enter an appropriate description for the credentials.
Repeat steps 5-10 for the following credentials:
Expand ID
Secret
ROX_CENTRAL_ENDPOINTThe route to your ACS instance. If not provided, the ACS task in the pipeline will operates as a NOOP (No Operation).
GITOPS_AUTH_PASSWORDThe token the system uses to update the GitOps repository for newly built images.
GITOPS_AUTH_USERNAME(optional)The parameter required for Jenkins to work with GitLab.
You also need to uncomment a line with this parameter in a Jenkinsfile:
GITOPS_AUTH_USERNAME = credentials('GITOPS_AUTH_USERNAME'). By default, this line is commented out.QUAY_IO_CREDSThe credentials for Quay used to push the images.
COSIGN_SECRET_KEYThe signing secret used to sign images and attestations.
COSIGN_PUBLIC_KEYThe public key used to verify images created by your build pipeline.
COSIGN_SECRET_PASSWORDThe password required to use the signing secret for signing images.
Now Jenkins is ready with the credentials needed for secure builds.