Skip to content

Commit

Permalink
feat: json based pipeline properties
Browse files Browse the repository at this point in the history
BREAKING CHANGE: All pipeline properties can now be set via JSON fields. Take note of existing pipeline properties as some settings could be reset. To ease transition, there are still several pipeline properties that can be set via variables. Properties set in the JSON input will override the values set in the variables.
  • Loading branch information
huayuenh authored Sep 17, 2024
1 parent 87c3d2e commit 8859d7b
Show file tree
Hide file tree
Showing 38 changed files with 14,157 additions and 14,603 deletions.
22 changes: 21 additions & 1 deletion .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "go.sum|^.secrets.baseline$",
"lines": null
},
"generated_at": "2024-07-09T15:33:13Z",
"generated_at": "2024-09-05T12:51:27Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -86,6 +86,26 @@
"type": "Secret Keyword",
"verified_result": null
}
],
"provider.tf.example": [
{
"hashed_secret": "91199272d5d6a574a51722ca6f3d1148edb1a0e7",
"is_secret": false,
"is_verified": false,
"line_number": 2,
"type": "Secret Keyword",
"verified_result": null
}
],
"solutions/kubernetes/provider.tf.example": [
{
"hashed_secret": "91199272d5d6a574a51722ca6f3d1148edb1a0e7",
"is_secret": false,
"is_verified": false,
"line_number": 2,
"type": "Secret Keyword",
"verified_result": null
}
]
},
"version": "0.13.1+ibm.62.dss",
Expand Down
742 changes: 346 additions & 396 deletions README.md

Large diffs are not rendered by default.

995 changes: 0 additions & 995 deletions code-engine/main.tf

This file was deleted.

20 changes: 0 additions & 20 deletions code-engine/version.tf

This file was deleted.

