Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions ansible/inventory/group_vars/all/source-repositories
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ community_files:
* @stackhpc/batch
kayobe: |
* @stackhpc/kayobe
monitoring: |
* @stackhpc/monitoring
openstack: |
* @stackhpc/openstack
platform: |
Expand Down Expand Up @@ -123,6 +125,14 @@ source_repositories:
- codeowners:
content: "{{ community_files.codeowners.kayobe }}"
dest: ".github/CODEOWNERS"
# Monitoring team
redfish_exporter:
repository_type: "single-branch"
workflows: []
community_files:
- codeowners:
content: "{{ community_files.codeowners.monitoring }}"
dest: ".github/CODEOWNERS"
# OpenStack team
bifrost:
synced_releases:
Expand Down
32 changes: 32 additions & 0 deletions terraform/github/branches.tf
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,38 @@ resource "github_branch_protection" "kayobe_branch_protection_master" {
}
}

resource "github_branch_protection" "monitoring_branch_protection" {
for_each = toset(var.repositories["Monitoring"])
repository_id = data.github_repository.repositories[each.key].node_id

pattern = data.github_repository.repositories[each.key].default_branch
require_conversation_resolution = true
allows_deletions = false
allows_force_pushes = false

required_pull_request_reviews {
dismiss_stale_reviews = true
require_code_owner_reviews = true
required_approving_review_count = 1
}

restrict_pushes {
blocks_creations = false
push_allowances = [
resource.github_team.organisation_teams["Developers"].node_id
]
}

required_status_checks {
contexts = lookup(var.required_status_checks, each.key, { "default" : [] }).default
strict = false
}

lifecycle {
prevent_destroy = true
}
}

resource "github_branch_protection" "openstack_branch_protection_py_3-6" {
for_each = toset(var.repositories["OpenStack"])
repository_id = data.github_repository.repositories[each.key].node_id
Expand Down
7 changes: 7 additions & 0 deletions terraform/github/teams.tf
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ resource "github_team_repository" "kayobe_repositories" {
permission = "push"
}

resource "github_team_repository" "monitoring_repositories" {
for_each = toset(var.repositories["Monitoring"])
team_id = resource.github_team.organisation_teams["Monitoring"].id
repository = each.value
permission = "push"
}

resource "github_team_repository" "openstack_repositories" {
for_each = toset(var.repositories["OpenStack"])
team_id = resource.github_team.organisation_teams["OpenStack"].id
Expand Down
29 changes: 29 additions & 0 deletions terraform/github/terraform.tfvars.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@
"stackhpc-kayobe-config",
"ansible-collection-kayobe-workflows"
],
"Monitoring": [
"redfish_exporter"
],
"OpenStack": [
"barbican",
"bifrost",
Expand Down Expand Up @@ -237,6 +240,27 @@
]
}
},
"Monitoring": {
Comment thread
dougszumski marked this conversation as resolved.
Resolved
"description": "Team responsible for monitoring development",
"privacy": "closed",
"users": {
"maintainers": [
"dougszumski",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to amend this, it's just based on historical contributors to the redfish exporter currently

"jovial",
"m-bull",
"MurrayGroves"
],
"members": [
"bbezak",
"cityofships",
"mnasiadka",
"motehue",
"priteau",
"technowhizz",
"stackhpc-ci"
]
}
},
"OpenStack": {
"description": "Team responsible for OpenStack development",
"privacy": "closed",
Expand Down Expand Up @@ -386,6 +410,11 @@
"Build OpenStack admin guide"
]
},
"redfish_exporter": {
"default": [
"build"
]
},
"stackhpc-kayobe-config": {
"default": [
"Tox pep8 with Python 3.10",
Expand Down
9 changes: 9 additions & 0 deletions terraform/github/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ variable "repositories" {
"Ansible" = [],
"Batch" = [],
"Kayobe" = [],
"Monitoring" = [],
"OpenStack" = [],
"Platform" = [],
"ReleaseTrain" = [],
Expand Down Expand Up @@ -73,6 +74,14 @@ variable "teams" {
members = [],
}
},
"Monitoring" = {
description = "Team responsible for monitoring development"
privacy = "closed"
users = {
maintainers = [],
members = [],
}
},
"OpenStack" = {
description = "Team responsible for OpenStack development"
privacy = "closed"
Expand Down
Loading