Skip to content

ci: fix validate upstream workflow - #19467

Merged
crazy-max merged 1 commit into
docker:mainfrom
dvdksn:ci-fix-upstream-validate-workflow
Feb 22, 2024
Merged

ci: fix validate upstream workflow#19467
crazy-max merged 1 commit into
docker:mainfrom
dvdksn:ci-fix-upstream-validate-workflow

Conversation

@dvdksn

@dvdksndvdksn commented Feb 21, 2024

Copy link
Copy Markdown
Contributor

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-actionsgithub-actionsBot added the area/release Relates to CI or deployment label Feb 21, 2024
@netlify

netlifyBot commented Feb 21, 2024

Copy link
Copy Markdown

Deploy Preview for docsdocker ready!

NameLink
🔨 Latest commit9451374
🔍 Latest deploy loghttps://app.netlify.com/sites/docsdocker/deploys/65d705119786700008c90c36
😎 Deploy Previewhttps://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.

@dvdksndvdksn left a comment

Copy link
Copy Markdown
ContributorAuthor

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?

Comment thread.github/workflows/validate-upstream.yml Outdated
const yamlSrcNoExt = yamlSrcPath.replace(".yaml", "");
const hasSubCommands = (await (await glob.create(yamlSrcNoExt)).glob()).length > 1;

Copy link
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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.

@crazy-max

Copy link
Copy Markdown
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
dvdksnforce-pushed the ci-fix-upstream-validate-workflow branch from d7f0f0e to 9451374CompareFebruary 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:mainFeb 22, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/releaseRelates to CI or deployment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@dvdksn@crazy-max