2 changes: 1 addition & 1 deletion examples/default/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "terraform_devsecops_alm" {
source = "git::https://github.com/terraform-ibm-modules/terraform-ibm-devsecops-alm?ref=v1.9.5"
source = "git::https://github.com/terraform-ibm-modules/terraform-ibm-devsecops-alm?ref=v2.0.0-beta.1"
ibmcloud_api_key = var.ibmcloud_api_key
toolchain_resource_group = var.toolchain_resource_group
toolchain_region = var.toolchain_region
Expand Down
4 changes: 2 additions & 2 deletions examples/default/terraform.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ enable_secrets_manager = false
ci_registry_namespace = "my-namespace"
ci_registry_region = "ibm:yp:us-south"
ci_cluster_name = "mycluster-free"
ci_dev_region = "ibm:yp:us-south"
ci_dev_resource_group = "Default"
ci_cluster_region = "ibm:yp:us-south"
ci_cluster_resource_group = "Default"
ci_cluster_namespace = "dev"
cd_cluster_name = "mycluster-free"
cd_cluster_namespace = "prod"
2 changes: 1 addition & 1 deletion examples/default/version.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
# Pin to the lowest provider version of the range defined in the main module's version.tf to ensure lowest version still works
ibm = {
source = "IBM-Cloud/ibm"
version = "= 1.65.0"
version = "= 1.67.1"
}
}
}
5 changes: 2 additions & 3 deletions examples/devsecops-ci-toolchain-bring-your-own-app/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "terraform_devsecops_alm" {
source = "git::https://github.com/terraform-ibm-modules/terraform-ibm-devsecops-alm?ref=v1.9.5"
source = "git::https://github.com/terraform-ibm-modules/terraform-ibm-devsecops-alm?ref=v2.0.0-beta.1"
ibmcloud_api_key = var.ibmcloud_api_key
toolchain_resource_group = var.toolchain_resource_group
toolchain_region = var.toolchain_region
Expand All @@ -14,11 +14,10 @@ module "terraform_devsecops_alm" {
create_cd_toolchain = var.create_cd_toolchain
create_cc_toolchain = var.create_cc_toolchain
ci_app_repo_clone_from_url = var.ci_app_repo_clone_from_url
ci_app_repo_clone_from_branch = var.ci_app_repo_clone_from_branch
ci_app_repo_existing_url = var.ci_app_repo_existing_url
ci_app_repo_existing_branch = var.ci_app_repo_existing_branch
ci_app_repo_existing_git_provider = var.ci_app_repo_existing_git_provider
ci_app_repo_existing_git_id = var.ci_app_repo_existing_git_id
app_repo_branch = var.app_repo_branch
#disabling authorization_policy_creation as it seems to be unstable for the unit tests
authorization_policy_creation = "disabled"
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ enable_secrets_manager = false
ci_registry_namespace = "my-namespace"
ci_registry_region = "ibm:yp:us-south"
ci_cluster_name = "mycluster-free"
ci_dev_region = "ibm:yp:us-south"
ci_dev_resource_group = "Default"
ci_cluster_region = "ibm:yp:us-south"
ci_cluster_resource_group = "Default"
ci_cluster_namespace = "dev"
cd_cluster_name = "mycluster-free"
cd_cluster_namespace = "prod"
Expand Down
20 changes: 7 additions & 13 deletions examples/devsecops-ci-toolchain-bring-your-own-app/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,9 @@ variable "ci_app_repo_clone_from_url" {
default = ""
}

variable "ci_app_repo_clone_from_branch" {
type = string
description = "Used when app_repo_clone_from_url is provided, the default branch that is used by the CI build, usually either main or master."
default = ""
}

variable "ci_app_repo_existing_url" {
type = string
description = "Override to bring your own existing application repository URL, which is used directly instead of cloning the default sample."
default = ""
}

variable "ci_app_repo_existing_branch" {
type = string
description = "Used when app_repo_existing_url is provided, the default branch that is used by the CI build, usually either main or master."
description = "Bring your own existing application repository by providing the URL. This will create an integration for your application repository instead of cloning the default sample. Repositories existing in a different org will require the use of Git token. See `app_repo_git_token_secret_name` under optional variables. "
default = ""
}

Expand All @@ -114,3 +102,9 @@ variable "ci_app_repo_existing_git_id" {
description = "By default absent, else custom server GUID, or other options for 'git_id' field in the browser UI."
default = ""
}

variable "app_repo_branch" {
type = string
description = "This is the repository branch used by the default sample application. Alternatively if `app_repo_existing_url` is provided, then the branch must reflect the default branch for that repository. Typically these branches are `main` or `master`."
default = ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
# Pin to the lowest provider version of the range defined in the main module's version.tf to ensure lowest version still works
ibm = {
source = "IBM-Cloud/ibm"
version = "= 1.65.0"
version = "= 1.67.1"
}
}
}
2 changes: 1 addition & 1 deletion examples/devsecops-ci-toolchain-with-key-protect/main.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module "terraform_devsecops_alm" {
source = "git::https://github.com/terraform-ibm-modules/terraform-ibm-devsecops-alm?ref=v1.9.5"
source = "git::https://github.com/terraform-ibm-modules/terraform-ibm-devsecops-alm?ref=v2.0.0-beta.1"
ibmcloud_api_key = var.ibmcloud_api_key
toolchain_resource_group = var.toolchain_resource_group
toolchain_region = var.toolchain_region
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ enable_secrets_manager = false
ci_registry_namespace = "my-namespace"
ci_registry_region = "ibm:yp:us-south"
ci_cluster_name = "mycluster-free"
ci_dev_region = "ibm:yp:us-south"
ci_dev_resource_group = "Default"
ci_cluster_region = "ibm:yp:us-south"
ci_cluster_resource_group = "Default"
ci_cluster_namespace = "dev"
cd_cluster_name = "mycluster-free"
cd_cluster_namespace = "prod"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
# Pin to the lowest provider version of the range defined in the main module's version.tf to ensure lowest version still works
ibm = {
source = "IBM-Cloud/ibm"
version = "= 1.65.0"
version = "= 1.67.1"
}
}
}
4 changes: 2 additions & 2 deletions examples/variables.tfvars.example
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ ci_cluster_namespace = "prod"
cd_cluster_name = "mycluster-free"
cd_cluster_namespace = "prod"

ci_dev_region = "ibm:yp:us-south"
ci_dev_resource_group = "Default"
ci_cluster_region = "ibm:yp:us-south"
ci_cluster_resource_group = "Default"

#Set the region where the toolchain will be created. Using 'toolchain_region' will set the same value for each of the toolchains.
#The regions can be explicitly set for each toolchain using the variables prefixed with 'ci', 'cd' and 'cc'
Expand Down
Loading

0 comments on commit 8859d7b

Please sign in to comment.