Skip to content

Commit b4a8545

Browse files
authored
Merge pull request #4 from stackhpc/github_role_refactor
Fixes and improvements to `github` role
2 parents 752664a + f20ebd4 commit b4a8545

File tree

12 files changed

+251
-233
lines changed

12 files changed

+251
-233
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
name: Test stackhpc.kayobe_workflows collection
3+
'on':
4+
pull_request:
5+
6+
jobs:
7+
test:
8+
name: Test github role
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Check out the codebase.
12+
uses: actions/checkout@v3
13+
14+
- name: Set up Python 3.
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: '3.x'
18+
19+
- name: Install Ansible
20+
run: pip3 install ansible
21+
22+
- name: Test the playbook.
23+
run: ansible-playbook tests/test.yml
24+
env:
25+
ANSIBLE_FORCE_COLOR: '1'
26+
27+
- name: Upload workflows produced
28+
uses: actions/upload-artifact@v3
29+
with:
30+
name: github_kayobe_workflows
31+
path: tests/.github/workflows

roles/github/README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,37 @@ The following variables can be used to make small adjustments to the composition
3838

3939
`github_runs_on`: control which runner can accept this workflow. See GitHub for more information on [runs-on](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on).
4040

41-
`github_image_url`: full URL of the kayobe container image complete with registry and tag.
41+
`github_image_name`: name of the kayobe image defaults to `kayobe`.
42+
43+
`github_image_tag`: tag used to select kayobe image defaults to `latest`
4244

4345
`github_registry_username`: username used to authenticate with the docker registry.
4446

4547
`github_registry_password`: password used to authenticate with the docker registry.
4648

49+
`github_kayobe_base_image`: select the base image used when building the kayobe docker image. Default is `quay.io/centos/centos:stream8` supports OpenStack Wallaby, Xena and Yoga. Zed and higher would require `quay.io/rockylinux/rockylinux:9`.
50+
4751
`github_kayobe_arguments`: a dictionary of arguments that can be used to override the default arguments found within `vars/main.yml`. For example if you wanted to change the value of `KAYOBE_ENVIRONMENT` from its default of `production` you can simply add `KAYOBE_ENVIRONMENT` to this dictionary and it will take precedence over the defaults.
4852

4953
`github_*_hook:` see section [Template Hooks](#template-hooks) for information about this variables
5054

55+
`github_buildx_enable`: In some deployments the build kayobe docker image workflow has had difficulties successfully pushing the image to container registries such as Pulp if buildx has been used. It situations where failure to push images is been experienced a user might wish to disable buildx. Buildx is enabled by default.
56+
57+
`github_buildx_inline_config`: provide configuration parameters to buildx. Useful for connecting to insecure docker registry.
58+
59+
```yaml
60+
github_buildx_inline_config: |
61+
[registry."10.20.30.40:80"]
62+
http = true
63+
insecure = true
64+
```
65+
66+
`github_buildx_enable_provenance`: whether or not to enable build attestations/provenence. This has been [noted](https://github.com/docker/build-push-action/releases/tag/v4.1.1) to cause issues with docker registries such as Pulp. Default to false.
67+
68+
`github_timeout`: control how a long a job may run before being cancelled. Timeout is defined in minutes and defaults to 360 minutes (6 hours)
69+
70+
`github_tempest_test_suites`: provide a list of load lists to be made available within the drop-down list for running tempest. Defaults to `default` and `tempest-full`.
71+
5172
If you wish to make more impactful changes such as which workflows are built and what they contain then see the list of dictionaries called `workflows` in `defaults/main.yml`
5273

5374
`github_workflows:` is a list of dictionaries that contains each of the workflows described above. A given list element is made up of the following:
@@ -80,8 +101,6 @@ github_build_kayobe_image:
80101
path_override: "{{ playbook_dir }}/templates/build-kayobe-docker-image.yml.j2"
81102
```
82103

83-
84-
85104
Template Hooks
86105
--------------
87106

0 commit comments

Comments
 (0)