Skip to content

Conversation

@dvdksn
Copy link
Contributor

@dvdksn dvdksn commented Feb 21, 2024

Signed-off-by: David Karlsson 35727626+dvdksn@users.noreply.github.com

Description

Moving the CLI reference files caused the upstream validation workflow
to break.

This changes the logic in how placeholder files are created in the
validation workflow, to match the new filesystem structure for markdown
stubs.

Related issues

docker/buildx#2269

Verified with docker/buildx#2273

@github-actions github-actions bot added the area/release Relates to CI or deployment label Feb 21, 2024
@netlify
Copy link

netlify bot commented Feb 21, 2024

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit 9451374
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/65d705119786700008c90c36
😎 Deploy Preview https://deploy-preview-19467--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor Author

@dvdksn dvdksn left a comment

Choose a reason for hiding this comment

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

cc @crazy-max didn't we have a dummy repo somewhere where we could dry-run this? Or should we do it on a buildx fork/branch?

const yamlSrcNoExt = yamlSrcPath.replace(".yaml", "");
const hasSubCommands = (await (await glob.create(yamlSrcNoExt)).glob()).length > 1;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This checks if there are more than one data files with the same base name, indicating that the current data file has subcommands.

Comment on lines +62 to +63
if (hasSubCommands) {
placeholderPath = placeholderPath.replace('.md', '/_index.md');
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If this has subcommands, the stub filename should be content/reference/cli/docker/cmd/_index.md.

@dvdksn dvdksn requested a review from crazy-max February 21, 2024 21:50
@crazy-max
Copy link
Member

cc @crazy-max didn't we have a dummy repo somewhere where we could dry-run this? Or should we do it on a buildx fork/branch?

Feel free to do it from a fork and open PR on buildx repo for testing

Moving the CLI reference files caused the upstream validation workflow
to break.

This changes the logic in how placeholder files are created in the
validation workflow, to match the new filesystem structure for markdown
stubs.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
@dvdksn dvdksn force-pushed the ci-fix-upstream-validate-workflow branch from d7f0f0e to 9451374 Compare February 22, 2024 08:25
@dvdksn dvdksn marked this pull request as ready for review February 22, 2024 08:38
@crazy-max crazy-max merged commit 6b73b05 into docker:main Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/release Relates to CI or deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants