Skip to content

Commit 6ec2096

Browse files
pulpbotmdellweg
authored andcommitted
Update CI files
[noissue]
1 parent 7d39a99 commit 6ec2096

File tree

7 files changed

+131
-29
lines changed

7 files changed

+131
-29
lines changed

.ci/ansible/settings.py.j2

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ TOKEN_SIGNATURE_ALGORITHM = "ES256"
88
CACHE_ENABLED = True
99
REDIS_HOST = "localhost"
1010
REDIS_PORT = 6379
11+
TELEMETRY = False
1112

1213
{% if api_root is defined %}
1314
API_ROOT = {{ api_root | repr }}
@@ -19,6 +20,12 @@ API_ROOT = {{ api_root | repr }}
1920
{% endfor %}
2021
{% endif %}
2122

23+
{% if pulp_scenario_settings is defined and pulp_scenario_settings %}
24+
{% for key, value in pulp_scenario_settings.items() %}
25+
{{ key | upper }} = {{ value | repr }}
26+
{% endfor %}
27+
{% endif %}
28+
2229
{% if stream_test | default(false) -%}
2330
REDIRECT_TO_OBJECT_STORAGE = False
2431
DEFAULT_FILE_STORAGE = "pulpcore.app.models.storage.PulpSFTPStorage"

.ci/scripts/update_ci_branches.py

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,25 @@
1+
# WARNING: DO NOT EDIT!
2+
#
3+
# This file was generated by plugin_template, and is managed by it. Please use
4+
# './plugin-template --github pulpcore' to update this file.
5+
#
6+
# For more info visit https://github.com/pulp/plugin_template
7+
18
import os
2-
import re
39
import sys
410
import requests
5-
from packaging.version import Version
6-
from git import Repo
7-
8-
try:
9-
initial_branch = sys.argv[1]
10-
except IndexError:
11-
initial_branch = None
1211

13-
repo = Repo(os.getcwd())
14-
heads = repo.git.ls_remote("--heads", "https://github.com/pulp/pulpcore.git").split("\n")
15-
branches = [h.split("/")[-1] for h in heads if re.search(r"^([0-9]+)\.([0-9]+)$", h.split("/")[-1])]
16-
branches.sort(key=lambda ver: Version(ver))
12+
branches = sys.argv[1:]
1713

1814
headers = {
1915
"Authorization": f"Bearer {os.environ['GITHUB_TOKEN']}",
2016
"Accept": "application/vnd.github.v3+json",
2117
}
2218

23-
if not initial_branch or initial_branch not in branches:
24-
exit("Initial branch not found")
25-
else:
26-
starting = branches.index(initial_branch)
27-
2819
github_api = "https://api.github.com"
2920
workflow_path = "/actions/workflows/update_ci.yml/dispatches"
3021
url = f"{github_api}/repos/pulp/pulpcore{workflow_path}"
3122

32-
for branch in branches[starting:]:
23+
for branch in branches:
3324
print(f"Updating {branch}")
3425
requests.post(url, headers=headers, json={"ref": branch})

.github/template_gitref

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2021.08.26-167-ga2a8251
1+
2021.08.26-172-gc8a2852

.github/workflows/kanban.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# WARNING: DO NOT EDIT!
2+
#
3+
# This file was generated by plugin_template, and is managed by it. Please use
4+
# './plugin-template --github pulpcore' to update this file.
5+
#
6+
# For more info visit https://github.com/pulp/plugin_template
7+
# Manage issues in a project board using https://github.com/leonsteinhaeuser/project-beta-automations
8+
9+
---
10+
name: Kanban
11+
on:
12+
pull_request_target:
13+
issues:
14+
types:
15+
- labeled
16+
- reopened
17+
- assigned
18+
- closed
19+
20+
env:
21+
free_to_take: Free to take
22+
in_progress: In Progress
23+
needs_review: Needs review
24+
done: Done
25+
26+
jobs:
27+
# only prio-list labeled items should be added to the board
28+
add-to-project-board:
29+
if: github.event_name == 'issues' && contains(github.event.issue.labels.*.name, 'prio-list') && contains(fromJson('["labeled", "reopened"]'), github.event.action)
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Add issue to Free-to-take list
33+
uses: leonsteinhaeuser/project-beta-automations@v2.0.0
34+
with:
35+
gh_token: ${{ secrets.RELEASE_TOKEN }}
36+
organization: pulp
37+
project_id: 8
38+
resource_node_id: ${{ github.event.issue.node_id }}
39+
operation_mode: status
40+
status_value: ${{ env.free_to_take }} # Target status
41+
42+
move-to-inprogress:
43+
if: github.event_name == 'issues' && github.event.action == 'assigned'
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Move an issue to the In Progress column
47+
uses: leonsteinhaeuser/project-beta-automations@v2.0.0
48+
with:
49+
gh_token: ${{ secrets.RELEASE_TOKEN }}
50+
organization: pulp
51+
project_id: 8
52+
resource_node_id: ${{ github.event.issue.node_id }}
53+
operation_mode: status
54+
status_value: ${{ env.in_progress }} # Target status
55+
56+
find-linked-issues:
57+
if: github.event_name == 'pull_request_target'
58+
runs-on: ubuntu-latest
59+
name: Find issues linked to a PR
60+
outputs:
61+
linked-issues: ${{ steps.linked-issues.outputs.issues }}
62+
steps:
63+
- name: Checkout
64+
uses: actions/checkout@v2
65+
- name: Get Linked Issues Action
66+
uses: kin/gh-action-get-linked-issues@v1.0
67+
id: linked-issues
68+
with:
69+
access-token: ${{ secrets.RELEASE_TOKEN }}
70+
71+
move-to-needs-review:
72+
if: github.event_name == 'pull_request_target' && contains(fromJson(needs.find-linked-issues.outputs.linked-issues).*.issue.state, 'open')
73+
runs-on: ubuntu-latest
74+
name: Move linked issues to Needs Review
75+
needs: find-linked-issues
76+
strategy:
77+
max-parallel: 3
78+
matrix:
79+
issues: ${{ fromJSON(needs.find-linked-issues.outputs.linked-issues) }}
80+
steps:
81+
- name: Move to Needs Review
82+
uses: leonsteinhaeuser/project-beta-automations@v2.0.0
83+
with:
84+
gh_token: ${{ secrets.RELEASE_TOKEN }}
85+
organization: pulp
86+
project_id: 8
87+
resource_node_id: ${{ matrix.issues.issue.node_id }}
88+
operation_mode: status
89+
status_value: ${{ env.needs_review }} # Target status
90+
91+
move-to-done:
92+
if: github.event_name == 'issues' && github.event.action == 'closed'
93+
runs-on: ubuntu-latest
94+
steps:
95+
- name: Move an issue to the Done column
96+
uses: leonsteinhaeuser/project-beta-automations@v2.0.0
97+
with:
98+
gh_token: ${{ secrets.RELEASE_TOKEN }}
99+
organization: pulp
100+
project_id: 8
101+
resource_node_id: ${{ github.event.issue.node_id }}
102+
operation_mode: status
103+
status_value: ${{ env.done }} # Target status

.github/workflows/scripts/install.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ if [ "$TEST" = "s3" ]; then
9494
command: "server /data"' vars/main.yaml
9595
sed -i -e '$a s3_test: true\
9696
minio_access_key: "'$MINIO_ACCESS_KEY'"\
97-
minio_secret_key: "'$MINIO_SECRET_KEY'"' vars/main.yaml
97+
minio_secret_key: "'$MINIO_SECRET_KEY'"\
98+
pulp_scenario_settings: null\
99+
' vars/main.yaml
98100
export PULP_API_ROOT="/rerouted/djnd/"
99101
fi
100102

@@ -111,7 +113,9 @@ if [ "$TEST" = "azure" ]; then
111113
volumes:\
112114
- ./azurite:/etc/pulp\
113115
command: "azurite-blob --blobHost 0.0.0.0 --cert /etc/pulp/azcert.pem --key /etc/pulp/azkey.pem"' vars/main.yaml
114-
sed -i -e '$a azure_test: true' vars/main.yaml
116+
sed -i -e '$a azure_test: true\
117+
pulp_scenario_settings: null\
118+
' vars/main.yaml
115119
fi
116120

117121
echo "PULP_API_ROOT=${PULP_API_ROOT}" >> "$GITHUB_ENV"

.github/workflows/update_ci.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,6 @@ jobs:
5454
id: vars
5555
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/}
5656

57-
- name: Dispatching
58-
if: github.event_name == 'schedule' || github.event.inputs.all_branches == 'yes'
59-
run: python .ci/scripts/update_ci_branches.py 3.14
60-
env:
61-
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
62-
6357
- name: Run update
6458
run: |
6559
.github/workflows/scripts/update_ci.sh

template_config.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This config represents the latest values used when running the plugin-template. Any settings that
22
# were not present before running plugin-template have been added with their default values.
33

4-
# generated with plugin_template@2021.08.26-167-ga2a8251
4+
# generated with plugin_template@2021.08.26-172-gc8a2852
55

66
additional_repos:
77
- branch: '1.10'
@@ -19,6 +19,7 @@ check_stray_pulpcore_imports: false
1919
cherry_pick_automation: false
2020
ci_env: {}
2121
ci_trigger: '{pull_request: {branches: [''*'']}}'
22+
ci_update_branches: []
2223
core_import_allowed: []
2324
coverage: true
2425
deploy_client_to_pypi: true
@@ -35,7 +36,6 @@ flake8_ignore: []
3536
github_org: pulp
3637
issue_tracker: github
3738
keep_ci_update_for_latest_branches: 5
38-
keep_ci_update_since_branch: '3.14'
3939
lint_requirements: true
4040
noissue_marker: '[noissue]'
4141
parallel_test_workers: 8
@@ -59,6 +59,9 @@ pulp_settings:
5959
allowed_import_paths:
6060
- /tmp
6161
orphan_protection_time: 0
62+
pulp_settings_azure: null
63+
pulp_settings_s3: null
64+
pulp_settings_stream: null
6265
pulpcore_branch: null
6366
pulpcore_pip_version_specifier: null
6467
pulpcore_revision: null

0 commit comments

Comments
 (0)