Required Cloud Environment & Credentials
Goal: To outline the GCP (Google Cloud Platform) resources and credentials that must be provisioned by your GKE/IT Administrator before you can run the pipeline.
This pipeline is designed to securely integrate with a pre-existing GCP environment. Your GKE/IT team is responsible for providing the following assets and information.
1. Required GCP Resources
Please ensure your GKE/IT team has created and provided the names for the following two resources:
- Google Kubernetes Engine (GKE) Cluster: A running GKE cluster where the
application will be deployed.
- You will need: The Cluster Name (e.g., kube-cluster) and its Location/Zone (e.g., us-central1).
- Google Artifact Registry Repository: A Docker repository where
your application's container image will be stored.
- You will need: The full Repository URL (e.g., us-central1-docker.pkg.dev/hclsw-gcp-rbd/hcl-rbd2).
These values are used in the environment block of your Jenkinsfile.
2. Required Jenkins Credential (Service Account JSON Key)
To authenticate, the Jenkins pipeline requires a GCP Service Account Key. This is a secure JSON file that acts as a "password" for Jenkins to interact with your GCP project.
- Action: You must request this JSON key file from your GKE/IT Administrator.
Action: Once you receive the file, you will upload it to Jenkins (as described in Jenkins Platform Setup (Prerequisites)) with the ID hclsw-service_Account.
3. Required IAM Permissions (For Your IT Team)
For your IT team's reference, the Service Account associated with the JSON key must have the following IAM roles in the GCP project:
- roles/artifactregistry.writer (Artifact Registry Writer)
- Purpose: Allows Jenkins to push the built Docker image to the Artifact Registry.
- roles/container.admin (Kubernetes Engine Admin)
- Purpose: Allows Jenkins to get cluster credentials and deploy the Kubernetes manifests (.yaml files).
You can share this requirement with your IT team to ensure the key they provide has the correct permissions.
4. Prerequisite Checklist
Before you can proceed to the final step (running the pipeline), you must have the following information and files from your administrators:
| Item | Example |
| GKE Cluster Name | kube-cluster |
| GKE Cluster Location | us-central1 |
| Artifact Registry URL | us-central1-docker.pkg.dev/... |
| Service Account JSON Key | [Downloaded-File-Name].json |