Skip to content

Commit

Permalink
Add oddfellows pt repos (#118)
Browse files Browse the repository at this point in the history
* Add oddfellows pt repos

* Fix Paul membership
  • Loading branch information
steveburtonBUR authored Feb 3, 2025
1 parent 90d05c9 commit f1f60ce
Show file tree
Hide file tree
Showing 4 changed files with 218 additions and 2 deletions.
72 changes: 72 additions & 0 deletions burendo-oddfellows-pt-apis.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
resource "github_repository" "burendo_oddfellows_pt_apis" {
name = "burendo-oddfellows-pt-apis"
description = "Front end repo for the Oddfellows prototype"
visibility = "public"
auto_init = false

allow_merge_commit = false
delete_branch_on_merge = true
has_issues = true
topics = local.common_topics

lifecycle {
prevent_destroy = true
}

template {
owner = var.github_org
repository = "burendo-repo-template"
}
}

resource "github_team_repository" "burendo_oddfellows_pt_apis_push" {
repository = github_repository.burendo_oddfellows_pt_apis.name
team_id = github_team.burendo.id
permission = "push"
}

resource "github_team_repository" "burendo_oddfellows_pt_apis_admin" {
repository = github_repository.burendo_oddfellows_pt_apis.name
team_id = github_team.engineering.id
permission = "admin"
}

resource "github_branch_protection" "burendo_oddfellows_pt_apis_main" {
pattern = github_repository.burendo_oddfellows_pt_apis.default_branch
repository_id = github_repository.burendo_oddfellows_pt_apis.name
enforce_admins = true

required_status_checks {
strict = true
}

required_pull_request_reviews {
dismiss_stale_reviews = true
require_code_owner_reviews = true
}
}

resource "github_issue_label" "burendo_oddfellows_pt_apis" {
for_each = { for common_label in local.common_labels : common_label.name => common_label }
color = each.value.colour
name = each.value.name
repository = github_repository.burendo_oddfellows_pt_apis.name
}

resource "github_actions_secret" "burendo_oddfellows_pt_apis_github_token" {
repository = github_repository.burendo_oddfellows_pt_apis.name
secret_name = "GHA_TOKEN"
plaintext_value = var.github_token
}

resource "github_actions_secret" "burendo_oddfellows_pt_apis_slack_build_notifications_webhook" {
repository = github_repository.burendo_oddfellows_pt_apis.name
secret_name = "SLACK_BUILD_NOTIFICATIONS_WEBHOOK"
plaintext_value = var.gha_aws.slack_build_notifications_webhook
}

resource "github_actions_secret" "burendo_oddfellows_pt_apis_slack_engineering_group_id" {
repository = github_repository.burendo_oddfellows_pt_apis.name
secret_name = "SLACK_ENGINEERING_GROUP_ID"
plaintext_value = var.gha_aws.slack_engineering_group_id
}
72 changes: 72 additions & 0 deletions burendo-oddfellows-pt-frontend.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
resource "github_repository" "burendo_oddfellows_pt_frontend" {
name = "burendo-oddfellows-pt-frontend"
description = "Front end repo for the Oddfellows prototype"
visibility = "public"
auto_init = false

allow_merge_commit = false
delete_branch_on_merge = true
has_issues = true
topics = local.common_topics

lifecycle {
prevent_destroy = true
}

template {
owner = var.github_org
repository = "burendo-repo-template"
}
}

resource "github_team_repository" "burendo_oddfellows_pt_frontend_push" {
repository = github_repository.burendo_oddfellows_pt_frontend.name
team_id = github_team.burendo.id
permission = "push"
}

resource "github_team_repository" "burendo_oddfellows_pt_frontend_admin" {
repository = github_repository.burendo_oddfellows_pt_frontend.name
team_id = github_team.engineering.id
permission = "admin"
}

resource "github_branch_protection" "burendo_oddfellows_pt_frontend_main" {
pattern = github_repository.burendo_oddfellows_pt_frontend.default_branch
repository_id = github_repository.burendo_oddfellows_pt_frontend.name
enforce_admins = true

required_status_checks {
strict = true
}

required_pull_request_reviews {
dismiss_stale_reviews = true
require_code_owner_reviews = true
}
}

resource "github_issue_label" "burendo_oddfellows_pt_frontend" {
for_each = { for common_label in local.common_labels : common_label.name => common_label }
color = each.value.colour
name = each.value.name
repository = github_repository.burendo_oddfellows_pt_frontend.name
}

resource "github_actions_secret" "burendo_oddfellows_pt_frontend_github_token" {
repository = github_repository.burendo_oddfellows_pt_frontend.name
secret_name = "GHA_TOKEN"
plaintext_value = var.github_token
}

resource "github_actions_secret" "burendo_oddfellows_pt_frontend_slack_build_notifications_webhook" {
repository = github_repository.burendo_oddfellows_pt_frontend.name
secret_name = "SLACK_BUILD_NOTIFICATIONS_WEBHOOK"
plaintext_value = var.gha_aws.slack_build_notifications_webhook
}

resource "github_actions_secret" "burendo_oddfellows_pt_frontend_slack_engineering_group_id" {
repository = github_repository.burendo_oddfellows_pt_frontend.name
secret_name = "SLACK_ENGINEERING_GROUP_ID"
plaintext_value = var.gha_aws.slack_engineering_group_id
}
72 changes: 72 additions & 0 deletions burendo-oddfellows-pt-infra.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
resource "github_repository" "burendo_oddfellows_pt_infra" {
name = "burendo-oddfellows-pt-infra"
description = "Front end repo for the Oddfellows prototype"
visibility = "public"
auto_init = false

allow_merge_commit = false
delete_branch_on_merge = true
has_issues = true
topics = local.common_topics

lifecycle {
prevent_destroy = true
}

template {
owner = var.github_org
repository = "burendo-repo-template"
}
}

resource "github_team_repository" "burendo_oddfellows_pt_infra_push" {
repository = github_repository.burendo_oddfellows_pt_infra.name
team_id = github_team.burendo.id
permission = "push"
}

resource "github_team_repository" "burendo_oddfellows_pt_infra_admin" {
repository = github_repository.burendo_oddfellows_pt_infra.name
team_id = github_team.engineering.id
permission = "admin"
}

resource "github_branch_protection" "burendo_oddfellows_pt_infra_main" {
pattern = github_repository.burendo_oddfellows_pt_infra.default_branch
repository_id = github_repository.burendo_oddfellows_pt_infra.name
enforce_admins = true

required_status_checks {
strict = true
}

required_pull_request_reviews {
dismiss_stale_reviews = true
require_code_owner_reviews = true
}
}

resource "github_issue_label" "burendo_oddfellows_pt_infra" {
for_each = { for common_label in local.common_labels : common_label.name => common_label }
color = each.value.colour
name = each.value.name
repository = github_repository.burendo_oddfellows_pt_infra.name
}

resource "github_actions_secret" "burendo_oddfellows_pt_infra_github_token" {
repository = github_repository.burendo_oddfellows_pt_infra.name
secret_name = "GHA_TOKEN"
plaintext_value = var.github_token
}

resource "github_actions_secret" "burendo_oddfellows_pt_infra_slack_build_notifications_webhook" {
repository = github_repository.burendo_oddfellows_pt_infra.name
secret_name = "SLACK_BUILD_NOTIFICATIONS_WEBHOOK"
plaintext_value = var.gha_aws.slack_build_notifications_webhook
}

resource "github_actions_secret" "burendo_oddfellows_pt_infra_slack_engineering_group_id" {
repository = github_repository.burendo_oddfellows_pt_infra.name
secret_name = "SLACK_ENGINEERING_GROUP_ID"
plaintext_value = var.gha_aws.slack_engineering_group_id
}
4 changes: 2 additions & 2 deletions users.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ resource "github_membership" "engineering_membership_phillip-stanley" {
role = "member"
}

resource "github_membership" "engineering_membership_zesh92" {
username = "zesh92" //Zeshan Zoheb
resource "github_membership" "engineering_membership_Jita81" {
username = "Jita81" //Paul Glover
role = "member"
}

Expand Down

0 comments on commit f1f60ce

Please sign in to comment.