Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
163d33a2bd | ||
|
|
d283be916f | ||
|
|
ffc7d98a98 | ||
|
|
d36bef4156 | ||
|
|
300c014384 | ||
|
|
b641895e8b | ||
|
|
4db21c4b43 | ||
|
|
8d807b6902 | ||
|
|
99e6b01d39 | ||
|
|
23208073ee | ||
|
|
2264b5ac72 | ||
|
|
d5247558ad | ||
|
|
e5ef18078d | ||
|
|
517914fc72 | ||
|
|
4c7e849bb4 | ||
|
|
ce0d3d5cf1 | ||
|
|
90311d5c08 | ||
|
|
d908ffcd2c | ||
|
|
3bd6acf499 | ||
|
|
5b4c1ac025 | ||
|
|
e49e07d23e | ||
|
|
b4c8e1a503 | ||
|
|
1510b1d394 | ||
|
|
214e644835 | ||
|
|
d7a84a5d46 | ||
|
|
61967435c1 | ||
|
|
78ca5b7f21 | ||
|
|
cc344864cb | ||
|
|
c70efab546 | ||
|
|
55a2181286 | ||
|
|
b26af9f868 | ||
|
|
ff35e30b01 | ||
|
|
200e43c426 |
74
.github/buildx-lab-releases.json
vendored
74
.github/buildx-lab-releases.json
vendored
@@ -1,43 +1,43 @@
|
|||||||
{
|
{
|
||||||
"latest": {
|
"latest": {
|
||||||
"id": 157588052,
|
"id": 161492089,
|
||||||
"tag_name": "v0.14.1-desktop.1",
|
"tag_name": "v0.15.1-desktop.1",
|
||||||
"html_url": "https://github.com/docker/buildx-desktop/releases/tag/v0.14.1-desktop.1",
|
"html_url": "https://github.com/docker/buildx-desktop/releases/tag/v0.15.1-desktop.1",
|
||||||
"assets": [
|
"assets": [
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.darwin-amd64",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.darwin-amd64",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.darwin-amd64.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.darwin-amd64.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.darwin-amd64.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.darwin-amd64.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.darwin-arm64",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.darwin-arm64",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.darwin-arm64.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.darwin-arm64.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.darwin-arm64.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.darwin-arm64.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-amd64",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-amd64",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-amd64.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-amd64.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-amd64.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-amd64.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm-v6",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm-v6",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm-v6.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm-v6.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm-v6.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm-v6.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm-v7",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm-v7",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm-v7.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm-v7.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm-v7.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm-v7.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm64",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm64",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm64.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm64.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm64.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm64.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-ppc64le",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-ppc64le",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-ppc64le.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-ppc64le.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-ppc64le.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-ppc64le.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-riscv64",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-riscv64",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-riscv64.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-riscv64.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-riscv64.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-riscv64.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-s390x",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-s390x",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-s390x.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-s390x.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-s390x.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-s390x.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.windows-amd64.exe",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.windows-amd64.exe",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.windows-amd64.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.windows-amd64.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.windows-amd64.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.windows-amd64.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.windows-arm64.exe",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.windows-arm64.exe",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.windows-arm64.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.windows-arm64.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.windows-arm64.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.windows-arm64.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/checksums.txt"
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/checksums.txt"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"v0.15.1-desktop.1": {
|
"v0.15.1-desktop.1": {
|
||||||
|
|||||||
197
.github/buildx-releases.json
vendored
197
.github/buildx-releases.json
vendored
@@ -1,43 +1,166 @@
|
|||||||
{
|
{
|
||||||
"latest": {
|
"latest": {
|
||||||
"id": 161126938,
|
"id": 165067169,
|
||||||
"tag_name": "v0.15.1",
|
"tag_name": "v0.16.0",
|
||||||
"html_url": "https://github.com/docker/buildx/releases/tag/v0.15.1",
|
"html_url": "https://github.com/docker/buildx/releases/tag/v0.16.0",
|
||||||
"assets": [
|
"assets": [
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-amd64",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.darwin-amd64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-amd64.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.darwin-amd64.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-amd64.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.darwin-amd64.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-arm64",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.darwin-arm64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-arm64.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.darwin-arm64.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-arm64.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.darwin-arm64.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-amd64",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-amd64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-amd64.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-amd64.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-amd64.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-amd64.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v6",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm-v6",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v6.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm-v6.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v6.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm-v6.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v7",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm-v7",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v7.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm-v7.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v7.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm-v7.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm64",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm64.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm64.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm64.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm64.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-ppc64le",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-ppc64le",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-ppc64le.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-ppc64le.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-ppc64le.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-ppc64le.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-riscv64",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-riscv64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-riscv64.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-riscv64.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-riscv64.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-riscv64.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-s390x",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-s390x",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-s390x.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-s390x.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-s390x.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-s390x.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-amd64.exe",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.windows-amd64.exe",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-amd64.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.windows-amd64.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-amd64.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.windows-amd64.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-arm64.exe",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.windows-arm64.exe",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-arm64.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.windows-arm64.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-arm64.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.windows-arm64.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.1/checksums.txt"
|
"https://github.com/docker/buildx/releases/download/v0.16.0/checksums.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v0.16.0": {
|
||||||
|
"id": 165067169,
|
||||||
|
"tag_name": "v0.16.0",
|
||||||
|
"html_url": "https://github.com/docker/buildx/releases/tag/v0.16.0",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.darwin-amd64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.darwin-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.darwin-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.darwin-arm64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.darwin-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.darwin-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-amd64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm-v6",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm-v6.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm-v6.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm-v7",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm-v7.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm-v7.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-ppc64le",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-ppc64le.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-ppc64le.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-riscv64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-riscv64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-riscv64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-s390x",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-s390x.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.linux-s390x.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.windows-amd64.exe",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.windows-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.windows-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.windows-arm64.exe",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.windows-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/buildx-v0.16.0.windows-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0/checksums.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v0.16.0-rc2": {
|
||||||
|
"id": 164893757,
|
||||||
|
"tag_name": "v0.16.0-rc2",
|
||||||
|
"html_url": "https://github.com/docker/buildx/releases/tag/v0.16.0-rc2",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.darwin-amd64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.darwin-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.darwin-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.darwin-arm64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.darwin-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.darwin-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-amd64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-arm-v6",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-arm-v6.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-arm-v6.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-arm-v7",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-arm-v7.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-arm-v7.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-arm64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-ppc64le",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-ppc64le.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-ppc64le.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-riscv64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-riscv64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-riscv64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-s390x",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-s390x.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.linux-s390x.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.windows-amd64.exe",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.windows-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.windows-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.windows-arm64.exe",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.windows-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/buildx-v0.16.0-rc2.windows-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc2/checksums.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v0.16.0-rc1": {
|
||||||
|
"id": 163887606,
|
||||||
|
"tag_name": "v0.16.0-rc1",
|
||||||
|
"html_url": "https://github.com/docker/buildx/releases/tag/v0.16.0-rc1",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.darwin-amd64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.darwin-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.darwin-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.darwin-arm64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.darwin-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.darwin-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-amd64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-arm-v6",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-arm-v6.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-arm-v6.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-arm-v7",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-arm-v7.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-arm-v7.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-arm64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-ppc64le",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-ppc64le.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-ppc64le.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-riscv64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-riscv64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-riscv64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-s390x",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-s390x.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.linux-s390x.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.windows-amd64.exe",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.windows-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.windows-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.windows-arm64.exe",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.windows-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/buildx-v0.16.0-rc1.windows-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.16.0-rc1/checksums.txt"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"v0.15.1": {
|
"v0.15.1": {
|
||||||
|
|||||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -15,8 +15,8 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
NODE_VERSION: "20"
|
NODE_VERSION: "20"
|
||||||
BUILDX_VERSION: "https://github.com/docker/buildx.git#d8c9ebde1fdcf659f1fa3efa6ccc27a28b0f1564" # https://github.com/docker/buildx/pull/2551
|
BUILDX_VERSION: "v0.16.0"
|
||||||
BUILDKIT_IMAGE: "moby/buildkit:v0.14.1"
|
BUILDKIT_IMAGE: "moby/buildkit:v0.15.0"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import {Buildx} from '../../src/buildx/buildx';
|
|||||||
import {Context} from '../../src/context';
|
import {Context} from '../../src/context';
|
||||||
import {Exec} from '../../src/exec';
|
import {Exec} from '../../src/exec';
|
||||||
|
|
||||||
import {Cert} from '../../src/types/buildx/buildx';
|
import {Cert, LocalState} from '../../src/types/buildx/buildx';
|
||||||
|
|
||||||
const fixturesDir = path.join(__dirname, '..', 'fixtures');
|
const fixturesDir = path.join(__dirname, '..', 'fixtures');
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
@@ -250,19 +250,77 @@ describe('resolveCertsDriverOpts', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('localState', () => {
|
||||||
|
// prettier-ignore
|
||||||
|
test.each([
|
||||||
|
[
|
||||||
|
'default/default/ij71n3ubmhck85d03zdvye5nr',
|
||||||
|
{
|
||||||
|
LocalPath: '/home/crazymax/github/docker_org/buildx',
|
||||||
|
DockerfilePath: '/home/crazymax/github/docker_org/buildx/Dockerfile'
|
||||||
|
} as LocalState,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'default/default/7pnnqpgacnqq98oa1a1h5sz6t',
|
||||||
|
{
|
||||||
|
LocalPath: 'https://github.com/docker/actions-toolkit.git#:__tests__/fixtures',
|
||||||
|
DockerfilePath: 'hello.Dockerfile'
|
||||||
|
} as LocalState,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'default/default/84p2qpgacnqq98oa1a1h5sz6t',
|
||||||
|
{
|
||||||
|
LocalPath: 'https://github.com/docker/actions-toolkit.git#:__tests__/fixtures',
|
||||||
|
DockerfilePath: '-'
|
||||||
|
} as LocalState,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'default/default/a5s9rlg9cnqq98oa1a1h5sz6t',
|
||||||
|
{
|
||||||
|
LocalPath: '-',
|
||||||
|
DockerfilePath: ''
|
||||||
|
} as LocalState,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'default/default/aav2ix4nw5eky66fw045dkylr',
|
||||||
|
{
|
||||||
|
LocalPath: 'https://github.com/docker/buildx.git',
|
||||||
|
DockerfilePath: ''
|
||||||
|
} as LocalState,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'default/default/dfsz8r57a98zf789pmlyzqp3n',
|
||||||
|
{
|
||||||
|
LocalPath: 'https://github.com/docker/actions-toolkit.git#:__tests__/fixtures',
|
||||||
|
DockerfilePath: 'hello.Dockerfile'
|
||||||
|
} as LocalState,
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'default/default/w38vcd5fo5cfvfyig77qjec0v',
|
||||||
|
{
|
||||||
|
LocalPath: '/home/crazy/hello',
|
||||||
|
DockerfilePath: '-'
|
||||||
|
} as LocalState,
|
||||||
|
]
|
||||||
|
])('given %p', async (ref: string, expected: LocalState) => {
|
||||||
|
const localState = Buildx.localState(ref, path.join(fixturesDir, 'buildx-refs'));
|
||||||
|
expect(localState).toEqual(expected);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('refs', () => {
|
describe('refs', () => {
|
||||||
it('returns all refs', async () => {
|
it('returns all refs', async () => {
|
||||||
const refs = Buildx.refs({
|
const refs = Buildx.refs({
|
||||||
dir: path.join(fixturesDir, 'buildx-refs')
|
dir: path.join(fixturesDir, 'buildx-refs')
|
||||||
});
|
});
|
||||||
expect(Object.keys(refs).length).toEqual(11);
|
expect(Object.keys(refs).length).toEqual(17);
|
||||||
});
|
});
|
||||||
it('returns default builder refs', async () => {
|
it('returns default builder refs', async () => {
|
||||||
const refs = Buildx.refs({
|
const refs = Buildx.refs({
|
||||||
dir: path.join(fixturesDir, 'buildx-refs'),
|
dir: path.join(fixturesDir, 'buildx-refs'),
|
||||||
builderName: 'default'
|
builderName: 'default'
|
||||||
});
|
});
|
||||||
expect(Object.keys(refs).length).toEqual(8);
|
expect(Object.keys(refs).length).toEqual(14);
|
||||||
});
|
});
|
||||||
it('returns foo builder refs', async () => {
|
it('returns foo builder refs', async () => {
|
||||||
const refs = Buildx.refs({
|
const refs = Buildx.refs({
|
||||||
@@ -281,6 +339,6 @@ describe('refs', () => {
|
|||||||
builderName: 'default',
|
builderName: 'default',
|
||||||
since: new Date('2024-01-10T00:00:00Z')
|
since: new Date('2024-01-10T00:00:00Z')
|
||||||
});
|
});
|
||||||
expect(Object.keys(refs).length).toEqual(5);
|
expect(Object.keys(refs).length).toEqual(11);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {describe, expect, test} from '@jest/globals';
|
import {afterEach, beforeEach, describe, expect, it, jest, test} from '@jest/globals';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
@@ -147,3 +147,52 @@ maybe('exportBuild', () => {
|
|||||||
expect(exportRes?.summaries).toBeDefined();
|
expect(exportRes?.summaries).toBeDefined();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
maybe('exportBuild custom image', () => {
|
||||||
|
const originalEnv = process.env;
|
||||||
|
beforeEach(() => {
|
||||||
|
jest.resetModules();
|
||||||
|
process.env = {
|
||||||
|
...originalEnv,
|
||||||
|
DOCKER_BUILD_EXPORT_BUILD_IMAGE: 'docker.io/dockereng/export-build:0.2.2'
|
||||||
|
};
|
||||||
|
});
|
||||||
|
afterEach(() => {
|
||||||
|
process.env = originalEnv;
|
||||||
|
});
|
||||||
|
|
||||||
|
it('with custom image', async () => {
|
||||||
|
const buildx = new Buildx();
|
||||||
|
const build = new Build({buildx: buildx});
|
||||||
|
|
||||||
|
fs.mkdirSync(tmpDir, {recursive: true});
|
||||||
|
await expect(
|
||||||
|
(async () => {
|
||||||
|
// prettier-ignore
|
||||||
|
const buildCmd = await buildx.getCommand([
|
||||||
|
'--builder', process.env.CTN_BUILDER_NAME ?? 'default',
|
||||||
|
'build', '-f', path.join(fixturesDir, 'hello.Dockerfile'),
|
||||||
|
'--metadata-file', build.getMetadataFilePath(),
|
||||||
|
fixturesDir
|
||||||
|
]);
|
||||||
|
await Exec.exec(buildCmd.command, buildCmd.args);
|
||||||
|
})()
|
||||||
|
).resolves.not.toThrow();
|
||||||
|
|
||||||
|
const metadata = build.resolveMetadata();
|
||||||
|
expect(metadata).toBeDefined();
|
||||||
|
const buildRef = build.resolveRef(metadata);
|
||||||
|
expect(buildRef).toBeDefined();
|
||||||
|
|
||||||
|
const history = new History({buildx: buildx});
|
||||||
|
const exportRes = await history.export({
|
||||||
|
refs: [buildRef ?? '']
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(exportRes).toBeDefined();
|
||||||
|
expect(exportRes?.dockerbuildFilename).toBeDefined();
|
||||||
|
expect(exportRes?.dockerbuildSize).toBeDefined();
|
||||||
|
expect(fs.existsSync(exportRes?.dockerbuildFilename)).toBe(true);
|
||||||
|
expect(exportRes?.summaries).toBeDefined();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {describe, expect, test} from '@jest/globals';
|
import {describe, expect, it, test} from '@jest/globals';
|
||||||
|
|
||||||
import {Docker} from '../../src/docker/docker';
|
import {Docker} from '../../src/docker/docker';
|
||||||
|
|
||||||
@@ -54,3 +54,14 @@ maybe('pull', () => {
|
|||||||
}
|
}
|
||||||
}, 600000);
|
}, 600000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
maybe('contextInspect', () => {
|
||||||
|
it('inspect default context', async () => {
|
||||||
|
const contextInfo = await Docker.contextInspect();
|
||||||
|
expect(contextInfo).toBeDefined();
|
||||||
|
console.log('contextInfo', contextInfo);
|
||||||
|
expect(contextInfo?.Name).toBeDefined();
|
||||||
|
expect(contextInfo?.Endpoints).toBeDefined();
|
||||||
|
expect(Object.keys(contextInfo?.Endpoints).length).toBeGreaterThan(0);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import osm = require('os');
|
|||||||
import * as rimraf from 'rimraf';
|
import * as rimraf from 'rimraf';
|
||||||
|
|
||||||
import {Docker} from '../../src/docker/docker';
|
import {Docker} from '../../src/docker/docker';
|
||||||
import {Exec} from '../../src/exec';
|
|
||||||
|
|
||||||
import {ConfigFile} from '../../src/types/docker/docker';
|
import {ConfigFile} from '../../src/types/docker/docker';
|
||||||
|
|
||||||
@@ -105,35 +104,132 @@ describe('isAvailable', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('context', () => {
|
describe('exec', () => {
|
||||||
it('call docker context show', async () => {
|
it('returns docker version', async () => {
|
||||||
const execSpy = jest.spyOn(Exec, 'getExecOutput');
|
const execSpy = jest.spyOn(Docker, 'exec');
|
||||||
await Docker.context().catch(() => {
|
await Docker.exec(['version'], {
|
||||||
// noop
|
|
||||||
});
|
|
||||||
expect(execSpy).toHaveBeenCalledWith(`docker`, ['context', 'inspect', '--format', '{{.Name}}'], {
|
|
||||||
ignoreReturnCode: true,
|
ignoreReturnCode: true,
|
||||||
silent: true
|
silent: true
|
||||||
});
|
});
|
||||||
|
expect(execSpy).toHaveBeenCalledTimes(1);
|
||||||
|
const callfunc = execSpy.mock.calls[0];
|
||||||
|
expect(Object.keys(callfunc[1]?.env || {}).length).toBeGreaterThan(0);
|
||||||
|
const env = callfunc[1]?.env;
|
||||||
|
expect(env).toHaveProperty('DOCKER_CONTENT_TRUST');
|
||||||
|
expect(env?.DOCKER_CONTENT_TRUST).toBe('false');
|
||||||
|
if (callfunc[1]?.env) {
|
||||||
|
// already checked env
|
||||||
|
callfunc[1].env = undefined;
|
||||||
|
}
|
||||||
|
expect(callfunc).toEqual([
|
||||||
|
['version'],
|
||||||
|
{
|
||||||
|
ignoreReturnCode: true,
|
||||||
|
silent: true
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('getExecOutput', () => {
|
||||||
|
it('returns docker version', async () => {
|
||||||
|
const execSpy = jest.spyOn(Docker, 'getExecOutput');
|
||||||
|
await Docker.getExecOutput(['version'], {
|
||||||
|
ignoreReturnCode: true,
|
||||||
|
silent: true
|
||||||
|
});
|
||||||
|
expect(execSpy).toHaveBeenCalledTimes(1);
|
||||||
|
const callfunc = execSpy.mock.calls[0];
|
||||||
|
expect(Object.keys(callfunc[1]?.env || {}).length).toBeGreaterThan(0);
|
||||||
|
const env = callfunc[1]?.env;
|
||||||
|
expect(env).toHaveProperty('DOCKER_CONTENT_TRUST');
|
||||||
|
expect(env?.DOCKER_CONTENT_TRUST).toBe('false');
|
||||||
|
if (callfunc[1]?.env) {
|
||||||
|
// already checked env
|
||||||
|
callfunc[1].env = undefined;
|
||||||
|
}
|
||||||
|
expect(callfunc).toEqual([
|
||||||
|
['version'],
|
||||||
|
{
|
||||||
|
ignoreReturnCode: true,
|
||||||
|
silent: true
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('context', () => {
|
||||||
|
it('call docker context show', async () => {
|
||||||
|
const execSpy = jest.spyOn(Docker, 'getExecOutput');
|
||||||
|
await Docker.context().catch(() => {
|
||||||
|
// noop
|
||||||
|
});
|
||||||
|
expect(execSpy).toHaveBeenCalledTimes(1);
|
||||||
|
const callfunc = execSpy.mock.calls[0];
|
||||||
|
if (callfunc && callfunc[1]) {
|
||||||
|
// we don't want to check env opt
|
||||||
|
callfunc[1].env = undefined;
|
||||||
|
}
|
||||||
|
expect(callfunc).toEqual([
|
||||||
|
['context', 'inspect', '--format', '{{.Name}}'],
|
||||||
|
{
|
||||||
|
ignoreReturnCode: true,
|
||||||
|
silent: true
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('contextInspect', () => {
|
||||||
|
it('call docker context inspect', async () => {
|
||||||
|
const execSpy = jest.spyOn(Docker, 'getExecOutput');
|
||||||
|
await Docker.contextInspect('foo').catch(() => {
|
||||||
|
// noop
|
||||||
|
});
|
||||||
|
expect(execSpy).toHaveBeenCalledTimes(1);
|
||||||
|
const callfunc = execSpy.mock.calls[0];
|
||||||
|
if (callfunc && callfunc[1]) {
|
||||||
|
// we don't want to check env opt
|
||||||
|
callfunc[1].env = undefined;
|
||||||
|
}
|
||||||
|
expect(callfunc).toEqual([
|
||||||
|
['context', 'inspect', '--format=json', 'foo'],
|
||||||
|
{
|
||||||
|
ignoreReturnCode: true,
|
||||||
|
silent: true
|
||||||
|
}
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('printVersion', () => {
|
describe('printVersion', () => {
|
||||||
it('call docker version', async () => {
|
it('call docker version', async () => {
|
||||||
const execSpy = jest.spyOn(Exec, 'exec');
|
const execSpy = jest.spyOn(Docker, 'exec');
|
||||||
await Docker.printVersion().catch(() => {
|
await Docker.printVersion().catch(() => {
|
||||||
// noop
|
// noop
|
||||||
});
|
});
|
||||||
expect(execSpy).toHaveBeenCalledWith(`docker`, ['version']);
|
expect(execSpy).toHaveBeenCalledTimes(1);
|
||||||
|
const callfunc = execSpy.mock.calls[0];
|
||||||
|
if (callfunc && callfunc[1]) {
|
||||||
|
// we don't want to check env opt
|
||||||
|
callfunc[1].env = undefined;
|
||||||
|
}
|
||||||
|
expect(callfunc).toEqual([['version']]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('printInfo', () => {
|
describe('printInfo', () => {
|
||||||
it('call docker info', async () => {
|
it('call docker info', async () => {
|
||||||
const execSpy = jest.spyOn(Exec, 'exec');
|
const execSpy = jest.spyOn(Docker, 'exec');
|
||||||
await Docker.printInfo().catch(() => {
|
await Docker.printInfo().catch(() => {
|
||||||
// noop
|
// noop
|
||||||
});
|
});
|
||||||
expect(execSpy).toHaveBeenCalledWith(`docker`, ['info']);
|
expect(execSpy).toHaveBeenCalledTimes(1);
|
||||||
|
const callfunc = execSpy.mock.calls[0];
|
||||||
|
if (callfunc && callfunc[1]) {
|
||||||
|
// we don't want to check env opt
|
||||||
|
callfunc[1].env = undefined;
|
||||||
|
}
|
||||||
|
expect(callfunc).toEqual([['info']]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
{"LocalPath":"/home/crazy/foo/bar/https:/github.com/docker/actions-toolkit.git#:__tests__/fixtures","DockerfilePath":"/home/crazy/foo/bar/hello.Dockerfile"}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"LocalPath":"/home/crazy/foo/bar/https:/github.com/docker/actions-toolkit.git#:__tests__/fixtures","DockerfilePath":"/home/crazy/foo/bar/-"}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"LocalPath":"/home/crazy/foo/bar/-","DockerfilePath":""}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"LocalPath":"/home/crazy/foo/bar/https:/github.com/docker/buildx.git","DockerfilePath":""}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"LocalPath":"https://github.com/docker/actions-toolkit.git#:__tests__/fixtures","DockerfilePath":"hello.Dockerfile"}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"LocalPath":"/home/crazy/hello","DockerfilePath":"/home/crazy/hello/-"}
|
||||||
@@ -248,6 +248,52 @@ maybe('writeBuildSummary', () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('without build record', async () => {
|
||||||
|
const startedTime = new Date();
|
||||||
|
const buildx = new Buildx();
|
||||||
|
const build = new Build({buildx: buildx});
|
||||||
|
|
||||||
|
fs.mkdirSync(tmpDir, {recursive: true});
|
||||||
|
await expect(
|
||||||
|
(async () => {
|
||||||
|
// prettier-ignore
|
||||||
|
const buildCmd = await buildx.getCommand([
|
||||||
|
'--builder', process.env.CTN_BUILDER_NAME ?? 'default',
|
||||||
|
'build',
|
||||||
|
'-f', path.join(fixturesDir, 'hello.Dockerfile'),
|
||||||
|
fixturesDir,
|
||||||
|
'--metadata-file', build.getMetadataFilePath()
|
||||||
|
]);
|
||||||
|
await Exec.exec(buildCmd.command, buildCmd.args);
|
||||||
|
})()
|
||||||
|
).resolves.not.toThrow();
|
||||||
|
|
||||||
|
const refs = Buildx.refs({
|
||||||
|
dir: Buildx.refsDir,
|
||||||
|
builderName: process.env.CTN_BUILDER_NAME ?? 'default',
|
||||||
|
since: startedTime
|
||||||
|
});
|
||||||
|
expect(refs).toBeDefined();
|
||||||
|
expect(Object.keys(refs).length).toBeGreaterThan(0);
|
||||||
|
|
||||||
|
const history = new History({buildx: buildx});
|
||||||
|
const exportRes = await history.export({
|
||||||
|
refs: [Object.keys(refs)[0] ?? '']
|
||||||
|
});
|
||||||
|
expect(exportRes).toBeDefined();
|
||||||
|
expect(exportRes?.dockerbuildFilename).toBeDefined();
|
||||||
|
expect(exportRes?.dockerbuildSize).toBeDefined();
|
||||||
|
expect(exportRes?.summaries).toBeDefined();
|
||||||
|
|
||||||
|
await GitHub.writeBuildSummary({
|
||||||
|
exportRes: exportRes,
|
||||||
|
inputs: {
|
||||||
|
context: fixturesDir,
|
||||||
|
file: path.join(fixturesDir, 'hello.Dockerfile')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
maybe('annotateBuildWarnings', () => {
|
maybe('annotateBuildWarnings', () => {
|
||||||
|
|||||||
@@ -85,28 +85,6 @@ describe('apiURL', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('isGHES', () => {
|
|
||||||
afterEach(() => {
|
|
||||||
process.env.GITHUB_SERVER_URL = '';
|
|
||||||
});
|
|
||||||
it('should return false when the request domain is github.com', () => {
|
|
||||||
process.env.GITHUB_SERVER_URL = 'https://github.com';
|
|
||||||
expect(GitHub.isGHES).toBe(false);
|
|
||||||
});
|
|
||||||
it('should return false when the request domain ends with ghe.com', () => {
|
|
||||||
process.env.GITHUB_SERVER_URL = 'https://my.domain.ghe.com';
|
|
||||||
expect(GitHub.isGHES).toBe(false);
|
|
||||||
});
|
|
||||||
it('should return false when the request domain ends with ghe.localhost', () => {
|
|
||||||
process.env.GITHUB_SERVER_URL = 'https://my.domain.ghe.localhost';
|
|
||||||
expect(GitHub.isGHES).toBe(false);
|
|
||||||
});
|
|
||||||
it('should return true when the request domain is specific to an enterprise', () => {
|
|
||||||
process.env.GITHUB_SERVER_URL = 'https://my-enterprise.github.com';
|
|
||||||
expect(GitHub.isGHES).toBe(true);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('repository', () => {
|
describe('repository', () => {
|
||||||
it('returns GitHub repository', async () => {
|
it('returns GitHub repository', async () => {
|
||||||
expect(GitHub.repository).toEqual('docker/actions-toolkit');
|
expect(GitHub.repository).toEqual('docker/actions-toolkit');
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
ARG NODE_VERSION=20
|
ARG NODE_VERSION=20
|
||||||
ARG DOCKER_VERSION=26.0.2
|
ARG DOCKER_VERSION=26.0.2
|
||||||
ARG BUILDX_VERSION=0.15.1
|
ARG BUILDX_VERSION=0.16.0
|
||||||
|
|
||||||
FROM node:${NODE_VERSION}-alpine AS base
|
FROM node:${NODE_VERSION}-alpine AS base
|
||||||
RUN apk add --no-cache cpio findutils git
|
RUN apk add --no-cache cpio findutils git
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
"registry": "https://registry.npmjs.org/"
|
"registry": "https://registry.npmjs.org/"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/artifact": "^2.1.7",
|
"@actions/artifact": "^2.1.8",
|
||||||
"@actions/cache": "^3.2.4",
|
"@actions/cache": "^3.2.4",
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^1.10.1",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
"he": "^1.2.0",
|
"he": "^1.2.0",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"jwt-decode": "^4.0.0",
|
"jwt-decode": "^4.0.0",
|
||||||
"semver": "^7.6.2",
|
"semver": "^7.6.3",
|
||||||
"tar-stream": "^3.1.7",
|
"tar-stream": "^3.1.7",
|
||||||
"tmp": "^0.2.3"
|
"tmp": "^0.2.3"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ import * as semver from 'semver';
|
|||||||
|
|
||||||
import {Buildx} from '../buildx/buildx';
|
import {Buildx} from '../buildx/buildx';
|
||||||
import {Builder} from '../buildx/builder';
|
import {Builder} from '../buildx/builder';
|
||||||
|
import {Docker} from '../docker/docker';
|
||||||
import {Config} from './config';
|
import {Config} from './config';
|
||||||
import {Exec} from '../exec';
|
|
||||||
|
|
||||||
import {BuilderInfo, NodeInfo} from '../types/buildx/builder';
|
import {BuilderInfo, NodeInfo} from '../types/buildx/builder';
|
||||||
|
|
||||||
@@ -51,13 +51,13 @@ export class BuildKit {
|
|||||||
|
|
||||||
private async getVersionWithinImage(nodeName: string): Promise<string> {
|
private async getVersionWithinImage(nodeName: string): Promise<string> {
|
||||||
core.debug(`BuildKit.getVersionWithinImage nodeName: ${nodeName}`);
|
core.debug(`BuildKit.getVersionWithinImage nodeName: ${nodeName}`);
|
||||||
return Exec.getExecOutput(`docker`, ['inspect', '--format', '{{.Config.Image}}', `${Buildx.containerNamePrefix}${nodeName}`], {
|
return Docker.getExecOutput(['inspect', '--format', '{{.Config.Image}}', `${Buildx.containerNamePrefix}${nodeName}`], {
|
||||||
ignoreReturnCode: true,
|
ignoreReturnCode: true,
|
||||||
silent: true
|
silent: true
|
||||||
}).then(bkitimage => {
|
}).then(bkitimage => {
|
||||||
if (bkitimage.exitCode == 0 && bkitimage.stdout.length > 0) {
|
if (bkitimage.exitCode == 0 && bkitimage.stdout.length > 0) {
|
||||||
core.debug(`BuildKit.getVersionWithinImage image: ${bkitimage.stdout.trim()}`);
|
core.debug(`BuildKit.getVersionWithinImage image: ${bkitimage.stdout.trim()}`);
|
||||||
return Exec.getExecOutput(`docker`, ['run', '--rm', bkitimage.stdout.trim(), '--version'], {
|
return Docker.getExecOutput(['run', '--rm', bkitimage.stdout.trim(), '--version'], {
|
||||||
ignoreReturnCode: true,
|
ignoreReturnCode: true,
|
||||||
silent: true
|
silent: true
|
||||||
}).then(bkitversion => {
|
}).then(bkitversion => {
|
||||||
|
|||||||
@@ -177,6 +177,54 @@ export class Buildx {
|
|||||||
return driverOpts;
|
return driverOpts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static localState(ref: string, dir?: string): LocalState {
|
||||||
|
const [builderName, nodeName, id] = ref.split('/');
|
||||||
|
if (!builderName || !nodeName || !id) {
|
||||||
|
throw new Error(`Invalid build reference: ${ref}`);
|
||||||
|
}
|
||||||
|
const lsPath = path.join(dir || Buildx.refsDir, builderName, nodeName, id);
|
||||||
|
if (!fs.existsSync(lsPath)) {
|
||||||
|
throw new Error(`Local state not found in ${lsPath}`);
|
||||||
|
}
|
||||||
|
return Buildx.fixLocalState(<LocalState>JSON.parse(fs.readFileSync(lsPath, 'utf8')));
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/docker/buildx/pull/2560
|
||||||
|
private static fixLocalState(ls: LocalState): LocalState {
|
||||||
|
const fnTrimToValidContext = function (inp: string): [string, string, boolean] {
|
||||||
|
const match = inp.match(/(.*)(https?:\/{1,2}\S+|ssh:\/{1,2}\S+|git:\/{1,2}\S+)/i);
|
||||||
|
if (match && match.length == 3) {
|
||||||
|
const trimed = match[1];
|
||||||
|
let url = match[2];
|
||||||
|
if (url.startsWith('https:/') && !url.startsWith('https://')) {
|
||||||
|
url = url.replace('https:/', 'https://');
|
||||||
|
}
|
||||||
|
if (url.startsWith('http:/') && !url.startsWith('http://')) {
|
||||||
|
url = url.replace('http:/', 'http://');
|
||||||
|
}
|
||||||
|
if (url.startsWith('ssh:/') && !url.startsWith('ssh://')) {
|
||||||
|
url = url.replace('ssh:/', 'ssh://');
|
||||||
|
}
|
||||||
|
if (url.startsWith('git:/') && !url.startsWith('git://')) {
|
||||||
|
url = url.replace('git:/', 'git://');
|
||||||
|
}
|
||||||
|
return [url, trimed, true];
|
||||||
|
}
|
||||||
|
return [inp, '', false];
|
||||||
|
};
|
||||||
|
|
||||||
|
const [contextPath, trimedPath, isURL] = fnTrimToValidContext(ls.LocalPath);
|
||||||
|
if (isURL) {
|
||||||
|
ls.LocalPath = contextPath;
|
||||||
|
if (ls.DockerfilePath.indexOf(trimedPath) === 0) {
|
||||||
|
ls.DockerfilePath = ls.DockerfilePath.substring(trimedPath.length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ls.LocalPath = ls.LocalPath.endsWith('/-') ? '-' : ls.LocalPath;
|
||||||
|
ls.DockerfilePath = ls.DockerfilePath.endsWith('/-') ? '-' : ls.DockerfilePath;
|
||||||
|
return ls;
|
||||||
|
}
|
||||||
|
|
||||||
public static refs(opts: LocalRefsOpts, refs: LocalRefsResponse = {}): LocalRefsResponse {
|
public static refs(opts: LocalRefsOpts, refs: LocalRefsResponse = {}): LocalRefsResponse {
|
||||||
const {dir, builderName, nodeName, since} = opts;
|
const {dir, builderName, nodeName, since} = opts;
|
||||||
|
|
||||||
@@ -210,7 +258,7 @@ export class Buildx {
|
|||||||
if (since && stat.mtime < since) {
|
if (since && stat.mtime < since) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const localState = <LocalState>JSON.parse(fs.readFileSync(filePath, 'utf8'));
|
const localState = Buildx.fixLocalState(<LocalState>JSON.parse(fs.readFileSync(filePath, 'utf8')));
|
||||||
const ref = `${builderName}/${nodeName}/${file}`;
|
const ref = `${builderName}/${nodeName}/${file}`;
|
||||||
refs[ref] = localState;
|
refs[ref] = localState;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
import {ChildProcessByStdio, spawn} from 'child_process';
|
import {ChildProcessByStdio, spawn} from 'child_process';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import {Readable, Writable} from 'node:stream';
|
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
import {Readable, Writable} from 'stream';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
|
|
||||||
import {Buildx} from './buildx';
|
import {Buildx} from './buildx';
|
||||||
@@ -36,7 +36,8 @@ export interface HistoryOpts {
|
|||||||
export class History {
|
export class History {
|
||||||
private readonly buildx: Buildx;
|
private readonly buildx: Buildx;
|
||||||
|
|
||||||
private static readonly EXPORT_TOOL_IMAGE: string = 'docker.io/dockereng/export-build:latest';
|
private static readonly EXPORT_BUILD_IMAGE_DEFAULT: string = 'docker.io/dockereng/export-build:latest';
|
||||||
|
private static readonly EXPORT_BUILD_IMAGE_ENV: string = 'DOCKER_BUILD_EXPORT_BUILD_IMAGE';
|
||||||
|
|
||||||
constructor(opts?: HistoryOpts) {
|
constructor(opts?: HistoryOpts) {
|
||||||
this.buildx = opts?.buildx || new Buildx();
|
this.buildx = opts?.buildx || new Buildx();
|
||||||
@@ -92,14 +93,29 @@ export class History {
|
|||||||
});
|
});
|
||||||
await Exec.exec('mkfifo', [buildxOutFifoPath]);
|
await Exec.exec('mkfifo', [buildxOutFifoPath]);
|
||||||
|
|
||||||
const buildxCmd = await this.buildx.getCommand(['--builder', builderName, 'dial-stdio']);
|
const buildxDialStdioCmd = await this.buildx.getCommand(['--builder', builderName, 'dial-stdio']);
|
||||||
const buildxDialStdioProc = History.spawn(buildxCmd.command, buildxCmd.args);
|
core.info(`[command]${buildxDialStdioCmd.command} ${buildxDialStdioCmd.args.join(' ')}`);
|
||||||
|
const buildxDialStdioProc = spawn(buildxDialStdioCmd.command, buildxDialStdioCmd.args, {
|
||||||
|
stdio: ['pipe', 'pipe', 'inherit'],
|
||||||
|
detached: true
|
||||||
|
});
|
||||||
|
let buildxDialStdioKilled = false;
|
||||||
fs.createReadStream(buildxInFifoPath).pipe(buildxDialStdioProc.stdin);
|
fs.createReadStream(buildxInFifoPath).pipe(buildxDialStdioProc.stdin);
|
||||||
buildxDialStdioProc.stdout.pipe(fs.createWriteStream(buildxOutFifoPath));
|
buildxDialStdioProc.stdout.pipe(fs.createWriteStream(buildxOutFifoPath));
|
||||||
|
buildxDialStdioProc.on('exit', (code, signal) => {
|
||||||
|
buildxDialStdioKilled = true;
|
||||||
|
if (signal) {
|
||||||
|
core.info(`Process "buildx dial-stdio" was killed with signal ${signal}`);
|
||||||
|
} else {
|
||||||
|
core.info(`Process "buildx dial-stdio" exited with code ${code}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const tmpDockerbuildFilename = path.join(outDir, 'rec.dockerbuild');
|
const tmpDockerbuildFilename = path.join(outDir, 'rec.dockerbuild');
|
||||||
const summaryFilename = path.join(outDir, 'summary.json');
|
const summaryFilename = path.join(outDir, 'summary.json');
|
||||||
|
|
||||||
|
let dockerRunProc: ChildProcessByStdio<Writable, Readable, null> | undefined;
|
||||||
|
let dockerRunProcKilled = false;
|
||||||
await new Promise<void>((resolve, reject) => {
|
await new Promise<void>((resolve, reject) => {
|
||||||
const ebargs: Array<string> = ['--ref-state-dir=/buildx-refs', `--node=${builderName}/${nodeName}`];
|
const ebargs: Array<string> = ['--ref-state-dir=/buildx-refs', `--node=${builderName}/${nodeName}`];
|
||||||
for (const ref of refs) {
|
for (const ref of refs) {
|
||||||
@@ -112,13 +128,21 @@ export class History {
|
|||||||
ebargs.push(`--gid=${process.getgid()}`);
|
ebargs.push(`--gid=${process.getgid()}`);
|
||||||
}
|
}
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
const dockerRunProc = History.spawn('docker', [
|
const dockerRunArgs = [
|
||||||
'run', '--rm', '-i',
|
'run', '--rm', '-i',
|
||||||
'-v', `${Buildx.refsDir}:/buildx-refs`,
|
'-v', `${Buildx.refsDir}:/buildx-refs`,
|
||||||
'-v', `${outDir}:/out`,
|
'-v', `${outDir}:/out`,
|
||||||
opts.image || History.EXPORT_TOOL_IMAGE,
|
opts.image || process.env[History.EXPORT_BUILD_IMAGE_ENV] || History.EXPORT_BUILD_IMAGE_DEFAULT,
|
||||||
...ebargs
|
...ebargs
|
||||||
]);
|
]
|
||||||
|
core.info(`[command]docker ${dockerRunArgs.join(' ')}`);
|
||||||
|
dockerRunProc = spawn('docker', dockerRunArgs, {
|
||||||
|
stdio: ['pipe', 'pipe', 'inherit'],
|
||||||
|
env: {
|
||||||
|
...process.env,
|
||||||
|
DOCKER_CONTENT_TRUST: 'false'
|
||||||
|
}
|
||||||
|
});
|
||||||
fs.createReadStream(buildxOutFifoPath).pipe(dockerRunProc.stdin);
|
fs.createReadStream(buildxOutFifoPath).pipe(dockerRunProc.stdin);
|
||||||
dockerRunProc.stdout.pipe(fs.createWriteStream(buildxInFifoPath));
|
dockerRunProc.stdout.pipe(fs.createWriteStream(buildxInFifoPath));
|
||||||
dockerRunProc.on('close', code => {
|
dockerRunProc.on('close', code => {
|
||||||
@@ -129,15 +153,34 @@ export class History {
|
|||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
reject(new Error(`Process "docker run" exited with code ${code}`));
|
reject(new Error(`Process "docker run" closed with code ${code}`));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
dockerRunProc.on('error', err => {
|
dockerRunProc.on('error', err => {
|
||||||
core.error(`Error executing buildx dial-stdio: ${err}`);
|
core.error(`Error executing "docker run": ${err}`);
|
||||||
reject(err);
|
reject(err);
|
||||||
});
|
});
|
||||||
}).catch(err => {
|
dockerRunProc.on('exit', (code, signal) => {
|
||||||
|
dockerRunProcKilled = true;
|
||||||
|
if (signal) {
|
||||||
|
core.info(`Process "docker run" was killed with signal ${signal}`);
|
||||||
|
} else {
|
||||||
|
core.info(`Process "docker run" exited with code ${code}`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
throw err;
|
throw err;
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
if (buildxDialStdioProc && !buildxDialStdioKilled) {
|
||||||
|
core.debug('Force terminating "buildx dial-stdio" process');
|
||||||
|
buildxDialStdioProc.kill('SIGKILL');
|
||||||
|
}
|
||||||
|
if (dockerRunProc && !dockerRunProcKilled) {
|
||||||
|
core.debug('Force terminating "docker run" process');
|
||||||
|
dockerRunProc.kill('SIGKILL');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let dockerbuildFilename = `${GitHub.context.repo.owner}~${GitHub.context.repo.repo}~${refs[0].substring(0, 6).toUpperCase()}`;
|
let dockerbuildFilename = `${GitHub.context.repo.owner}~${GitHub.context.repo.repo}~${refs[0].substring(0, 6).toUpperCase()}`;
|
||||||
@@ -162,11 +205,4 @@ export class History {
|
|||||||
refs: refs
|
refs: refs
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
private static spawn(command: string, args?: ReadonlyArray<string>): ChildProcessByStdio<Writable, Readable, null> {
|
|
||||||
core.info(`[command]${command}${args ? ` ${args.join(' ')}` : ''}`);
|
|
||||||
return spawn(command, args || [], {
|
|
||||||
stdio: ['pipe', 'pipe', 'inherit']
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import fs from 'fs';
|
|||||||
import os from 'os';
|
import os from 'os';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
|
import {ExecOptions, ExecOutput} from '@actions/exec';
|
||||||
import * as io from '@actions/io';
|
import * as io from '@actions/io';
|
||||||
|
|
||||||
import {Context} from '../context';
|
import {Context} from '../context';
|
||||||
@@ -25,7 +26,7 @@ import {Cache} from '../cache';
|
|||||||
import {Exec} from '../exec';
|
import {Exec} from '../exec';
|
||||||
import {Util} from '../util';
|
import {Util} from '../util';
|
||||||
|
|
||||||
import {ConfigFile} from '../types/docker/docker';
|
import {ConfigFile, ContextInfo} from '../types/docker/docker';
|
||||||
|
|
||||||
export class Docker {
|
export class Docker {
|
||||||
static get configDir(): string {
|
static get configDir(): string {
|
||||||
@@ -53,12 +54,36 @@ export class Docker {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async exec(args?: string[], options?: ExecOptions): Promise<number> {
|
||||||
|
return Exec.exec('docker', args, Docker.execOptions(options));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async getExecOutput(args?: string[], options?: ExecOptions): Promise<ExecOutput> {
|
||||||
|
return Exec.getExecOutput('docker', args, Docker.execOptions(options));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static execOptions(options?: ExecOptions): ExecOptions {
|
||||||
|
if (!options) {
|
||||||
|
options = {};
|
||||||
|
}
|
||||||
|
if (!options.env) {
|
||||||
|
options.env = Object.assign({}, process.env, {
|
||||||
|
DOCKER_CONTENT_TRUST: 'false'
|
||||||
|
}) as {
|
||||||
|
[key: string]: string;
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
options.env.DOCKER_CONTENT_TRUST = 'false';
|
||||||
|
}
|
||||||
|
return options;
|
||||||
|
}
|
||||||
|
|
||||||
public static async context(name?: string): Promise<string> {
|
public static async context(name?: string): Promise<string> {
|
||||||
const args = ['context', 'inspect', '--format', '{{.Name}}'];
|
const args = ['context', 'inspect', '--format', '{{.Name}}'];
|
||||||
if (name) {
|
if (name) {
|
||||||
args.push(name);
|
args.push(name);
|
||||||
}
|
}
|
||||||
return await Exec.getExecOutput(`docker`, args, {
|
return await Docker.getExecOutput(args, {
|
||||||
ignoreReturnCode: true,
|
ignoreReturnCode: true,
|
||||||
silent: true
|
silent: true
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -69,12 +94,28 @@ export class Docker {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static async contextInspect(name?: string): Promise<ContextInfo> {
|
||||||
|
const args = ['context', 'inspect', '--format=json'];
|
||||||
|
if (name) {
|
||||||
|
args.push(name);
|
||||||
|
}
|
||||||
|
return await Docker.getExecOutput(args, {
|
||||||
|
ignoreReturnCode: true,
|
||||||
|
silent: true
|
||||||
|
}).then(res => {
|
||||||
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
|
throw new Error(res.stderr.trim());
|
||||||
|
}
|
||||||
|
return (<Array<ContextInfo>>JSON.parse(res.stdout.trim()))[0];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public static async printVersion(): Promise<void> {
|
public static async printVersion(): Promise<void> {
|
||||||
await Exec.exec('docker', ['version']);
|
await Docker.exec(['version']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static async printInfo(): Promise<void> {
|
public static async printInfo(): Promise<void> {
|
||||||
await Exec.exec('docker', ['info']);
|
await Docker.exec(['info']);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static parseRepoTag(image: string): {repository: string; tag: string} {
|
public static parseRepoTag(image: string): {repository: string; tag: string} {
|
||||||
@@ -122,7 +163,7 @@ export class Docker {
|
|||||||
cacheFoundPath = await imageCache.find();
|
cacheFoundPath = await imageCache.find();
|
||||||
if (cacheFoundPath) {
|
if (cacheFoundPath) {
|
||||||
core.info(`Image found from cache in ${cacheFoundPath}`);
|
core.info(`Image found from cache in ${cacheFoundPath}`);
|
||||||
await Exec.getExecOutput(`docker`, ['load', '-i', cacheFoundPath], {
|
await Docker.getExecOutput(['load', '-i', cacheFoundPath], {
|
||||||
ignoreReturnCode: true
|
ignoreReturnCode: true
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
@@ -133,7 +174,7 @@ export class Docker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let pulled = true;
|
let pulled = true;
|
||||||
await Exec.getExecOutput(`docker`, ['pull', image], {
|
await Docker.getExecOutput(['pull', image], {
|
||||||
ignoreReturnCode: true
|
ignoreReturnCode: true
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
@@ -149,7 +190,7 @@ export class Docker {
|
|||||||
|
|
||||||
if (cache && pulled) {
|
if (cache && pulled) {
|
||||||
const imageTarPath = path.join(Context.tmpDir(), `${Util.hash(image)}.tar`);
|
const imageTarPath = path.join(Context.tmpDir(), `${Util.hash(image)}.tar`);
|
||||||
await Exec.getExecOutput(`docker`, ['save', '-o', imageTarPath, image], {
|
await Docker.getExecOutput(['save', '-o', imageTarPath, image], {
|
||||||
ignoreReturnCode: true
|
ignoreReturnCode: true
|
||||||
}).then(async res => {
|
}).then(async res => {
|
||||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import * as io from '@actions/io';
|
|||||||
import * as tc from '@actions/tool-cache';
|
import * as tc from '@actions/tool-cache';
|
||||||
|
|
||||||
import {Context} from '../context';
|
import {Context} from '../context';
|
||||||
|
import {Docker} from './docker';
|
||||||
import {Exec} from '../exec';
|
import {Exec} from '../exec';
|
||||||
import {Util} from '../util';
|
import {Util} from '../util';
|
||||||
import {limaYamlData, dockerServiceLogsPs1, setupDockerWinPs1} from './assets';
|
import {limaYamlData, dockerServiceLogsPs1, setupDockerWinPs1} from './assets';
|
||||||
@@ -219,8 +220,8 @@ export class Install {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await core.group('Create Docker context', async () => {
|
await core.group('Create Docker context', async () => {
|
||||||
await Exec.exec('docker', ['context', 'create', this.contextName, '--docker', `host=${dockerHost}`]);
|
await Docker.exec(['context', 'create', this.contextName, '--docker', `host=${dockerHost}`]);
|
||||||
await Exec.exec('docker', ['context', 'use', this.contextName]);
|
await Docker.exec(['context', 'use', this.contextName]);
|
||||||
});
|
});
|
||||||
|
|
||||||
return dockerHost;
|
return dockerHost;
|
||||||
@@ -309,8 +310,8 @@ EOF`,
|
|||||||
});
|
});
|
||||||
|
|
||||||
await core.group('Create Docker context', async () => {
|
await core.group('Create Docker context', async () => {
|
||||||
await Exec.exec('docker', ['context', 'create', this.contextName, '--docker', `host=${dockerHost}`]);
|
await Docker.exec(['context', 'create', this.contextName, '--docker', `host=${dockerHost}`]);
|
||||||
await Exec.exec('docker', ['context', 'use', this.contextName]);
|
await Docker.exec(['context', 'use', this.contextName]);
|
||||||
});
|
});
|
||||||
|
|
||||||
return dockerHost;
|
return dockerHost;
|
||||||
@@ -352,8 +353,8 @@ EOF`,
|
|||||||
});
|
});
|
||||||
|
|
||||||
await core.group('Create Docker context', async () => {
|
await core.group('Create Docker context', async () => {
|
||||||
await Exec.exec('docker', ['context', 'create', this.contextName, '--docker', `host=${dockerHost}`]);
|
await Docker.exec(['context', 'create', this.contextName, '--docker', `host=${dockerHost}`]);
|
||||||
await Exec.exec('docker', ['context', 'use', this.contextName]);
|
await Docker.exec(['context', 'use', this.contextName]);
|
||||||
});
|
});
|
||||||
|
|
||||||
return dockerHost;
|
return dockerHost;
|
||||||
@@ -395,7 +396,7 @@ EOF`,
|
|||||||
await Exec.exec('limactl', ['delete', '--tty=false', this.limaInstanceName, '--force']);
|
await Exec.exec('limactl', ['delete', '--tty=false', this.limaInstanceName, '--force']);
|
||||||
});
|
});
|
||||||
await core.group('Removing Docker context', async () => {
|
await core.group('Removing Docker context', async () => {
|
||||||
await Exec.exec('docker', ['context', 'rm', '-f', this.contextName]);
|
await Docker.exec(['context', 'rm', '-f', this.contextName]);
|
||||||
});
|
});
|
||||||
await core.group(`Cleaning up runDir`, async () => {
|
await core.group(`Cleaning up runDir`, async () => {
|
||||||
await Exec.exec('sudo', ['rm', '-rf', this.runDir]);
|
await Exec.exec('sudo', ['rm', '-rf', this.runDir]);
|
||||||
@@ -411,7 +412,7 @@ EOF`,
|
|||||||
await Util.sleep(5);
|
await Util.sleep(5);
|
||||||
});
|
});
|
||||||
await core.group('Removing Docker context', async () => {
|
await core.group('Removing Docker context', async () => {
|
||||||
await Exec.exec('docker', ['context', 'rm', '-f', this.contextName]);
|
await Docker.exec(['context', 'rm', '-f', this.contextName]);
|
||||||
});
|
});
|
||||||
await core.group(`Cleaning up runDir`, async () => {
|
await core.group(`Cleaning up runDir`, async () => {
|
||||||
await Exec.exec('sudo', ['rm', '-rf', this.runDir], {
|
await Exec.exec('sudo', ['rm', '-rf', this.runDir], {
|
||||||
@@ -427,7 +428,7 @@ EOF`,
|
|||||||
await Exec.exec(logCmd.command, logCmd.args);
|
await Exec.exec(logCmd.command, logCmd.args);
|
||||||
});
|
});
|
||||||
await core.group('Removing Docker context', async () => {
|
await core.group('Removing Docker context', async () => {
|
||||||
await Exec.exec('docker', ['context', 'rm', '-f', this.contextName]);
|
await Docker.exec(['context', 'rm', '-f', this.contextName]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import os from 'os';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {CreateArtifactRequest, FinalizeArtifactRequest, StringValue} from '@actions/artifact/lib/generated';
|
import {CreateArtifactRequest, FinalizeArtifactRequest, StringValue} from '@actions/artifact/lib/generated';
|
||||||
import {internalArtifactTwirpClient} from '@actions/artifact/lib/internal/shared/artifact-twirp-client';
|
import {internalArtifactTwirpClient} from '@actions/artifact/lib/internal/shared/artifact-twirp-client';
|
||||||
|
import {isGhes} from '@actions/artifact/lib/internal/shared/config';
|
||||||
import {getBackendIdsFromToken} from '@actions/artifact/lib/internal/shared/util';
|
import {getBackendIdsFromToken} from '@actions/artifact/lib/internal/shared/util';
|
||||||
import {getExpiration} from '@actions/artifact/lib/internal/upload/retention';
|
import {getExpiration} from '@actions/artifact/lib/internal/upload/retention';
|
||||||
import {InvalidResponseError, NetworkError} from '@actions/artifact';
|
import {InvalidResponseError, NetworkError} from '@actions/artifact';
|
||||||
@@ -67,11 +68,9 @@ export class GitHub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static get isGHES(): boolean {
|
static get isGHES(): boolean {
|
||||||
const serverURL = new URL(GitHub.serverURL);
|
// FIXME: we are using the function from GitHub artifact module but should
|
||||||
const hostname = serverURL.hostname.trimEnd().toUpperCase();
|
// be within core module when available.
|
||||||
const isGitHubHost = hostname === 'GITHUB.COM';
|
return isGhes();
|
||||||
const isGHESHost = hostname.endsWith('.GHE.COM') || hostname.endsWith('.GHE.LOCALHOST');
|
|
||||||
return !isGitHubHost && !isGHESHost;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static get repository(): string {
|
static get repository(): string {
|
||||||
@@ -233,6 +232,9 @@ export class GitHub {
|
|||||||
|
|
||||||
const refsSize = Object.keys(opts.exportRes.refs).length;
|
const refsSize = Object.keys(opts.exportRes.refs).length;
|
||||||
|
|
||||||
|
const sum = core.summary.addHeading('Docker Build summary', 2);
|
||||||
|
|
||||||
|
if (opts.uploadRes) {
|
||||||
// we just need the last two parts of the URL as they are always relative
|
// we just need the last two parts of the URL as they are always relative
|
||||||
// to the workflow run URL otherwise URL could be broken if GitHub
|
// to the workflow run URL otherwise URL could be broken if GitHub
|
||||||
// repository name is part of a secret value used in the workflow. e.g.:
|
// repository name is part of a secret value used in the workflow. e.g.:
|
||||||
@@ -242,9 +244,7 @@ export class GitHub {
|
|||||||
const artifactRelativeURL = `./${GitHub.runId}/${opts.uploadRes.url.split('/').slice(-2).join('/')}`;
|
const artifactRelativeURL = `./${GitHub.runId}/${opts.uploadRes.url.split('/').slice(-2).join('/')}`;
|
||||||
|
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
const sum = core.summary
|
sum.addRaw(`<p>`)
|
||||||
.addHeading('Docker Build summary', 2)
|
|
||||||
.addRaw(`<p>`)
|
|
||||||
.addRaw(`For a detailed look at the build, download the following build record archive and import it into Docker Desktop's Builds view. `)
|
.addRaw(`For a detailed look at the build, download the following build record archive and import it into Docker Desktop's Builds view. `)
|
||||||
.addBreak()
|
.addBreak()
|
||||||
.addRaw(`Build records include details such as timing, dependencies, results, logs, traces, and other information about a build. `)
|
.addRaw(`Build records include details such as timing, dependencies, results, logs, traces, and other information about a build. `)
|
||||||
@@ -252,11 +252,19 @@ export class GitHub {
|
|||||||
.addRaw('</p>')
|
.addRaw('</p>')
|
||||||
.addRaw(`<p>`)
|
.addRaw(`<p>`)
|
||||||
.addRaw(`:arrow_down: ${addLink(`<strong>${Util.stringToUnicodeEntities(opts.uploadRes.filename)}</strong>`, artifactRelativeURL)} (${Util.formatFileSize(opts.uploadRes.size)} - includes <strong>${refsSize} build record${refsSize > 1 ? 's' : ''}</strong>)`)
|
.addRaw(`:arrow_down: ${addLink(`<strong>${Util.stringToUnicodeEntities(opts.uploadRes.filename)}</strong>`, artifactRelativeURL)} (${Util.formatFileSize(opts.uploadRes.size)} - includes <strong>${refsSize} build record${refsSize > 1 ? 's' : ''}</strong>)`)
|
||||||
.addRaw(`</p>`)
|
.addRaw(`</p>`);
|
||||||
.addRaw(`<p>`)
|
} else {
|
||||||
.addRaw(`Find this useful? `)
|
// prettier-ignore
|
||||||
.addRaw(addLink('Let us know', 'https://docs.docker.com/feedback/gha-build-summary'))
|
sum.addRaw(`<p>`)
|
||||||
.addRaw('</p>');
|
.addRaw(`The following table provides a brief summary of your build.`)
|
||||||
|
.addBreak()
|
||||||
|
.addRaw(`For a detailed look at the build, including timing, dependencies, results, logs, traces, and other information, consider enabling the export of the build record so you can import it into Docker Desktop's Builds view. `)
|
||||||
|
.addRaw(addLink('Learn more', 'https://www.docker.com/blog/new-beta-feature-deep-dive-into-github-actions-docker-builds-with-docker-desktop/?utm_source=github&utm_medium=actions'))
|
||||||
|
.addRaw(`</p>`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Feedback survey
|
||||||
|
sum.addRaw(`<p>`).addRaw(`Find this useful? `).addRaw(addLink('Let us know', 'https://docs.docker.com/feedback/gha-build-summary')).addRaw('</p>');
|
||||||
|
|
||||||
// Preview
|
// Preview
|
||||||
sum.addRaw('<p>');
|
sum.addRaw('<p>');
|
||||||
|
|||||||
@@ -64,3 +64,33 @@ export interface AuthConfig {
|
|||||||
identitytoken?: string;
|
identitytoken?: string;
|
||||||
registrytoken?: string;
|
registrytoken?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ContextInfo {
|
||||||
|
Name: string;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
Metadata: any;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
Endpoints: Record<string, EndpointInfo>;
|
||||||
|
TLSMaterial: Record<string, Array<string>>;
|
||||||
|
Storage: StorageInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface EndpointInfo {
|
||||||
|
Host?: string;
|
||||||
|
SkipVerify: boolean;
|
||||||
|
TLSData?: TLSData;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TLSData {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
CA: any;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
Key: any;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
Cert: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface StorageInfo {
|
||||||
|
MetadataPath: string;
|
||||||
|
TLSPath: string;
|
||||||
|
}
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export interface UploadArtifactResponse {
|
|||||||
|
|
||||||
export interface BuildSummaryOpts {
|
export interface BuildSummaryOpts {
|
||||||
exportRes: ExportRecordResponse;
|
exportRes: ExportRecordResponse;
|
||||||
uploadRes: UploadArtifactResponse;
|
uploadRes?: UploadArtifactResponse;
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
inputs?: any;
|
inputs?: any;
|
||||||
bakeDefinition?: BakeDefinition;
|
bakeDefinition?: BakeDefinition;
|
||||||
|
|||||||
20
yarn.lock
20
yarn.lock
@@ -12,9 +12,9 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@actions/artifact@npm:^2.1.7":
|
"@actions/artifact@npm:^2.1.8":
|
||||||
version: 2.1.7
|
version: 2.1.8
|
||||||
resolution: "@actions/artifact@npm:2.1.7"
|
resolution: "@actions/artifact@npm:2.1.8"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@actions/core": ^1.10.0
|
"@actions/core": ^1.10.0
|
||||||
"@actions/github": ^5.1.1
|
"@actions/github": ^5.1.1
|
||||||
@@ -30,7 +30,7 @@ __metadata:
|
|||||||
jwt-decode: ^3.1.2
|
jwt-decode: ^3.1.2
|
||||||
twirp-ts: ^2.5.0
|
twirp-ts: ^2.5.0
|
||||||
unzip-stream: ^0.3.1
|
unzip-stream: ^0.3.1
|
||||||
checksum: 346c7caf43bdeb4a96c044ca3a6a005d82b977178b1a6be2c6954dfd59fef3344d2576bdd07c6cac9b54207cc88d7b1161cabd08c7cc15a1db86bf82463b36c7
|
checksum: 51a47c21bcdac705abb61dbaef923f2760354c39bcad44a31b129e18bf31f646e5148f92ee7e1198275d1dba7bebfd1d1500ad7f62f6de1e65b57b2d092d5341
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -1099,7 +1099,7 @@ __metadata:
|
|||||||
version: 0.0.0-use.local
|
version: 0.0.0-use.local
|
||||||
resolution: "@docker/actions-toolkit@workspace:."
|
resolution: "@docker/actions-toolkit@workspace:."
|
||||||
dependencies:
|
dependencies:
|
||||||
"@actions/artifact": ^2.1.7
|
"@actions/artifact": ^2.1.8
|
||||||
"@actions/cache": ^3.2.4
|
"@actions/cache": ^3.2.4
|
||||||
"@actions/core": ^1.10.1
|
"@actions/core": ^1.10.1
|
||||||
"@actions/exec": ^1.1.1
|
"@actions/exec": ^1.1.1
|
||||||
@@ -1136,7 +1136,7 @@ __metadata:
|
|||||||
jwt-decode: ^4.0.0
|
jwt-decode: ^4.0.0
|
||||||
prettier: ^3.2.5
|
prettier: ^3.2.5
|
||||||
rimraf: ^5.0.5
|
rimraf: ^5.0.5
|
||||||
semver: ^7.6.2
|
semver: ^7.6.3
|
||||||
tar-stream: ^3.1.7
|
tar-stream: ^3.1.7
|
||||||
tmp: ^0.2.3
|
tmp: ^0.2.3
|
||||||
ts-jest: ^29.1.2
|
ts-jest: ^29.1.2
|
||||||
@@ -7406,12 +7406,12 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"semver@npm:^7.6.2":
|
"semver@npm:^7.6.3":
|
||||||
version: 7.6.2
|
version: 7.6.3
|
||||||
resolution: "semver@npm:7.6.2"
|
resolution: "semver@npm:7.6.3"
|
||||||
bin:
|
bin:
|
||||||
semver: bin/semver.js
|
semver: bin/semver.js
|
||||||
checksum: 40f6a95101e8d854357a644da1b8dd9d93ce786d5c6a77227bc69dbb17bea83d0d1d1d7c4cd5920a6df909f48e8bd8a5909869535007f90278289f2451d0292d
|
checksum: 4110ec5d015c9438f322257b1c51fe30276e5f766a3f64c09edd1d7ea7118ecbc3f379f3b69032bacf13116dc7abc4ad8ce0d7e2bd642e26b0d271b56b61a7d8
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user