github.com/drone/go-convert@v0.0.0-20240307072510-6bd371c65e61/convert/cloudbuild/yaml/testdata/sample.7.yaml (about)

     1  # https://cloud.google.com/build/docs/samples/cloudbuild-config
     2  
     3  steps:
     4  - id: 'Prepare config'
     5    # This step builds the final manifests for the app
     6    # using kustomize and the configuration files
     7    # available in the repository.
     8    name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
     9    entrypoint: '/bin/sh'
    10    args: ['-c', 'mkdir hydrated-manifests && kubectl kustomize config/prod > hydrated-manifests/prod.yaml']
    11  - id: 'Download policies'
    12    # This step fetches the policies from the Anthos Config Management repository
    13    # and consolidates every resource in a single file.
    14    name: 'gcr.io/kpt-dev/kpt'
    15    entrypoint: '/bin/sh'
    16    args: ['-c', 'kpt pkg get https://github.com/GoogleCloudPlatform/anthos-config-management-samples.git/ci-app/acm-repo/cluster@main constraints
    17                    && kpt fn source constraints/ hydrated-manifests/ > hydrated-manifests/kpt-manifests.yaml']
    18  - id: 'Validate against policies'
    19    # This step validates that all resources comply with all policies.
    20    name: 'gcr.io/kpt-fn/gatekeeper:v0.2'
    21    args: ['--input', 'hydrated-manifests/kpt-manifests.yaml']