-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
ci: enable validating all Dockerfiles #5248
Conversation
Signed-off-by: Tonis Tiigi <[email protected]>
FROM --platform=linux/amd64 psampaz/go-mod-outdated:${MODOUTDATED_VERSION} AS go-mod-outdated-amd64 | ||
|
||
FROM go-mod-outdated-amd64 AS go-mod-outdated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't catch this was not a multiplatform image, we should be able to build the tool in this Dockerfile instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
name = "validate-dockerfile-${md5(dockerfile)}" | ||
dockerfile = dockerfile | ||
call = "check" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not related but I found that build record should not be exported for this kind of target:
It tries to export the build record because buildx.build.ref
is set in the metadata file: https://github.com/moby/buildkit/actions/runs/10366089572/job/28694600862#step:5:268
{
"validate-dockerfile-5a93df9b3286bc4794aa2096155c26b8": {
"buildx.build.ref": "builder-acfc342a-63d0-4501-8680-844fa82ca061/builder-acfc342a-63d0-4501-8680-844fa82ca0610/5jqkz6fanf8rsqd1mqgjq5off",
"result.json": "{\n \"warnings\": null,\n \"sources\": [\n {\n \"filename\": \"shfmt.Dockerfile\",\n \"data\": \"IyBzeW50YXg9ZG9ja2VyL2RvY2tlcmZpbGUtdXBzdHJlYW06bWFzdGVyCgpGUk9NIG12ZGFuL3NoZm10OnYzLjEuMi1hbHBpbmUgQVMgc2hmbXQKV09SS0RJUiAvc3JjCkFSRyBTSEZNVF9GTEFHUz0iLWkgMiAtY2kiCgpGUk9NIHNoZm10IEFTIGdlbmVyYXRlCldPUktESVIgL291dC9oYWNrClJVTiAtLW1vdW50PXRhcmdldD0vc3JjIFwKICBjcCAtYSAvc3JjL2hhY2svLiAuLyAmJiBcCiAgc2hmbXQgLWwgLXcgJFNIRk1UX0ZMQUdTIC4KCkZST00gc2NyYXRjaCBBUyB1cGRhdGUKQ09QWSAtLWZyb209Z2VuZXJhdGUgL291dCAvCgpGUk9NIHNoZm10IEFTIHZhbGlkYXRlClJVTiAtLW1vdW50PXRhcmdldD0uIFwKICBzaGZtdCAkU0hGTVRfRkxBR1MgLWQgLi9oYWNrCg==\",\n \"definition\": {\n \"def\": [\n \"GsQBChJsb2NhbDovL2RvY2tlcmZpbGUSFAoMbG9jYWwuZGlmZmVyEgRub25lEkkKEWxvY2FsLmZvbGxvd3BhdGhzEjRbInNoZm10LkRvY2tlcmZpbGUiLCJzaGZtdC5Eb2NrZXJmaWxlLmRvY2tlcmlnbm9yZSJdEioKDWxvY2FsLnNlc3Npb24SGXZpc2dpbzVucG4wN3EzZXpwZDF0MWJ3NHQSIQoTbG9jYWwuc2hhcmVka2V5aGludBIKZG9ja2VyZmlsZVoA\",\n \"CkkKR3NoYTI1NjpmOTgyMTAzMjk5MzVkZDQwMWE0NGVhMDQ5MDU3MjRlYWNhMjcyMmM1NWU5N2ViNTFhNGE5NWNkMjBmZjEwYWM2\"\n ],\n \"metadata\": {\n \"sha256:3f97713c82a92b5d9c8289e6d3aaf8cd7c37b6bca4600043f313430130e1e3b7\": {\n \"caps\": {\n \"constraints\": true,\n \"meta.description\": true,\n \"platform\": true\n }\n },\n \"sha256:f98210329935dd401a44ea04905724eaca2722c55e97eb51a4a95cd20ff10ac6\": {\n \"description\": {\n \"llb.customname\": \"[internal] load build definition from shfmt.Dockerfile\"\n },\n \"caps\": {\n \"source.local\": true,\n \"source.local.followpaths\": true,\n \"source.local.sessionid\": true,\n \"source.local.sharedkeyhint\": true\n }\n }\n },\n \"Source\": {\n \"locations\": {\n \"sha256:f98210329935dd401a44ea04905724eaca2722c55e97eb51a4a95cd20ff10ac6\": {}\n }\n }\n },\n \"language\": \"Dockerfile\"\n }\n ]\n}",
"result.statuscode": "0",
"result.txt": "",
"version": "1.0.0"
}
}
I think we should omit setting it for subrequests. Will open a PR on Buildx to fix that.
No description provided.