-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add support for GitHub and GitLab in the deploy helper #84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
daniel-cit
wants to merge
12
commits into
main
Choose a base branch
from
feat-add-support-for-github-and-gitlab-in-helper
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a35fe7e
move alternative deploy strategies to new files
daniel-cit 196e4b4
add rename script
daniel-cit 9a41b1c
update README instructions for renamng build type files
daniel-cit cb7b2f1
deploy with github
daniel-cit af0a7e3
set prevention destroy falg
daniel-cit dde61fe
fix non CB flow
daniel-cit 0aa2d2d
add gitlab support
daniel-cit 13716d2
code review fixes
daniel-cit 7b9330c
code review fixes
daniel-cit 40a0db6
use commit SHA in github and gitlab job search
daniel-cit 8edfbba
code review fixes
daniel-cit 30df6ad
review fixes
daniel-cit File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| /** | ||
| * Copyright 2021 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. | ||
| */ | ||
|
|
||
| /* ---------------------------------------- | ||
| Specific to cloudbuild_module | ||
| ---------------------------------------- */ | ||
| output "cloudbuild_project_id" { | ||
| description = "Project where Cloud Build configuration and terraform container image will reside." | ||
| value = module.tf_source.cloudbuild_project_id | ||
| } | ||
|
|
||
| output "gcs_bucket_cloudbuild_artifacts" { | ||
| description = "Bucket used to store Cloud Build artifacts in cicd project." | ||
| value = { for key, value in module.tf_workspace : key => replace(value.artifacts_bucket, local.bucket_self_link_prefix, "") } | ||
| } | ||
|
|
||
| output "gcs_bucket_cloudbuild_logs" { | ||
| description = "Bucket used to store Cloud Build logs in cicd project." | ||
| value = { for key, value in module.tf_workspace : key => replace(value.logs_bucket, local.bucket_self_link_prefix, "") } | ||
| } | ||
|
|
||
| output "cloud_builder_artifact_repo" { | ||
| description = "Artifact Registry (AR) Repository created to store TF Cloud Builder images." | ||
| value = "projects/${module.tf_source.cloudbuild_project_id}/locations/${var.default_region}/repositories/${module.tf_cloud_builder.artifact_repo}" | ||
| } | ||
|
|
||
| output "csr_repos" { | ||
| description = "List of Cloud Source Repos created by the module, linked to Cloud Build triggers." | ||
| value = { for k, v in module.tf_source.csr_repos : k => { | ||
| "id" = v.id, | ||
| "name" = v.name, | ||
| "project" = v.project, | ||
| "url" = v.url, | ||
| } | ||
| } | ||
| } | ||
|
|
||
| output "cloud_build_private_worker_pool_id" { | ||
| description = "ID of the Cloud Build private worker pool." | ||
| value = module.tf_private_pool.private_worker_pool_id | ||
| } | ||
|
|
||
| output "cloud_build_worker_range_id" { | ||
| description = "The Cloud Build private worker IP range ID." | ||
| value = module.tf_private_pool.worker_range_id | ||
| } | ||
|
|
||
| output "cloud_build_worker_peered_ip_range" { | ||
| description = "The IP range of the peered service network." | ||
| value = module.tf_private_pool.worker_peered_ip_range | ||
| } | ||
|
|
||
| output "cloud_build_peered_network_id" { | ||
| description = "The ID of the Cloud Build peered network." | ||
| value = module.tf_private_pool.peered_network_id | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /** | ||
| * Copyright 2021 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. | ||
| */ | ||
|
|
||
| /* ---------------------------------------- | ||
| Specific to github_bootstrap | ||
| ---------------------------------------- */ | ||
| output "cicd_project_id" { | ||
| description = "Project where the CI/CD infrastructure for GitHub Action resides." | ||
| value = module.gh_cicd.project_id | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /** | ||
| * Copyright 2021 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. | ||
| */ | ||
|
|
||
| /* ---------------------------------------- | ||
| Specific to gitlab_bootstrap | ||
| ---------------------------------------- */ | ||
| output "cicd_project_id" { | ||
| description = "Project where the CI/CD infrastructure for GitLab CI/CD resides." | ||
| value = module.gitlab_cicd.project_id | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.