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

skip setting buildkitd flags and config for remote driver #161

Merged
merged 1 commit into from Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions src/main.ts
Expand Up @@ -63,7 +63,7 @@ async function run(): Promise<void> {
await context.asyncForEach(inputs.driverOpts, async driverOpt => {
createArgs.push('--driver-opt', driverOpt);
});
if (inputs.buildkitdFlags) {
if (inputs.driver != 'remote' && inputs.buildkitdFlags) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We need the same logic below for config as well I think - see driver/remote/factory.go.

Copy link
Member Author

Choose a reason for hiding this comment

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

Have not done it for config because it doesn't have a default value like buildkitdFlags but maybe we should just skip for it too I'm not sure.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok actually will be confusing if we do for one but not the other. Should be good now.

createArgs.push('--buildkitd-flags', inputs.buildkitdFlags);
}
}
Expand All @@ -73,10 +73,12 @@ async function run(): Promise<void> {
if (inputs.endpoint) {
createArgs.push(inputs.endpoint);
}
if (inputs.config) {
createArgs.push('--config', await buildx.getConfigFile(inputs.config));
} else if (inputs.configInline) {
createArgs.push('--config', await buildx.getConfigInline(inputs.configInline));
if (inputs.driver != 'remote') {
if (inputs.config) {
createArgs.push('--config', await buildx.getConfigFile(inputs.config));
} else if (inputs.configInline) {
createArgs.push('--config', await buildx.getConfigInline(inputs.configInline));
}
}
const createCmd = buildx.getCommand(createArgs, standalone);
await exec.exec(createCmd.commandLine, createCmd.args);
Expand Down