Skip to content

Commit

Permalink
Test two fases single project
Browse files Browse the repository at this point in the history
  • Loading branch information
amandakarina committed Oct 18, 2024
1 parent 9dc3334 commit 57ecec4
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 9 deletions.
25 changes: 23 additions & 2 deletions build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,37 @@ steps:
]
waitFor:
- prepare
- id: standalone-apply
- id: standalone-apply-fase1
name: "gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS"
args:
[
"/bin/bash",
"-c",
"cft test run TestStandaloneSingleProjectExample --stage apply --verbose",
]
allowFailure: true
waitFor:
- standalone-init
- id: standalone-add-import
name: "gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS"
args:
[
"/bin/bash",
"-c",
"mv examples/standalone_single_project/fleet-olly-import.tf.example mv examples/standalone_single_project/fleet-olly-import.tf",
]
waitFor:
- standalone-apply-fase1
- id: standalone-apply-fase2
name: "gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS"
args:
[
"/bin/bash",
"-c",
"cft test run TestStandaloneSingleProjectExample --stage apply --verbose",
]
waitFor:
- standalone-add-import
- id: standalone-verify
name: "gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS"
args:
Expand All @@ -245,7 +266,7 @@ steps:
"cft test run TestStandaloneSingleProjectExample --stage verify --verbose",
]
waitFor:
- standalone-apply
- standalone-apply-fase2
- id: standalone-teardown
name: "gcr.io/cloud-foundation-cicd/$_DOCKER_IMAGE_DEVELOPER_TOOLS:$_DOCKER_TAG_VERSION_DEVELOPER_TOOLS"
args:
Expand Down
6 changes: 0 additions & 6 deletions examples/standalone_single_project/3-fleetscope.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ locals {
network_project_id = module.multitenant_infra.network_project_id
}

# import {
# id = "projects/${local.cluster_project_id}/locations/global/features/fleetobservability"
# to = module.fleetscope_infra.google_gke_hub_feature.fleet-o11y
# }

module "fleetscope_infra" {
source = "../../3-fleetscope/modules/env_baseline"

Expand All @@ -35,5 +30,4 @@ module "fleetscope_infra" {
fleet_project_id = local.fleet_project_id
namespace_ids = var.teams
cluster_membership_ids = module.multitenant_infra.cluster_membership_ids
depends_on = [module.multitenant_infra]
}
1 change: 0 additions & 1 deletion examples/standalone_single_project/5-appinfra.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@ module "cicd" {
app_build_trigger_yaml = "cloudbuild.yaml"

buckets_force_destroy = true
depends_on = [module.fleetscope_infra]
}
20 changes: 20 additions & 0 deletions examples/standalone_single_project/fleet-olly-import.tf.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/**
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import {
id = "projects/${local.cluster_project_id}/locations/global/features/fleetobservability"
to = module.fleetscope_infra.google_gke_hub_feature.fleet-o11y
}

0 comments on commit 57ecec4

Please sign in to comment.