Container Options not propagated to job containers #265
Labels
No Label
kind
bug
kind
build
kind/compatible
kind
dependencies
kind
docs
kind
enhancement
kind
feature
kind
help wanted
kind
proposal
kind
refactor
related
act
related
environment
related
exec
related
gitea
related
workflow
reviewed
confirmed
reviewed
duplicate
reviewed
invalid
reviewed
needs feedback
reviewed
wontfix
reviewed
workaround
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/act_runner#265
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm trying to use
--add-host=<my-gitea-url>:host-gateway
in the container.options of the config.yaml.However, this option does not seem to be passing through to the job containers.
as far as I can tell, this is because the container options are not being propagated through by https://gitea.com/gitea/act/src/branch/main/pkg/runner/run_context.go#L367
and my container options always end up being "" instead of what is set in the config.yaml
Other than container.options I am otherwise using the default config.yaml as generated by act_runner generate-config
Hi @xtodpep , thanks for your report. Did you use the
jobs.<job_id>.container
option to specify the job container? If yes, you could try to add the option string tojobs.<job_id>.container.options
and it should work.I have the same issue and this "fixed" it but...
On my side I need to apply some special settings (ie: mount volumes) to each custom container image used for build.
I'd like to keep those settings within runner configuration and outside sources (
.gitea/workflow
) because:Is this the way the
config.yaml: container.options
field is supposed to work?If yes, there should be a way to change set Docker options for all child containers...
Looking at the code I've found that
container.options
in runnerconfig.yaml
file are applied only to default container; if a job has custom container configured, then it receives only its customoptions
(defined into.gitea/workflow
file) and these additional options are discarded.The function returning new container options is this (in
gitea/act
):the temporary fix I've applied is this:
Before creating a PR, I'd like to know if this is how that configuration option is supposed to work.
Option comment reads like this:
What does the sentence other options to be used when the container is started mean?
1- "all jobs containers", including custom ones?
2- "only the default one"?
If 1), then the function above should be patched accordingly (like I did, but I'm not such a Go expert...).
If 2), then I'd like to have an additional option (maybe in
runner
section) to allow injecting options in all job containers, like I can do with environment vars.Close by gitea/act#80