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

Job container + container services #23

Merged
merged 25 commits into from
Jun 19, 2019

Conversation

dakale
Copy link
Contributor

@dakale dakale commented Jun 7, 2019

  • Removes node intermediate handler script

    • docker is exec'd with the environment, which maps the environment into the command run by docker exec
  • Script is run directly via docker exec rather than execing a node script that then runs the script

Need to iterate on mapping in path

@TingluoHuang
Copy link
Member

did you talk with Chris about removing the logic to handle file permission different?

_pathMappings[hostContext.GetDirectory(WellKnownDirectory.Tools)] = "/__t"; // Tool cache folder may come from ENV, so we need a unique folder to avoid collision
_pathMappings[hostContext.GetDirectory(WellKnownDirectory.Work)] = "/__w";
_pathMappings[hostContext.GetDirectory(WellKnownDirectory.Root)] = "/__a";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we still need the __a? we had it because we have variables like Agent.HomeDirectory, so i have to make it shows reasonable when you get inside container, i don't think we need it anymore

@@ -246,7 +246,9 @@ private async Task StartContainerAsync(IExecutionContext executionContext, Conta
container.AddPortMappings(await _dockerManger.DockerPort(executionContext, container.ContainerId));
foreach (var port in container.PortMappings)
{
executionContext.SetRunnerContext($"service.{container.ContainerNetworkAlias}.ports.{port.ContainerPort}", port.HostPort);
var contextVarName = $"service_{container.ContainerNetworkAlias}_ports_{port.ContainerPort}";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TingluoHuang Is this still the right pattern? Ive tested it and it still works, the ports show up in the host process env as e.g. AGENT_SERVICE_REDIS_PORTS_6379=32771 I am just wondering if this is the best way to expose information to the runner at runtime.

Should we also change the prefix to RUNNER instead of AGENT?

David Kale added 2 commits June 18, 2019 13:12
David Kale added 4 commits June 18, 2019 15:32
in container workdir is relative path from workdir which is concat from host work dir and source dir
@TingluoHuang TingluoHuang merged commit 9b8601a into master Jun 19, 2019
@TingluoHuang TingluoHuang deleted the users/dakale/job-container-services branch June 19, 2019 19:34
jsoref pushed a commit to jsoref/actions-runner that referenced this pull request Oct 7, 2022
* Fix parallel 1, no runner available actions#23

* Make runner early available

* Check if parallel 1 works
mattrwi pushed a commit to mattrwi/runner that referenced this pull request Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants