Skip to content

Commit 641db34

Browse files
authored
Merge pull request #484 from stackhpc/bump-integrations-github
Bump integrations/github to v6
2 parents e3bb7ba + 5c55fe9 commit 641db34

File tree

5 files changed

+114
-59
lines changed

5 files changed

+114
-59
lines changed

.github/workflows/terraform-github.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: Terraform Init
3636
id: init
37-
run: terraform init
37+
run: terraform init -upgrade
3838

3939
- name: Terraform Validate
4040
id: validate

terraform/github/branches.tf

Lines changed: 102 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ resource "github_branch_protection" "ansible_branch_protection" {
1818
# being able to merge. Also this should prevent outsiders from pushing to the protected branch,
1919
# however, whilst they can open a pull request they shoud not be able to merge that would be
2020
# upto the reviewers or codeowners.
21-
push_restrictions = [
22-
resource.github_team.organisation_teams["Developers"].node_id
23-
]
21+
restrict_pushes {
22+
blocks_creations = false
23+
push_allowances = [
24+
resource.github_team.organisation_teams["Developers"].node_id
25+
]
26+
}
2427

2528
required_status_checks {
2629
contexts = lookup(var.required_status_checks, each.key, { "default" : [] }).default
@@ -47,9 +50,12 @@ resource "github_branch_protection" "batch_branch_protection" {
4750
required_approving_review_count = 1
4851
}
4952

50-
push_restrictions = [
51-
resource.github_team.organisation_teams["Developers"].node_id
52-
]
53+
restrict_pushes {
54+
blocks_creations = false
55+
push_allowances = [
56+
resource.github_team.organisation_teams["Developers"].node_id
57+
]
58+
}
5359

5460
required_status_checks {
5561
contexts = lookup(var.required_status_checks, each.key, { "default" : [] }).default
@@ -80,9 +86,12 @@ resource "github_branch_protection" "kayobe_branch_protection_py_3-6" {
8086
required_approving_review_count = 1
8187
}
8288

83-
push_restrictions = [
84-
resource.github_team.organisation_teams["Developers"].node_id
85-
]
89+
restrict_pushes {
90+
blocks_creations = false
91+
push_allowances = [
92+
resource.github_team.organisation_teams["Developers"].node_id
93+
]
94+
}
8695

8796
required_status_checks {
8897
contexts = lookup(lookup(var.required_status_checks, each.key, {}), "stackhpc/[vwxy]*", lookup(var.required_status_checks, each.key, {
@@ -114,9 +123,12 @@ resource "github_branch_protection" "kayobe_branch_protection_zed" {
114123
required_approving_review_count = 1
115124
}
116125

117-
push_restrictions = [
118-
resource.github_team.organisation_teams["Developers"].node_id
119-
]
126+
restrict_pushes {
127+
blocks_creations = false
128+
push_allowances = [
129+
resource.github_team.organisation_teams["Developers"].node_id
130+
]
131+
}
120132

121133
required_status_checks {
122134
contexts = lookup(lookup(var.required_status_checks, each.key, {}), "stackhpc/zed", lookup(var.required_status_checks, each.key, {
@@ -149,9 +161,12 @@ resource "github_branch_protection" "kayobe_branch_protection_antelope" {
149161
required_approving_review_count = 1
150162
}
151163

152-
push_restrictions = [
153-
resource.github_team.organisation_teams["Developers"].node_id
154-
]
164+
restrict_pushes {
165+
blocks_creations = false
166+
push_allowances = [
167+
resource.github_team.organisation_teams["Developers"].node_id
168+
]
169+
}
155170

156171
required_status_checks {
157172
contexts = lookup(lookup(var.required_status_checks, each.key, {}), "stackhpc/2023.1", lookup(var.required_status_checks, each.key, {
@@ -184,9 +199,12 @@ resource "github_branch_protection" "kayobe_branch_protection_caracal" {
184199
required_approving_review_count = 1
185200
}
186201

187-
push_restrictions = [
188-
resource.github_team.organisation_teams["Developers"].node_id
189-
]
202+
restrict_pushes {
203+
blocks_creations = false
204+
push_allowances = [
205+
resource.github_team.organisation_teams["Developers"].node_id
206+
]
207+
}
190208

191209
required_status_checks {
192210
contexts = lookup(lookup(var.required_status_checks, each.key, {}), "stackhpc/2024.1", lookup(var.required_status_checks, each.key, {
@@ -218,9 +236,12 @@ resource "github_branch_protection" "kayobe_branch_protection_epoxy" {
218236
required_approving_review_count = 1
219237
}
220238

221-
push_restrictions = [
222-
resource.github_team.organisation_teams["Developers"].node_id
223-
]
239+
restrict_pushes {
240+
blocks_creations = false
241+
push_allowances = [
242+
resource.github_team.organisation_teams["Developers"].node_id
243+
]
244+
}
224245

225246
required_status_checks {
226247
contexts = lookup(lookup(var.required_status_checks, each.key, {}), "stackhpc/2025.1", lookup(var.required_status_checks, each.key, {
@@ -254,9 +275,12 @@ resource "github_branch_protection" "kayobe_branch_protection_master" {
254275
required_approving_review_count = 1
255276
}
256277

257-
push_restrictions = [
258-
resource.github_team.organisation_teams["Developers"].node_id
259-
]
278+
restrict_pushes {
279+
blocks_creations = false
280+
push_allowances = [
281+
resource.github_team.organisation_teams["Developers"].node_id
282+
]
283+
}
260284

261285
required_status_checks {
262286
contexts = lookup(lookup(var.required_status_checks, each.key, {}), "stackhpc/master", lookup(var.required_status_checks, each.key, {
@@ -286,9 +310,12 @@ resource "github_branch_protection" "openstack_branch_protection_py_3-6" {
286310
allows_deletions = false
287311
allows_force_pushes = false
288312

289-
push_restrictions = [
290-
resource.github_team.organisation_teams["Developers"].node_id
291-
]
313+
restrict_pushes {
314+
blocks_creations = false
315+
push_allowances = [
316+
resource.github_team.organisation_teams["Developers"].node_id
317+
]
318+
}
292319

293320
required_pull_request_reviews {
294321
dismiss_stale_reviews = true
@@ -319,9 +346,12 @@ resource "github_branch_protection" "openstack_branch_protection_zed" {
319346
allows_deletions = false
320347
allows_force_pushes = false
321348

322-
push_restrictions = [
323-
resource.github_team.organisation_teams["Developers"].node_id
324-
]
349+
restrict_pushes {
350+
blocks_creations = false
351+
push_allowances = [
352+
resource.github_team.organisation_teams["Developers"].node_id
353+
]
354+
}
325355

326356
required_pull_request_reviews {
327357
dismiss_stale_reviews = true
@@ -354,9 +384,12 @@ resource "github_branch_protection" "openstack_branch_protection_antelope" {
354384
allows_deletions = false
355385
allows_force_pushes = false
356386

357-
push_restrictions = [
358-
resource.github_team.organisation_teams["Developers"].node_id
359-
]
387+
restrict_pushes {
388+
blocks_creations = false
389+
push_allowances = [
390+
resource.github_team.organisation_teams["Developers"].node_id
391+
]
392+
}
360393

361394
required_pull_request_reviews {
362395
dismiss_stale_reviews = true
@@ -389,9 +422,12 @@ resource "github_branch_protection" "openstack_branch_protection_caracal" {
389422
allows_deletions = false
390423
allows_force_pushes = false
391424

392-
push_restrictions = [
393-
resource.github_team.organisation_teams["Developers"].node_id
394-
]
425+
restrict_pushes {
426+
blocks_creations = false
427+
push_allowances = [
428+
resource.github_team.organisation_teams["Developers"].node_id
429+
]
430+
}
395431

396432
required_pull_request_reviews {
397433
dismiss_stale_reviews = true
@@ -423,9 +459,12 @@ resource "github_branch_protection" "openstack_branch_protection_epoxy" {
423459
allows_deletions = false
424460
allows_force_pushes = false
425461

426-
push_restrictions = [
427-
resource.github_team.organisation_teams["Developers"].node_id
428-
]
462+
restrict_pushes {
463+
blocks_creations = false
464+
push_allowances = [
465+
resource.github_team.organisation_teams["Developers"].node_id
466+
]
467+
}
429468

430469
required_pull_request_reviews {
431470
dismiss_stale_reviews = true
@@ -458,9 +497,12 @@ resource "github_branch_protection" "openstack_branch_protection_master" {
458497
allows_deletions = false
459498
allows_force_pushes = false
460499

461-
push_restrictions = [
462-
resource.github_team.organisation_teams["Developers"].node_id
463-
]
500+
restrict_pushes {
501+
blocks_creations = false
502+
push_allowances = [
503+
resource.github_team.organisation_teams["Developers"].node_id
504+
]
505+
}
464506

465507
required_pull_request_reviews {
466508
dismiss_stale_reviews = true
@@ -499,9 +541,12 @@ resource "github_branch_protection" "platform_branch_protection" {
499541
required_approving_review_count = 1
500542
}
501543

502-
push_restrictions = [
503-
resource.github_team.organisation_teams["Developers"].node_id
504-
]
544+
restrict_pushes {
545+
blocks_creations = false
546+
push_allowances = [
547+
resource.github_team.organisation_teams["Developers"].node_id
548+
]
549+
}
505550

506551
required_status_checks {
507552
contexts = lookup(var.required_status_checks, each.key, { "default" : [] }).default
@@ -528,9 +573,12 @@ resource "github_branch_protection" "releasetrain_branch_protection" {
528573
required_approving_review_count = 1
529574
}
530575

531-
push_restrictions = [
532-
resource.github_team.organisation_teams["Developers"].node_id
533-
]
576+
restrict_pushes {
577+
blocks_creations = false
578+
push_allowances = [
579+
resource.github_team.organisation_teams["Developers"].node_id
580+
]
581+
}
534582

535583
required_status_checks {
536584
contexts = lookup(var.required_status_checks, each.key, { "default" : [] }).default
@@ -557,9 +605,12 @@ resource "github_branch_protection" "smslab_branch_protection" {
557605
required_approving_review_count = 1
558606
}
559607

560-
push_restrictions = [
561-
resource.github_team.organisation_teams["Developers"].node_id
562-
]
608+
restrict_pushes {
609+
blocks_creations = false
610+
push_allowances = [
611+
resource.github_team.organisation_teams["Developers"].node_id
612+
]
613+
}
563614

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

terraform/github/provider.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
github = {
44
source = "integrations/github"
5-
version = "4.28.0"
5+
version = "6.11.1"
66
}
77
}
88
cloud {
@@ -27,4 +27,4 @@ provider "github" {
2727
# provider "github" {
2828
# owner = var.owner
2929
# token = var.GITHUB_TOKEN
30-
# }
30+
# }

terraform/github/repositories.tf

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ resource "github_repository" "repositories" {
88
allow_auto_merge = true
99
lifecycle {
1010
ignore_changes = [
11+
allow_update_branch,
1112
description,
1213
homepage_url,
13-
private,
1414
visibility,
15+
has_discussions,
1516
has_issues,
1617
has_projects,
1718
has_wiki,
@@ -20,14 +21,12 @@ resource "github_repository" "repositories" {
2021
auto_init,
2122
gitignore_template,
2223
license_template,
23-
default_branch,
2424
archived,
2525
archive_on_destroy,
2626
pages,
2727
topics,
2828
template,
2929
vulnerability_alerts,
30-
ignore_vulnerability_alerts_during_read
3130
]
3231
prevent_destroy = true
3332
}

terraform/github/terraform.tfvars.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@
7777
"requirements",
7878
"stackhpc-inspector-plugins"
7979
],
80-
"Platform": [
81-
],
80+
"Platform": [],
8281
"ReleaseTrain": [
8382
".github",
8483
"ARC-Installer",
@@ -304,6 +303,12 @@
304303
"lint / Ansible 2.20 sanity"
305304
]
306305
},
306+
"ansible-slurm-appliance": {
307+
"default": [
308+
"Test deployment and reimage on OpenStack / openstack-ci (RL8)",
309+
"Test deployment and reimage on OpenStack / openstack-ci (RL9)"
310+
]
311+
},
307312
"designate-dashboard": {
308313
"default": []
309314
},

0 commit comments

Comments
 (0)