mirror of
https://github.com/google/nomulus
synced 2026-08-21 22:56:19 +00:00
Build Cloud Deploy artifacts via Cloud Build job (#3044)
* add README * updating comments/files
This commit is contained in:
@@ -10,12 +10,30 @@ Defines the `DeliveryPipeline` resource named `deploy-nomulus`. It sets up the s
|
||||
### Target Configurations (e.g., `crash-target.yaml`)
|
||||
Files matching this format define the `Target` resources for Cloud Deploy. They specify the GKE cluster and other environment-specific settings for deployment.
|
||||
|
||||
### Environment Configurations (e.g., `crash-config.yaml`)
|
||||
Configuration files containing environment-specific parameters and SLA-based alert policy checks (such as EPP and RDAP success metrics) used for automated analysis and target population.
|
||||
|
||||
### `skaffold.yaml`
|
||||
Defines the Skaffold configuration used by Cloud Deploy to render and deploy the application manifests.
|
||||
|
||||
## Usage
|
||||
## Automated Configuration and Deployment Process
|
||||
|
||||
You can apply or modify these configurations in Google Cloud by using the `gcloud` CLI. For example:
|
||||
The preparation and application of Cloud Deploy configurations is automated via Cloud Build using `release/cloudbuild-clouddeploy.yaml`.
|
||||
|
||||
When executed, the Cloud Build job performs the following workflow:
|
||||
1. **Repository Merge**: Clones the internal repository (`nomulus-internal`) and merges internal configurations into the workspace.
|
||||
2. **Dynamic Configuration Population**: Reads variables and alert policy checks specified in the configuration file for the environment from the internal repository, populating them into `delivery-pipeline.yaml` and the corresponding target files.
|
||||
3. **Apply Configurations**: Runs `gcloud deploy apply` to register the updated targets and delivery pipeline in Google Cloud Deploy.
|
||||
|
||||
### Manual Execution on Cloud Build
|
||||
To manually trigger this configuration pipeline on Google Cloud Build, run:
|
||||
```bash
|
||||
gcloud builds submit --config release/cloudbuild-clouddeploy.yaml --substitutions _INTERNAL_REPO_URL=[URL],PROJECT_ID=[PROJECT_ID]
|
||||
```
|
||||
|
||||
## Manual Local Usage
|
||||
|
||||
You can also apply or modify rendered configurations directly using the `gcloud` CLI:
|
||||
|
||||
```bash
|
||||
gcloud deploy apply --file=<config-file>.yaml --project=<project-id> --region=<region>
|
||||
|
||||
@@ -13,9 +13,9 @@ executionConfigs:
|
||||
executionTimeout: 3600s
|
||||
defaultPool:
|
||||
# Placeholder: Replace with artifact bucket name.
|
||||
artifactStorage: gs://_artifact_bucket_
|
||||
artifactStorage: artifactStorage
|
||||
# Placeholder: Replace with project number.
|
||||
serviceAccount: _project_number_-compute@developer.gserviceaccount.com
|
||||
serviceAccount: serviceAccount
|
||||
gke:
|
||||
# Placeholder: Replace with project ID, location, and cluster name.
|
||||
cluster: projects/_project_id_/locations/_location_/clusters/_cluster_name_
|
||||
cluster: cluster
|
||||
|
||||
@@ -9,3 +9,11 @@ serialPipeline:
|
||||
- targetId: crash
|
||||
profiles:
|
||||
- crash
|
||||
strategy:
|
||||
standard:
|
||||
analysis:
|
||||
# 10 minutes.
|
||||
duration: 600s
|
||||
googleCloud:
|
||||
alertPolicyChecks:
|
||||
stableDeploymentAlertPolicyChecks
|
||||
|
||||
Reference in New Issue
Block a user