Skip to content

Commit

Permalink
buildman: Add proxy variables to builds if they exist (PROJQUAY-2120) (
Browse files Browse the repository at this point in the history
…#834)

* buildman: Add proxy variables to builds if they exist (PROJQUAY-2120)

Adds the ability to define proxy variables for builders. The proxy variables are parsed as env. variables and defined in Quay's config.yaml file.

* buildman: Add proxy variables to builds if they exist (PROJQUAY-2120)

Adds the ability to define proxy variables for builders. The proxy variables are parsed as env. variables and defined in Quay's config.yaml file.
  • Loading branch information
ibazulic committed Jul 13, 2021
1 parent ce3cb35 commit f5b9492
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions buildman/manager/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ def generate_cloud_config(
container_runtime=self.executor_config.get("CONTAINER_RUNTIME", "docker"),
ca_cert=self.executor_config.get("CA_CERT", self._ca_cert()),
debug=self.executor_config.get("DEBUG", False),
http_proxy=self.executor_config.get("HTTP_PROXY", None),
https_proxy=self.executor_config.get("HTTPS_PROXY", None),
noproxy=self.executor_config.get("NO_PROXY", None),
)
)
)
Expand Down
7 changes: 7 additions & 0 deletions buildman/templates/cloudconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

TOKEN={{ token }}
SERVER={{ manager_hostname }}
{% if http_proxy %}
HTTP_PROXY={{ http_proxy }}
{% elif https_proxy %}
HTTPS_PROXY={{ https_proxy }}
{% elif no_proxy %}
NO_PROXY={{ no_proxy }}
{% endif %}
# TODO: Remove this eventually
GODEBUG=x509ignoreCN=0

Expand Down

0 comments on commit f5b9492

Please sign in to comment.