Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow http_proxy and https_proxy to be set #17

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 2 additions & 0 deletions roles/github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ The following variables can be used to make small adjustments to the composition

`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`.

`github_kayobe_http_proxy`: specify a HTTP proxy to be used during the kayobe container image build. The same setting is applied for HTTPS.

`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_AUTOMATION_PR_TITLE` from its default, you can do by simply adding `KAYOBE_AUTOMATION_PR_TITLE` to this dictionary and it will take precedence over the default.

`github_*_hook:` see section [Template Hooks](#template-hooks) for information about this variables
Expand Down
2 changes: 2 additions & 0 deletions roles/github/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ github_image_tag: !unsafe "${{ needs.prepare-runner.outputs.openstack_release }}

github_kayobe_base_image: "quay.io/centos/centos:stream8"

github_kayobe_http_proxy: ""

github_kayobe_arguments: {}

github_checkout_hook: ""
Expand Down
12 changes: 8 additions & 4 deletions roles/github/templates/build-kayobe-docker-image.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,14 @@ jobs:
file: ./docker-image-build/.automation/docker/kayobe/Dockerfile
context: docker-image-build
build-args: |
KAYOBE_DOCKER_SSH_CONFIG_PATH=.automation/docker/kayobe/ssh_config
KAYOBE_USER_UID=${{ env.KAYOBE_USER_UID }}
KAYOBE_USER_GID=${{ env.KAYOBE_USER_UID }}
BASE_IMAGE=%% github_kayobe_base_image %%
KAYOBE_DOCKER_SSH_CONFIG_PATH=.automation/docker/kayobe/ssh_config
KAYOBE_USER_UID=${{ env.KAYOBE_USER_UID }}
KAYOBE_USER_GID=${{ env.KAYOBE_USER_UID }}
BASE_IMAGE=%% github_kayobe_base_image %%
<% if github_kayobe_http_proxy | length >= 1 %>
http_proxy=%% github_kayobe_http_proxy %%
https_proxy=%% github_kayobe_http_proxy %%
<% endif %>
push: true
tags: |
%% github_registry.url | default(github_default_registry.url) %%/%% github_image_name %%:%% github_image_tag %%
Expand Down