Skip to content

Commit

Permalink
ci: add central workflows including release-please (#4)
Browse files Browse the repository at this point in the history
* chore: add CODEOWNERS file

* ci: add terraform-docs and linters workflow

* ci: add release-please workflow and associated modifications

* docs(terraform-docs): generate docs and write to README.adoc

Co-authored-by: lentidas <lentidas@users.noreply.github.com>

Release-As: v1.0.0-alpha.1
  • Loading branch information
lentidas authored Nov 18, 2022
1 parent 4950816 commit aba575c
Show file tree
Hide file tree
Showing 8 changed files with 278 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/linters.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: "Linters"

on:
pull_request:

jobs:
linters:
uses: camptocamp/devops-stack/.github/workflows/modules-linters.yaml@master
11 changes: 11 additions & 0 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: "Release"

on:
push:
branches:
- "main"

jobs:
release:
uses: camptocamp/devops-stack/.github/workflows/modules-release-please.yaml@master
9 changes: 9 additions & 0 deletions .github/workflows/terraform-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
name: "Terraform Docs"

on:
pull_request:

jobs:
terraform-docs:
uses: camptocamp/devops-stack/.github/workflows/modules-terraform-docs.yaml@master
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @camptocamp/is-devops-stack
240 changes: 240 additions & 0 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
// BEGIN_TF_DOCS
=== Requirements

No requirements.

=== Providers

The following providers are used by this module:

- [[provider_argocd]] <<provider_argocd,argocd>>

- [[provider_null]] <<provider_null,null>>

- [[provider_random]] <<provider_random,random>>

- [[provider_utils]] <<provider_utils,utils>>

=== Modules

No modules.

=== Resources

The following resources are used by this module:

- https://registry.terraform.io/providers/oboukili/argocd/latest/docs/resources/application[argocd_application.operator] (resource)
- https://registry.terraform.io/providers/oboukili/argocd/latest/docs/resources/application[argocd_application.this] (resource)
- https://registry.terraform.io/providers/oboukili/argocd/latest/docs/resources/project[argocd_project.this] (resource)
- https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource[null_resource.dependencies] (resource)
- https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource[null_resource.this] (resource)
- https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password[random_password.clientsecret] (resource)
- https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password[random_password.keycloak_passwords] (resource)
- https://registry.terraform.io/providers/cloudposse/utils/latest/docs/data-sources/deep_merge_yaml[utils_deep_merge_yaml.values] (data source)

=== Required Inputs

The following input variables are required:

==== [[input_argocd]] <<input_argocd,argocd>>

Description: n/a

Type:
[source,hcl]
----
object({
namespace = string
domain = string
})
----

==== [[input_base_domain]] <<input_base_domain,base_domain>>

Description: n/a

Type: `string`

==== [[input_cluster_name]] <<input_cluster_name,cluster_name>>

Description: n/a

Type: `string`

=== Optional Inputs

The following input variables are optional (have default values):

==== [[input_cluster_issuer]] <<input_cluster_issuer,cluster_issuer>>

Description: n/a

Type: `string`

Default: `"ca-issuer"`

==== [[input_dependency_ids]] <<input_dependency_ids,dependency_ids>>

Description: n/a

Type: `map(string)`

Default: `{}`

==== [[input_extra_yaml]] <<input_extra_yaml,extra_yaml>>

Description: n/a

Type: `list(string)`

Default: `[]`

==== [[input_keycloak]] <<input_keycloak,keycloak>>

Description: Keycloak settings

Type: `any`

Default: `{}`

==== [[input_namespace]] <<input_namespace,namespace>>

Description: n/a

Type: `string`

Default: `"keycloak"`

==== [[input_target_revision]] <<input_target_revision,target_revision>>

Description: Override of target revision of the application chart.

Type: `string`

Default: `"v1.0.0"`

=== Outputs

The following outputs are exported:

==== [[output_id]] <<output_id,id>>

Description: n/a

==== [[output_keycloak_users]] <<output_keycloak_users,keycloak_users>>

Description: n/a

==== [[output_oidc]] <<output_oidc,oidc>>

Description: OIDC values
// END_TF_DOCS
// BEGIN_TF_TABLES


= Providers

[cols="a,a",options="header,autowidth"]
|===
|Name |Version
|[[provider_argocd]] <<provider_argocd,argocd>> |n/a
|[[provider_null]] <<provider_null,null>> |n/a
|[[provider_random]] <<provider_random,random>> |n/a
|[[provider_utils]] <<provider_utils,utils>> |n/a
|===

= Resources

[cols="a,a",options="header,autowidth"]
|===
|Name |Type
|https://registry.terraform.io/providers/oboukili/argocd/latest/docs/resources/application[argocd_application.operator] |resource
|https://registry.terraform.io/providers/oboukili/argocd/latest/docs/resources/application[argocd_application.this] |resource
|https://registry.terraform.io/providers/oboukili/argocd/latest/docs/resources/project[argocd_project.this] |resource
|https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource[null_resource.dependencies] |resource
|https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource[null_resource.this] |resource
|https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password[random_password.clientsecret] |resource
|https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password[random_password.keycloak_passwords] |resource
|https://registry.terraform.io/providers/cloudposse/utils/latest/docs/data-sources/deep_merge_yaml[utils_deep_merge_yaml.values] |data source
|===

= Inputs

[cols="a,a,a,a,a",options="header,autowidth"]
|===
|Name |Description |Type |Default |Required
|[[input_argocd]] <<input_argocd,argocd>>
|n/a
|

[source]
----
object({
namespace = string
domain = string
})
----

|n/a
|yes

|[[input_base_domain]] <<input_base_domain,base_domain>>
|n/a
|`string`
|n/a
|yes

|[[input_cluster_issuer]] <<input_cluster_issuer,cluster_issuer>>
|n/a
|`string`
|`"ca-issuer"`
|no

|[[input_cluster_name]] <<input_cluster_name,cluster_name>>
|n/a
|`string`
|n/a
|yes

|[[input_dependency_ids]] <<input_dependency_ids,dependency_ids>>
|n/a
|`map(string)`
|`{}`
|no

|[[input_extra_yaml]] <<input_extra_yaml,extra_yaml>>
|n/a
|`list(string)`
|`[]`
|no

|[[input_keycloak]] <<input_keycloak,keycloak>>
|Keycloak settings
|`any`
|`{}`
|no

|[[input_namespace]] <<input_namespace,namespace>>
|n/a
|`string`
|`"keycloak"`
|no

|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v1.0.0"`
|no

|===

= Outputs

[cols="a,a",options="header,autowidth"]
|===
|Name |Description
|[[output_id]] <<output_id,id>> |n/a
|[[output_keycloak_users]] <<output_keycloak_users,keycloak_users>> |n/a
|[[output_oidc]] <<output_oidc,oidc>> |OIDC values
|===
// END_TF_TABLES
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ resource "argocd_application" "this" {
source {
repo_url = "https://github.com/camptocamp/devops-stack-module-keycloak.git"
path = "charts/keycloak"
target_revision = "main"
target_revision = var.target_revision
helm {
values = data.utils_deep_merge_yaml.values.output
}
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ variable "argocd" {
})
}

variable "target_revision" {
description = "Override of target revision of the application chart."
type = string
default = "v1.0.0" # x-release-please-version
}

variable "cluster_issuer" {
type = string
default = "ca-issuer"
Expand Down
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.0.0

0 comments on commit aba575c

Please sign in to comment.