From bea1561c7adbbd66c0df56a9088c7b3c067110e2 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 21:46:33 +0100 Subject: [PATCH 01/23] feat: :sparkles: implement Woodpecker Terraform module --- main.tf | 293 +++++++++++++++++++++++++++++++++++++++++++++++++++ outputs.tf | 14 +++ variables.tf | 111 +++++++++++++++++++ 3 files changed, 418 insertions(+) create mode 100644 main.tf create mode 100644 outputs.tf create mode 100644 variables.tf diff --git a/main.tf b/main.tf new file mode 100644 index 0000000..c7814c2 --- /dev/null +++ b/main.tf @@ -0,0 +1,293 @@ +terraform { + required_providers { + authentik = { + source = "goauthentik/authentik" + version = "2022.8.1" + } + kubernetes = { + source = "hashicorp/kubernetes" + version = "2.13.1" + } + postgresql = { + source = "cyrilgdn/postgresql" + version = "1.17.1" + } + minio = { + source = "aminueza/minio" + version = "1.10.0" + } + } +} + +locals { + match_labels = merge({ + "app.kubernetes.io/instance" = "woodpecker" + }, var.match_labels) + + server_match_labels = merge({ + "app.kubernetes.io/name" = "woodpecker-server" + }, local.match_labels) + server_labels = merge(local.server_match_labels, { + "app.kubernetes.io/version" = "v0.15.6" + }, var.server_labels) + + agent_match_labels = merge({ + "app.kubernetes.io/name" = "woodpecker-agent" + }, local.match_labels) + agent_labels = merge(local.agent_match_labels, { + "app.kubernetes.io/version" = "v0.15.6" + }, var.agent_labels) +} + +resource "kubernetes_service_account" "woodpecker_server" { + metadata { + name = "woodpecker-server" + namespace = var.namespace + labels = local.server_labels + } +} + +resource "kubernetes_deployment" "woodpecker_server" { + metadata { + name = "woodpecker-server" + namespace = var.namespace + labels = local.server_labels + } + spec { + replicas = 1 + selector { + match_labels = local.server_match_labels + } + template { + metadata { + labels = local.server_labels + annotations = { + "ravianand.me/config-hash" = sha1(jsonencode(merge( + kubernetes_config_map.woodpecker_server.data, + kubernetes_secret.woodpecker.data + ))) + } + } + spec { + service_account_name = kubernetes_service_account.woodpecker_server.metadata.0.name + container { + image = var.image_registry == "" ? "${var.server_image_repository}:${var.server_image_tag}" : "${var.image_registry}/${var.server_image_repository}:${var.server_image_tag}" + name = "woodpecker" + env_from { + config_map_ref { + name = kubernetes_config_map.woodpecker_server.metadata.0.name + } + } + env { + name = "WOODPECKER_BACKEND" + value = "docker" + } + env { + name = "WOODPECKER_AGENT_SECRET" + value_from { + secret_key_ref { + name = kubernetes_secret.woodpecker.metadata.0.name + key = "woodpecker-agent-secret" + } + } + } + env { + name = "WOODPECKER_GITEA_SECRET" + value_from { + secret_key_ref { + name = kubernetes_secret.woodpecker.metadata.0.name + key = "gitea-secret" + optional = true + } + } + } + env { + name = "WOODPECKER_DATABASE_DATASOURCE" + value_from { + secret_key_ref { + name = kubernetes_secret.woodpecker.metadata.0.name + key = "database-url" + } + } + } + port { + name = "http" + container_port = 8000 + protocol = "TCP" + } + liveness_probe { + http_get { + path = "/healthz" + port = 8000 + } + } + readiness_probe { + http_get { + path = "/healthz" + port = 8000 + } + } + resources {} + } + } + } + } +} + +resource "kubernetes_service" "woodpecker_server" { + metadata { + name = "woodpecker-server" + namespace = var.namespace + labels = local.server_labels + } + spec { + selector = local.server_match_labels + type = "ClusterIP" + port { + port = 80 + name = "http" + target_port = 8000 + } + port { + port = 9000 + name = "grpc" + target_port = 9000 + } + } +} + +resource "kubernetes_service_account" "woodpecker_agent" { + count = var.woodpecker_agent_replicas == 0 ? 0 : 1 + metadata { + name = "woodpecker-agent" + namespace = var.namespace + labels = local.agent_labels + } +} + +resource "kubernetes_deployment" "woodpecker_agent" { + count = var.woodpecker_agent_replicas == 0 ? 0 : 1 + metadata { + name = "woodpecker-agent" + namespace = var.namespace + labels = local.agent_labels + } + spec { + replicas = var.woodpecker_agent_replicas + selector { + match_labels = local.agent_match_labels + } + template { + metadata { + labels = local.agent_labels + annotations = { + "ravianand.me/config-hash" = sha1(jsonencode(merge( + kubernetes_secret.woodpecker.data + ))) + } + } + spec { + service_account_name = kubernetes_service_account.woodpecker_agent.0.metadata.0.name + container { + image = var.image_registry == "" ? "${var.agent_image_repository}:${var.agent_image_tag}" : "${var.image_registry}/${var.agent_image_repository}:${var.agent_image_tag}" + name = "woodpecker-agent" + security_context {} + env { + name = "WOODPECKER_SERVER" + value = "${kubernetes_service.woodpecker_server.metadata.0.name}.${var.namespace}:9000" + } + env { + name = "WOODPECKER_AGENT_SECRET" + value_from { + secret_key_ref { + name = kubernetes_secret.woodpecker.metadata.0.name + key = "woodpecker-agent-secret" + } + } + } + port { + container_port = 3000 + name = "http" + protocol = "TCP" + } + resources { + requests = { + cpu = "250m" + memory = "250Mi" + } + limits = { + cpu = 2 + memory = "2Gi" + } + } + volume_mount { + mount_path = "/var/run" + name = "sock-dir" + } + } + container { + image = "docker:20.10.12-dind" + name = "dind" + env { + name = "DOCKER_DRIVER" + value = "overlay2" + } + resources { + requests = { + cpu = "250m" + memory = "250Mi" + } + limits = { + cpu = 1 + memory = "2Gi" + } + } + security_context { + privileged = true + } + volume_mount { + mount_path = "/var/run" + name = "sock-dir" + } + } + volume { + name = "sock-dir" + empty_dir {} + } + } + } + } +} + +resource "random_id" "woodpecker_agent_secret_key" { + byte_length = 32 +} + +resource "kubernetes_secret" "woodpecker" { + metadata { + name = "woodpecker" + namespace = var.namespace + } + data = { + "database-url" = var.woodpecker_database_datasource + "woodpecker-agent-secret" = random_id.woodpecker_agent_secret_key.hex + "gitea-secret" = var.woodpecker_gitea_secret + } +} + +resource "kubernetes_config_map" "woodpecker_server" { + metadata { + name = "woodpecker-server-env" + namespace = var.namespace + } + + data = { + WOODPECKER_ADMIN = var.woodpecker_admin + WOODPECKER_HOST = var.woodpecker_host + WOODPECKER_OPEN = var.woodpecker_open + WOODPECKER_GITEA = var.woodpecker_gitea + WOODPECKER_GITEA_URL = var.woodpecker_gitea_url + WOODPECKER_GITEA_CLIENT = var.woodpecker_gitea_client + WOODPECKER_DATABASE_DRIVER = var.woodpecker_database_driver + } +} diff --git a/outputs.tf b/outputs.tf new file mode 100644 index 0000000..77528a8 --- /dev/null +++ b/outputs.tf @@ -0,0 +1,14 @@ +output "service_name" { + description = "Service name for Woodpecker server deployment" + value = kubernetes_service.woodpecker_server.metadata.0.name +} + +output "service_http_port" { + description = "HTTP port exposed by the service" + value = kubernetes_service.woodpecker_server.spec.0.port.0.name +} + +output "service_grpc_port" { + description = "GRPC port exposed by the service" + value = kubernetes_service.woodpecker_server.spec.0.port.1.name +} diff --git a/variables.tf b/variables.tf new file mode 100644 index 0000000..1efb110 --- /dev/null +++ b/variables.tf @@ -0,0 +1,111 @@ +variable "namespace" { + description = "Namespace to deploy workloads and configuration" + type = string + default = "default" +} + +variable "match_labels" { + description = "Match labels to add to the MariaDB deployment, will be merged with labels" + type = map(any) + default = {} +} + +variable "server_labels" { + description = "Labels to add to the Woodpecker server deployment" + type = map(any) + default = {} +} + +variable "agent_labels" { + description = "Labels to add to the Woodpecker agent deployment" + type = map(any) + default = {} +} + +variable "image_registry" { + description = "Image registry, e.g. gcr.io, docker.io" + type = string + default = "" +} + +variable "server_image_repository" { + description = "Image to start for the server" + type = string + default = "woodpeckerci/woodpecker-server" +} + +variable "server_image_tag" { + description = "Image tag to for the server" + type = string + default = "v0.15.6" +} + +variable "agent_image_repository" { + description = "Image to start for the agent" + type = string + default = "woodpeckerci/woodpecker-agent" +} + +variable "agent_image_tag" { + description = "Image tag to use for the agent" + type = string + default = "v0.15.6" +} + +variable "woodpecker_agent_replicas" { + description = "Number of agent replicas to deploy, setting to zero will disable agent deployment" + type = number + default = 2 +} + +variable "woodpecker_host" { + description = "Woodpecker host in :// format" + type = string +} + +variable "woodpecker_admin" { + description = "Comma-delimited list of Woodpecker admin users" + type = string +} + +variable "woodpecker_open" { + description = "Open Woodpecker registrations" + type = bool + default = true +} + +variable "woodpecker_gitea" { + description = "Enable Woodpecker Gitea integration" + type = bool + default = false +} + +variable "woodpecker_gitea_url" { + description = "Gitea URL" + type = string + default = "" +} + +variable "woodpecker_gitea_client" { + description = "Gitea client ID" + type = string + default = "" +} + +variable "woodpecker_gitea_secret" { + description = "Gitea client secret" + type = string + default = "" +} + +variable "woodpecker_database_driver" { + description = "Woodpecker database driver" + type = string + default = "postgres" +} + +variable "woodpecker_database_datasource" { + description = "Database URL" + type = string + default = "" +} -- 2.38.4 From 03986759ae5516fc5d69577d16f6c8a7e57be372 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 21:46:50 +0100 Subject: [PATCH 02/23] Add `Terraform.gitignore` --- .gitignore | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b8a46e --- /dev/null +++ b/.gitignore @@ -0,0 +1,34 @@ +# Local .terraform directories +**/.terraform/* + +# .tfstate files +*.tfstate +*.tfstate.* + +# Crash log files +crash.log +crash.*.log + +# Exclude all .tfvars files, which are likely to contain sensitive data, such as +# password, private keys, and other secrets. These should not be part of version +# control as they are data points which are potentially sensitive and subject +# to change depending on the environment. +*.tfvars +*.tfvars.json + +# Ignore override files as they are usually used to override resources locally and so +# are not checked in +override.tf +override.tf.json +*_override.tf +*_override.tf.json + +# Include override files you do wish to add to version control using negated pattern +# !example_override.tf + +# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan +# example: *tfplan* + +# Ignore CLI configuration files +.terraformrc +terraform.rc -- 2.38.4 From 830bc09adbb62a826be9e26b3c14666a983eadec Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 21:58:14 +0100 Subject: [PATCH 03/23] chore(release): 1.1.0 --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e26cf29 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## 1.1.0 (2023-01-23) + + +### Features + +* :sparkles: implement Woodpecker Terraform module ([bea1561](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/commit/bea1561c7adbbd66c0df56a9088c7b3c067110e2)) -- 2.38.4 From 8352ab26ceec8b57c9dfcd3947ac0e831c26c24c Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 21:58:41 +0100 Subject: [PATCH 04/23] chore(release): 1.1.0 --- CHANGELOG.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e26cf29..4d6f0e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,4 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -## 1.1.0 (2023-01-23) - -### Features - -* :sparkles: implement Woodpecker Terraform module ([bea1561](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/commit/bea1561c7adbbd66c0df56a9088c7b3c067110e2)) -- 2.38.4 From ffd16766f33ade3efe8ab379544216f6d781342f Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 21:59:22 +0100 Subject: [PATCH 05/23] chore(release): 1.0.0 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d6f0e4..cf4657b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,4 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## 1.0.0 (2023-01-23) + +### Features + +* :sparkles: implement Woodpecker Terraform module ([bea1561](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/commit/bea1561c7adbbd66c0df56a9088c7b3c067110e2)) + +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -- 2.38.4 From 3dd1e4362d45c7fbc01ca2fa2c1ddc114f1921e5 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 22:00:06 +0100 Subject: [PATCH 06/23] chore(release): 1.0.1 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf4657b..221a903 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.0.1](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/compare/v1.0.0...v1.0.1) (2023-01-23) + ## 1.0.0 (2023-01-23) -- 2.38.4 From 5402c5ad6233d788bd844d934684ea355014e303 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 22:06:03 +0100 Subject: [PATCH 07/23] ci: :construction_worker: add standard-version dry-run pipeline --- .woodpecker.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..9a802be --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,6 @@ +pipeline: + conventional_commits: + image: node:19 + commands: + - npm install --global standard-version + - standard-version --dry-run -- 2.38.4 From 7a130eae541041116707eb1a37f8cc3b067308b6 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 22:18:33 +0100 Subject: [PATCH 08/23] ci: :construction_worker: create --first-release if no git tag --- .woodpecker.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 9a802be..42e3868 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,4 +3,11 @@ pipeline: image: node:19 commands: - npm install --global standard-version - - standard-version --dry-run + - | + if [[ $(git tag) -ne 0 ]]; then + standard-version + else + standard-version --first-release + fi + +branches: main -- 2.38.4 From 63d83933818ad4496bed96361907f86492902b80 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 22:27:46 +0100 Subject: [PATCH 09/23] ci: :construction_worker: remove bash-specific if-statement --- .woodpecker.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 42e3868..627d35e 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -3,11 +3,6 @@ pipeline: image: node:19 commands: - npm install --global standard-version - - | - if [[ $(git tag) -ne 0 ]]; then - standard-version - else - standard-version --first-release - fi + - standard-version branches: main -- 2.38.4 From 7d487626c74e90def5f96292aeffe39ffc136aff Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 22:32:16 +0100 Subject: [PATCH 10/23] ci: :green_heart: output `git tag` after pipeline execution --- .woodpecker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index 627d35e..c5426b4 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -4,5 +4,6 @@ pipeline: commands: - npm install --global standard-version - standard-version + - git tag branches: main -- 2.38.4 From 65671300f9c7464deb33c09853d2a7a6f3102235 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 22:32:40 +0100 Subject: [PATCH 11/23] chore(release): 1.1.0 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 221a903..9c0d730 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## 1.1.0 (2023-01-23) + + +### Features + +* :sparkles: implement Woodpecker Terraform module ([bea1561](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/commit/bea1561c7adbbd66c0df56a9088c7b3c067110e2)) + ### [1.0.1](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/compare/v1.0.0...v1.0.1) (2023-01-23) ## 1.0.0 (2023-01-23) -- 2.38.4 From 8b182baa2e3ba2ef03073052154e8c7279a934d3 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 22:32:55 +0100 Subject: [PATCH 12/23] chore(release): 1.1.1 --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c0d730..a6af66c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.1.1](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/compare/v1.1.0...v1.1.1) (2023-01-23) + ## 1.1.0 (2023-01-23) -- 2.38.4 From 6530285545970a193febc8518db4e433d24706e6 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 22:33:48 +0100 Subject: [PATCH 13/23] ci: :construction_worker: use npx to run standard-version --- .woodpecker.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index c5426b4..14e7604 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,8 +2,7 @@ pipeline: conventional_commits: image: node:19 commands: - - npm install --global standard-version - - standard-version + - npx standard-version - git tag branches: main -- 2.38.4 From 64fc5dd78da0470be9e10a2f6d5cdfb0f8d3cb40 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 22:35:16 +0100 Subject: [PATCH 14/23] ci: :green_heart: use dry run --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 14e7604..b6b01c1 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,7 +2,7 @@ pipeline: conventional_commits: image: node:19 commands: - - npx standard-version + - npx standard-version --dry-run - git tag branches: main -- 2.38.4 From 1fec3b5d39a64f0dbc24512f25d138bffea2113e Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 22:44:47 +0100 Subject: [PATCH 15/23] ci: :construction_worker: use node:18 image --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index b6b01c1..ee7bffb 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,6 +1,6 @@ pipeline: conventional_commits: - image: node:19 + image: node:18 commands: - npx standard-version --dry-run - git tag -- 2.38.4 From 6db40907a2481daf157677c244ac107e44f0cd86 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 22:45:35 +0100 Subject: [PATCH 16/23] ci: :construction_worker: remove --dry-run --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index ee7bffb..409caf1 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,7 +2,7 @@ pipeline: conventional_commits: image: node:18 commands: - - npx standard-version --dry-run + - npx standard-version - git tag branches: main -- 2.38.4 From 54aac8375ae0ec04e589363d963dbb5488ce4de8 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 22:53:21 +0100 Subject: [PATCH 17/23] ci: :construction_worker: switch to bash --- .woodpecker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index 409caf1..da77a62 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,6 +2,7 @@ pipeline: conventional_commits: image: node:18 commands: + - bash - npx standard-version - git tag -- 2.38.4 From 2d4744ccea7f2172e7eed182ab15ec039861d5d5 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 23 Jan 2023 22:02:11 +0000 Subject: [PATCH 18/23] chore(release): 1.1.0 --- CHANGELOG.md | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6af66c..66cfac4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,12 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -### [1.1.1](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/compare/v1.1.0...v1.1.1) (2023-01-23) +## 1.1.0 (2023-01-23) + + +### Features + +* :sparkles: implement Woodpecker Terraform module ([bea1561](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/commit/bea1561c7adbbd66c0df56a9088c7b3c067110e2)) ## 1.1.0 (2023-01-23) @@ -11,15 +16,24 @@ All notable changes to this project will be documented in this file. See [standa * :sparkles: implement Woodpecker Terraform module ([bea1561](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/commit/bea1561c7adbbd66c0df56a9088c7b3c067110e2)) -### [1.0.1](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/compare/v1.0.0...v1.0.1) (2023-01-23) +### [1.1.1](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/compare/v1.1.0...v1.1.1) (2023-01-23) -## 1.0.0 (2023-01-23) +## 1.1.0 (2023-01-23) ### Features * :sparkles: implement Woodpecker Terraform module ([bea1561](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/commit/bea1561c7adbbd66c0df56a9088c7b3c067110e2)) -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [1.0.1](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/compare/v1.0.0...v1.0.1) (2023-01-23) + +## 1.0.0 (2023-01-23) + + +### Features + +* :sparkles: implement Woodpecker Terraform module ([bea1561](https://gitea.ravianand.me/Dan6erbond/terraform-kubernetes-woodpecker/commit/bea1561c7adbbd66c0df56a9088c7b3c067110e2)) + +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. -- 2.38.4 From 6652d12e5ea75268c34f015bf6f86239e6e39895 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 23:03:26 +0100 Subject: [PATCH 19/23] ci: :construction_worker: install package with npm --- .woodpecker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index da77a62..f829586 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,8 +2,8 @@ pipeline: conventional_commits: image: node:18 commands: - - bash - - npx standard-version + - npm i -g standard-version + - standard-version - git tag branches: main -- 2.38.4 From f5ff8a8d51dd5c5be293106884c2afa2a2322aa2 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 23:09:36 +0100 Subject: [PATCH 20/23] ci: :construction_worker: add test script --- .woodpecker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker.yml b/.woodpecker.yml index f829586..e424c8d 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,6 +2,7 @@ pipeline: conventional_commits: image: node:18 commands: + - echo "test" >> test.txt - npm i -g standard-version - standard-version - git tag -- 2.38.4 From 6292ae38b4b3e75399affc3fedf0e497bde83543 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 23:12:09 +0100 Subject: [PATCH 21/23] ci: :construction_worker: add test script --- .woodpecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index e424c8d..c97531a 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,7 +2,7 @@ pipeline: conventional_commits: image: node:18 commands: - - echo "test" >> test.txt + - git config --list - npm i -g standard-version - standard-version - git tag -- 2.38.4 From dcc78e8a7590a27cd7d0b89af056a811a2a5d0d8 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 23:15:01 +0100 Subject: [PATCH 22/23] ci: :construction_worker: configure git --- .woodpecker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index c97531a..2204d23 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -2,7 +2,8 @@ pipeline: conventional_commits: image: node:18 commands: - - git config --list + - git config --global user.email "moravrav@gmail.com" + - git config --global user.name "RaviAnand Mohabir" - npm i -g standard-version - standard-version - git tag -- 2.38.4 From 0eba106b8442cc78f58c4a1cea412d23d6ac3b84 Mon Sep 17 00:00:00 2001 From: RaviAnand Mohabir Date: Mon, 23 Jan 2023 23:33:17 +0100 Subject: [PATCH 23/23] ci: :construction_worker: add git config with username and token and push action --- .woodpecker.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 2204d23..a7069de 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -4,8 +4,9 @@ pipeline: commands: - git config --global user.email "moravrav@gmail.com" - git config --global user.name "RaviAnand Mohabir" + - git config --global url."https://$GIT_USERNAME:$GIT_TOKEN@gitea.ravianand.me/".insteadOf "https://gitea.ravianand.me/" - npm i -g standard-version - standard-version - - git tag + - git push origin $(git tag | tail -1) branches: main -- 2.38.4