diff --git a/.github/workflows/patch.yml b/.github/workflows/patch.yml index 11f4f1b4..f06fb8eb 100644 --- a/.github/workflows/patch.yml +++ b/.github/workflows/patch.yml @@ -28,6 +28,11 @@ jobs: run: | set -e + # Ensure enough space is available for build + sudo apt-get autoremove -y + sudo apt-get clean -y + sudo rm -rf /usr/share/dotnet + # ACR login ACR_REGISTRY_NAME=$(echo ${{ secrets.REGISTRY }} | grep -oP '(.+)(?=\.azurecr\.io)') az acr login --name $ACR_REGISTRY_NAME diff --git a/build/patch/USN-4256-1/Dockerfile b/build/patch/2020-02-07-1/Dockerfile similarity index 100% rename from build/patch/USN-4256-1/Dockerfile rename to build/patch/2020-02-07-1/Dockerfile diff --git a/build/patch/2020-02-07-1/README.md b/build/patch/2020-02-07-1/README.md new file mode 100644 index 00000000..e9693ef6 --- /dev/null +++ b/build/patch/2020-02-07-1/README.md @@ -0,0 +1 @@ +Patch for USN-4256-1 \ No newline at end of file diff --git a/build/patch/USN-4256-1/patch.json b/build/patch/2020-02-07-1/patch.json similarity index 100% rename from build/patch/USN-4256-1/patch.json rename to build/patch/2020-02-07-1/patch.json diff --git a/build/patch/DSA-4614-1/Dockerfile b/build/patch/2020-02-07-2/Dockerfile similarity index 100% rename from build/patch/DSA-4614-1/Dockerfile rename to build/patch/2020-02-07-2/Dockerfile diff --git a/build/patch/2020-02-07-2/README.md b/build/patch/2020-02-07-2/README.md new file mode 100644 index 00000000..288ff333 --- /dev/null +++ b/build/patch/2020-02-07-2/README.md @@ -0,0 +1 @@ +Patch for DSA-4614-1 \ No newline at end of file diff --git a/build/patch/DSA-4614-1/patch.json b/build/patch/2020-02-07-2/patch.json similarity index 100% rename from build/patch/DSA-4614-1/patch.json rename to build/patch/2020-02-07-2/patch.json diff --git a/build/patch/USN-4269-1/Dockerfile b/build/patch/2020-02-14-1/Dockerfile similarity index 100% rename from build/patch/USN-4269-1/Dockerfile rename to build/patch/2020-02-14-1/Dockerfile diff --git a/build/patch/2020-02-14-1/README.md b/build/patch/2020-02-14-1/README.md new file mode 100644 index 00000000..e0d1d5c2 --- /dev/null +++ b/build/patch/2020-02-14-1/README.md @@ -0,0 +1 @@ +Patches for USN-4269-1 diff --git a/build/patch/USN-4269-1/patch.json b/build/patch/2020-02-14-1/patch.json similarity index 100% rename from build/patch/USN-4269-1/patch.json rename to build/patch/2020-02-14-1/patch.json diff --git a/build/patch/DSA-4613-1/Dockerfile b/build/patch/2020-02-14-2/Dockerfile similarity index 100% rename from build/patch/DSA-4613-1/Dockerfile rename to build/patch/2020-02-14-2/Dockerfile diff --git a/build/patch/2020-02-14-2/README.md b/build/patch/2020-02-14-2/README.md new file mode 100644 index 00000000..77fb2bf5 --- /dev/null +++ b/build/patch/2020-02-14-2/README.md @@ -0,0 +1 @@ +Patch for DSA-4613-1 \ No newline at end of file diff --git a/build/patch/DSA-4613-1/patch.json b/build/patch/2020-02-14-2/patch.json similarity index 100% rename from build/patch/DSA-4613-1/patch.json rename to build/patch/2020-02-14-2/patch.json diff --git a/build/patch/CVE-2019-10131/Dockerfile b/build/patch/2020-04-2/Dockerfile similarity index 100% rename from build/patch/CVE-2019-10131/Dockerfile rename to build/patch/2020-04-2/Dockerfile diff --git a/build/patch/2020-04-2/README.md b/build/patch/2020-04-2/README.md new file mode 100644 index 00000000..523f0c12 --- /dev/null +++ b/build/patch/2020-04-2/README.md @@ -0,0 +1 @@ +Patch for CVE-2019-10131 \ No newline at end of file diff --git a/build/patch/CVE-2019-10131/patch.json b/build/patch/2020-04-2/patch.json similarity index 100% rename from build/patch/CVE-2019-10131/patch.json rename to build/patch/2020-04-2/patch.json diff --git a/build/patch/status.json b/build/patch/status.json index 418ae47e..01ce7d87 100644 --- a/build/patch/status.json +++ b/build/patch/status.json @@ -1,11 +1,11 @@ { "complete": { - "DSA-4613-1": true, - "DSA-4614-1": true, - "USN-4256-1": true, - "USN-4269-1": true, - "sample": false, - "CVE-2019-10131": true + "2020-02-07-1": true, + "2020-02-07-2": true, + "2020-02-14-1": true, + "2020-02-14-2": true, + "2020-04-2": true, + "sample": true }, "failed": {} } diff --git a/build/src/patch.js b/build/src/patch.js index 6fd894f4..69e5095e 100644 --- a/build/src/patch.js +++ b/build/src/patch.js @@ -189,6 +189,8 @@ async function patchAll(registry, registryPath) { } catch (ex) { console.log(`(!) Patch ${patchEntry.name} failed - ${ex}.`); patchStatus.failed[patchEntry.name] = JSON.stringify(ex, undefined, 4); + await asyncUtils.writeFile(patchStatusFilePath, JSON.stringify(patchStatus, undefined, 4)) + throw ex; } } });