Compare commits
1 Commits
main
..
cee451f741
| Author | SHA1 | Date | |
|---|---|---|---|
| cee451f741 |
@@ -9,6 +9,7 @@ steps:
|
||||
VAULT_AUTH_METHOD: kubernetes
|
||||
commands:
|
||||
- dnf install vault -y
|
||||
- make plan
|
||||
- make apply
|
||||
backend_options:
|
||||
kubernetes:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.PHONY: init plan apply apply-if-changes format pre-commit
|
||||
.PHONY: init plan apply format
|
||||
|
||||
VAULT_AUTH_METHOD ?= approle
|
||||
VAULT_K8S_ROLE ?= woodpecker_terraform_git
|
||||
@@ -25,19 +25,6 @@ plan: init
|
||||
@$(call vault_env) && \
|
||||
terragrunt run --all --parallelism 4 --non-interactive plan
|
||||
|
||||
apply-if-changes: init
|
||||
@$(call vault_env) && \
|
||||
terragrunt run --all --parallelism 4 --non-interactive plan -- -detailed-exitcode -out=tfplan; \
|
||||
EXIT_CODE=$$?; \
|
||||
if [ $$EXIT_CODE -eq 2 ]; then \
|
||||
$(call vault_env) && \
|
||||
terragrunt run --all --parallelism 2 --non-interactive apply -- tfplan; \
|
||||
elif [ $$EXIT_CODE -eq 0 ]; then \
|
||||
echo "No changes detected, skipping apply."; \
|
||||
else \
|
||||
exit $$EXIT_CODE; \
|
||||
fi
|
||||
|
||||
apply: init
|
||||
@$(call vault_env) && \
|
||||
terragrunt run --all --parallelism 2 --non-interactive apply
|
||||
@@ -47,6 +34,3 @@ format:
|
||||
@tofu fmt -recursive .
|
||||
@echo "Formatting Terragrunt files..."
|
||||
@terragrunt hcl fmt
|
||||
|
||||
pre-commit:
|
||||
@uvx pre-commit run --all-files
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
description: "Simple API for showing a users age"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/test"
|
||||
- "ci/woodpecker/pr/build"
|
||||
approval_whitelist_teams:
|
||||
- "Owners"
|
||||
merge_whitelist_teams:
|
||||
- "Owners"
|
||||
@@ -1,4 +1,4 @@
|
||||
description: "Sudaporn's Research Data visualisation, normalised "
|
||||
private: false
|
||||
default_branch: "master"
|
||||
default_delete_branch_after_merge: true
|
||||
default_delete_branch_after_merge: false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
description: "Sudaporn's Research Data visualisation, normalised"
|
||||
private: false
|
||||
default_branch: "master"
|
||||
default_delete_branch_after_merge: true
|
||||
default_delete_branch_after_merge: false
|
||||
|
||||
@@ -9,4 +9,5 @@ branch_protection:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/kubeconform"
|
||||
approval_whitelist_users:
|
||||
- "benvin"
|
||||
- "unkinben"
|
||||
woodpecker: true
|
||||
|
||||
@@ -11,4 +11,5 @@ branch_protection:
|
||||
- "ci/woodpecker/pr/test"
|
||||
- "ci/woodpecker/pr/build"
|
||||
approval_whitelist_users:
|
||||
- "benvin"
|
||||
- "unkinben"
|
||||
woodpecker: true
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
description: "Kubernetes operator for managing BIND9 DNS clusters, zones, views, and TSIG keys"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/test"
|
||||
- "ci/woodpecker/pr/build"
|
||||
approval_whitelist_teams:
|
||||
- "Owners"
|
||||
@@ -1,11 +1,12 @@
|
||||
description: "Vault PKI certificate issuance and SSH host key signing tool for Puppet-managed infrastructure"
|
||||
private: false
|
||||
default_branch: "master"
|
||||
default_delete_branch_after_merge: true
|
||||
default_delete_branch_after_merge: false
|
||||
branch_protection:
|
||||
- rule_name: "master"
|
||||
enable_push: false
|
||||
merge_whitelist_users:
|
||||
- "benvin"
|
||||
- "unkinben"
|
||||
approval_whitelist_users:
|
||||
- "benvin"
|
||||
- "unkinben"
|
||||
woodpecker: true
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
description: "Base container image for forgebot agents"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/build"
|
||||
approval_whitelist_teams:
|
||||
- "docker"
|
||||
- "forgebot"
|
||||
@@ -1,13 +0,0 @@
|
||||
description: "Dev toolchain container for forgebot agents"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/build"
|
||||
approval_whitelist_teams:
|
||||
- "docker"
|
||||
- "forgebot"
|
||||
@@ -1,13 +0,0 @@
|
||||
description: "Infrastructure toolchain container for forgebot agents"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/build"
|
||||
approval_whitelist_teams:
|
||||
- "docker"
|
||||
- "forgebot"
|
||||
@@ -1,3 +1,3 @@
|
||||
description: "Docker image to be used in Kubernetes as a developers container"
|
||||
private: false
|
||||
default_delete_branch_after_merge: true
|
||||
default_delete_branch_after_merge: false
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
description: "Postgres-backed External Node Classifier (ENC) for Puppet, replacing Cobbler. Go API + encapi-cli."
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/test"
|
||||
- "ci/woodpecker/pr/build"
|
||||
approval_whitelist_users:
|
||||
- "benvin"
|
||||
@@ -1,14 +0,0 @@
|
||||
description: "Skill definitions for forgebot agents"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/validate"
|
||||
approval_whitelist_teams:
|
||||
- "forgebot"
|
||||
merge_whitelist_teams:
|
||||
- "forgebot"
|
||||
@@ -1,16 +0,0 @@
|
||||
description: "K8s operator + API for AI agent dispatch from git forges"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/test"
|
||||
- "ci/woodpecker/pr/build"
|
||||
approval_whitelist_teams:
|
||||
- "forgebot"
|
||||
merge_whitelist_teams:
|
||||
- "forgebot"
|
||||
@@ -1,3 +1,3 @@
|
||||
description: "A repository for building initrd.img in docker "
|
||||
private: false
|
||||
default_delete_branch_after_merge: true
|
||||
default_delete_branch_after_merge: false
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
description: "Container build for the jellyfin-ha (HA transcoding) Jellyfin fork"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/build"
|
||||
approval_whitelist_teams:
|
||||
- "docker"
|
||||
@@ -1,14 +1,15 @@
|
||||
description: "A CLI tool written in Go that queries the PuppetDB API to look up and filter node facts."
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_branch: "master"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
- rule_name: "master"
|
||||
enable_push: false
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/build"
|
||||
- "ci/woodpecker/pr/test"
|
||||
- "ci/woodpecker/pr/lint"
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/unit-tests"
|
||||
approval_whitelist_users:
|
||||
- "benvin"
|
||||
- "unkinben"
|
||||
woodpecker: true
|
||||
|
||||
@@ -35,3 +35,4 @@ branch_protection:
|
||||
- "ci/woodpecker/pr/yamllint"
|
||||
approval_whitelist_teams:
|
||||
- "puppet"
|
||||
woodpecker: true
|
||||
|
||||
@@ -13,3 +13,4 @@ branch_protection:
|
||||
approval_whitelist_teams:
|
||||
- "puppet"
|
||||
block_on_rejected_reviews: true
|
||||
woodpecker: true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
description: "Package the internal ca-certificates"
|
||||
private: false
|
||||
default_branch: "master"
|
||||
default_delete_branch_after_merge: true
|
||||
default_delete_branch_after_merge: false
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
description: "Build rpms for jellyfin-web"
|
||||
private: false
|
||||
default_branch: "master"
|
||||
default_delete_branch_after_merge: true
|
||||
default_delete_branch_after_merge: false
|
||||
archived: true
|
||||
|
||||
@@ -18,3 +18,4 @@ branch_protection:
|
||||
approval_whitelist_teams:
|
||||
- "rpmbuild"
|
||||
block_on_rejected_reviews: true
|
||||
woodpecker: true
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
description: "A stack of microservices that aim to offer a distributed streaming service."
|
||||
private: false
|
||||
default_delete_branch_after_merge: true
|
||||
default_delete_branch_after_merge: false
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
description: "Terraform configuration for managing ArtifactAPI remote and virtual repositories"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
merge_whitelist_users:
|
||||
- "benvin"
|
||||
- "unkinben"
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/plan"
|
||||
approval_whitelist_users:
|
||||
- "benvin"
|
||||
approval_whitelist_teams:
|
||||
- "Owners"
|
||||
@@ -1,18 +0,0 @@
|
||||
description: "Terraform configuration for managing Authentik identity provider"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
merge_whitelist_users:
|
||||
- "benvin"
|
||||
- "unkinben"
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/plan"
|
||||
approval_whitelist_users:
|
||||
- "benvin"
|
||||
approval_whitelist_teams:
|
||||
- "Owners"
|
||||
@@ -1,7 +1,7 @@
|
||||
description: "Manage Gitea resources, teams, repos, and Woodpecker CI via Terraform"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
woodpecker: true
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
@@ -9,6 +9,6 @@ branch_protection:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/plan"
|
||||
approval_whitelist_users:
|
||||
- "benvin"
|
||||
- "unkinben"
|
||||
approval_whitelist_teams:
|
||||
- "Owners"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
description: "Manage nomad with Terraform"
|
||||
private: false
|
||||
default_branch: "master"
|
||||
default_delete_branch_after_merge: true
|
||||
default_delete_branch_after_merge: false
|
||||
branch_protection:
|
||||
- rule_name: "master"
|
||||
enable_push: false
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
description: "Terraform provider for managing ArtifactAPI"
|
||||
private: false
|
||||
default_delete_branch_after_merge: true
|
||||
default_delete_branch_after_merge: false
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/build"
|
||||
- "ci/woodpecker/pr/test"
|
||||
approval_whitelist_teams:
|
||||
- "Owners"
|
||||
woodpecker: true
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
description: "Terraform provider for encapi: manage Puppet ENC roles, statuses, and node assignments."
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/build"
|
||||
- "ci/woodpecker/pr/test"
|
||||
approval_whitelist_users:
|
||||
- "benvin"
|
||||
@@ -1,19 +0,0 @@
|
||||
description: "Terraform provider for the Vault/OpenBao LiteLLM dynamic secrets engine (litellmvaultsecret)"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
# Squash-only: the gitea provider has no "default merge style", so we restrict
|
||||
# the allowed styles to squash to force it.
|
||||
allow_merge_commits: false
|
||||
allow_rebase: false
|
||||
allow_rebase_explicit: false
|
||||
allow_squash_merge: true
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/build"
|
||||
- "ci/woodpecker/pr/test"
|
||||
approval_whitelist_teams:
|
||||
- "Owners"
|
||||
@@ -1,18 +0,0 @@
|
||||
description: "Terraform configuration for managing Prowlarr indexer automation"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
merge_whitelist_users:
|
||||
- "benvin"
|
||||
- "unkinben"
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/plan"
|
||||
approval_whitelist_users:
|
||||
- "benvin"
|
||||
approval_whitelist_teams:
|
||||
- "Owners"
|
||||
@@ -1,18 +0,0 @@
|
||||
description: "Terraform configuration for managing Radarr movie automation"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
merge_whitelist_users:
|
||||
- "benvin"
|
||||
- "unkinben"
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/plan"
|
||||
approval_whitelist_users:
|
||||
- "benvin"
|
||||
approval_whitelist_teams:
|
||||
- "Owners"
|
||||
@@ -1,18 +0,0 @@
|
||||
description: "Terraform configuration for managing Sonarr TV automation"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
merge_whitelist_users:
|
||||
- "benvin"
|
||||
- "unkinben"
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/plan"
|
||||
approval_whitelist_users:
|
||||
- "benvin"
|
||||
approval_whitelist_teams:
|
||||
- "Owners"
|
||||
@@ -13,6 +13,7 @@ branch_protection:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/plan"
|
||||
approval_whitelist_users:
|
||||
- "benvin"
|
||||
- "unkinben"
|
||||
approval_whitelist_teams:
|
||||
- "Owners"
|
||||
woodpecker: true
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
description: "Spiritual successor to shorewall — nftables firewall manager using google/nftables"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
default_merge_style: "squash"
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
@@ -1,19 +0,0 @@
|
||||
description: "HashiCorp Vault / OpenBao dynamic secrets engine for LiteLLM virtual keys"
|
||||
private: false
|
||||
default_branch: "main"
|
||||
default_delete_branch_after_merge: true
|
||||
# Squash-only: the gitea provider has no "default merge style", so we restrict
|
||||
# the allowed styles to squash to force it.
|
||||
allow_merge_commits: false
|
||||
allow_rebase: false
|
||||
allow_rebase_explicit: false
|
||||
allow_squash_merge: true
|
||||
branch_protection:
|
||||
- rule_name: "main"
|
||||
enable_push: false
|
||||
status_check_contexts:
|
||||
- "ci/woodpecker/pr/pre-commit"
|
||||
- "ci/woodpecker/pr/build"
|
||||
- "ci/woodpecker/pr/test"
|
||||
approval_whitelist_teams:
|
||||
- "Owners"
|
||||
@@ -1,13 +0,0 @@
|
||||
description: "forgebot maintainers"
|
||||
permission: none
|
||||
include_all_repositories: false
|
||||
can_create_repos: false
|
||||
repositories:
|
||||
- forgebot
|
||||
- forgebot-skills
|
||||
- container-agent-base
|
||||
- container-agent-dev
|
||||
- container-agent-infra
|
||||
members:
|
||||
- unkinben
|
||||
- benvin
|
||||
@@ -20,5 +20,6 @@ inputs = {
|
||||
organisation = local.config.organisation
|
||||
repository = local.config.repository
|
||||
branch_protection = local.config.branch_protection
|
||||
deploy_key = local.config.deploy_key
|
||||
team = local.config.team
|
||||
}
|
||||
|
||||
@@ -19,6 +19,21 @@ terraform {
|
||||
lock = true
|
||||
ca_file = "/etc/pki/tls/certs/ca-bundle.crt"
|
||||
}
|
||||
required_version = ">= 1.10"
|
||||
required_providers {
|
||||
gitea = {
|
||||
source = "go-gitea/gitea"
|
||||
version = "0.7.0"
|
||||
}
|
||||
woodpecker = {
|
||||
source = "Kichiyaki/woodpecker"
|
||||
version = "0.5.0"
|
||||
}
|
||||
consul = {
|
||||
source = "hashicorp/consul"
|
||||
version = "2.23.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -143,31 +143,6 @@ import {
|
||||
id = "137"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.repository["git.unkin.net/unkin/forgebot"].gitea_repository.this
|
||||
id = "139"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.repository["git.unkin.net/unkin/forgebot-skills"].gitea_repository.this
|
||||
id = "140"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.repository["git.unkin.net/unkin/container-agent-base"].gitea_repository.this
|
||||
id = "141"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.repository["git.unkin.net/unkin/container-agent-dev"].gitea_repository.this
|
||||
id = "142"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.repository["git.unkin.net/unkin/container-agent-infra"].gitea_repository.this
|
||||
id = "143"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.team["git.unkin.net/unkin/Owners"].gitea_team.this
|
||||
id = "3"
|
||||
@@ -198,8 +173,58 @@ import {
|
||||
id = "12"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.woodpecker_repository["git.unkin.net/unkin/puppet-prod"].woodpecker_repository.this
|
||||
id = "unkin/puppet-prod"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.woodpecker_repository["git.unkin.net/unkin/puppet-r10k"].woodpecker_repository.this
|
||||
id = "unkin/puppet-r10k"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.woodpecker_repository["git.unkin.net/unkin/terraform-vault"].woodpecker_repository.this
|
||||
id = "unkin/terraform-vault"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.woodpecker_repository["git.unkin.net/unkin/rpmbuilder"].woodpecker_repository.this
|
||||
id = "unkin/rpmbuilder"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.woodpecker_repository["git.unkin.net/unkin/artifactapi"].woodpecker_repository.this
|
||||
id = "unkin/artifactapi"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.woodpecker_repository["git.unkin.net/unkin/argocd-apps"].woodpecker_repository.this
|
||||
id = "unkin/argocd-apps"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.woodpecker_repository["git.unkin.net/unkin/certmanager"].woodpecker_repository.this
|
||||
id = "unkin/certmanager"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.woodpecker_repository["git.unkin.net/unkin/node-lookup"].woodpecker_repository.this
|
||||
id = "unkin/node-lookup"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.woodpecker_repository["git.unkin.net/unkin/terraform-provider-artifactapi"].woodpecker_repository.this
|
||||
id = "unkin/terraform-provider-artifactapi"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.repository["git.unkin.net/unkin/terraform-git"].gitea_repository.this
|
||||
id = "144"
|
||||
}
|
||||
|
||||
import {
|
||||
to = module.woodpecker_repository["git.unkin.net/unkin/terraform-git"].woodpecker_repository.this
|
||||
id = "unkin/terraform-git"
|
||||
}
|
||||
|
||||
|
||||
@@ -55,12 +55,18 @@ module "team" {
|
||||
depends_on = [module.organisation, module.repository]
|
||||
}
|
||||
|
||||
removed {
|
||||
from = module.woodpecker_repository
|
||||
module "woodpecker_repository" {
|
||||
source = "./modules/woodpecker_repository"
|
||||
|
||||
lifecycle {
|
||||
destroy = false
|
||||
for_each = {
|
||||
for k, v in var.repository : k => v
|
||||
if try(v.woodpecker, false)
|
||||
}
|
||||
|
||||
full_name = "${each.value.organisation}/${each.value.name}"
|
||||
visibility = each.value.private ? "private" : "public"
|
||||
|
||||
depends_on = [module.repository]
|
||||
}
|
||||
|
||||
module "branch_protection" {
|
||||
@@ -89,7 +95,7 @@ module "branch_protection" {
|
||||
protected_file_patterns = each.value.protected_file_patterns
|
||||
unprotected_file_patterns = each.value.unprotected_file_patterns
|
||||
|
||||
depends_on = [module.repository, module.team]
|
||||
depends_on = [module.repository]
|
||||
}
|
||||
|
||||
# TODO: enable when deploy keys are needed
|
||||
|
||||
@@ -6,10 +6,6 @@ resource "gitea_team" "this" {
|
||||
include_all_repositories = var.include_all_repositories
|
||||
can_create_repos = var.can_create_repos
|
||||
repositories = var.repositories
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [permission]
|
||||
}
|
||||
}
|
||||
|
||||
resource "gitea_team_members" "this" {
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
resource "woodpecker_repository" "this" {
|
||||
full_name = var.full_name
|
||||
visibility = var.visibility
|
||||
}
|
||||
-4
@@ -1,10 +1,6 @@
|
||||
terraform {
|
||||
required_version = ">= 1.10"
|
||||
required_providers {
|
||||
gitea = {
|
||||
source = "go-gitea/gitea"
|
||||
version = "0.7.0"
|
||||
}
|
||||
woodpecker = {
|
||||
source = "Kichiyaki/woodpecker"
|
||||
version = "0.5.0"
|
||||
@@ -0,0 +1,8 @@
|
||||
variable "full_name" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "visibility" {
|
||||
type = string
|
||||
default = "internal"
|
||||
}
|
||||
@@ -15,8 +15,8 @@ variable "organisation" {
|
||||
variable "repository" {
|
||||
description = "Map of repositories to create"
|
||||
type = map(object({
|
||||
name = string
|
||||
organisation = string
|
||||
name = string
|
||||
organisation = string
|
||||
description = optional(string)
|
||||
private = optional(bool)
|
||||
default_branch = optional(string)
|
||||
@@ -32,6 +32,7 @@ variable "repository" {
|
||||
repo_template = optional(bool)
|
||||
website = optional(string)
|
||||
autodetect_manual_merge = optional(bool)
|
||||
woodpecker = optional(bool, false)
|
||||
}))
|
||||
default = {}
|
||||
}
|
||||
@@ -63,6 +64,18 @@ variable "branch_protection" {
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "deploy_key" {
|
||||
description = "Map of deploy keys to create"
|
||||
type = map(object({
|
||||
repository = string
|
||||
organisation = string
|
||||
gitea_url = string
|
||||
title = string
|
||||
key = string
|
||||
read_only = optional(bool, true)
|
||||
}))
|
||||
default = {}
|
||||
}
|
||||
|
||||
variable "team" {
|
||||
description = "Map of teams to create"
|
||||
|
||||
Reference in New Issue
Block a user