From deea4d3d6bb2226eb2671c39d74166c383081dfc Mon Sep 17 00:00:00 2001 From: Sophie Wigmore Date: Thu, 7 Jul 2022 18:24:38 -0400 Subject: [PATCH] allow for dependencies to not be compiled --- .github/data/dependencies.yml | 1 + .github/data/dependency-workflows-config.yml | 1 + .github/templates/build-upload.yml | 17 +++++++++++++++++ .../workflows/generate-dependency-workflows.yml | 2 ++ 4 files changed, 21 insertions(+) diff --git a/.github/data/dependencies.yml b/.github/data/dependencies.yml index 7ee24ea..5680f29 100644 --- a/.github/data/dependencies.yml +++ b/.github/data/dependencies.yml @@ -24,6 +24,7 @@ - id: io.buildpacks.stacks.jammy version-constraint: ">=6.*" - name: dotnet-sdk + skip_compile: true stacks: - id: io.buildpacks.stacks.bionic version-constraint: "*" diff --git a/.github/data/dependency-workflows-config.yml b/.github/data/dependency-workflows-config.yml index 17d58b7..2ecef5e 100644 --- a/.github/data/dependency-workflows-config.yml +++ b/.github/data/dependency-workflows-config.yml @@ -5,3 +5,4 @@ stacks: mixins: required_dependency: skip_test: +skip_compile: diff --git a/.github/templates/build-upload.yml b/.github/templates/build-upload.yml index eb9e5ea..53d526b 100644 --- a/.github/templates/build-upload.yml +++ b/.github/templates/build-upload.yml @@ -42,6 +42,7 @@ jobs: version: "${{ env.VERSION }}" github-token: "${{ secrets.GITHUB_TOKEN }}" + #@ if data.values.skip_compile != 'true': - name: Build id: build uses: paketo-buildpacks/dep-server/actions/build-dependency@main @@ -65,6 +66,7 @@ jobs: bucket-name: ${{ secrets.DEPS_BUCKET }} dependency-name: ${{ env.DEP_NAME }} artifact-path: "${{ github.workspace }}/${{ steps.build.outputs.artifact-path }}" + #@ end - name: Modify CPE for Dispatch id: modify-cpe @@ -84,6 +86,7 @@ jobs: repos: paketo-buildpacks/dep-server token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} event: #@ data.values.name + "-test" + #@ if data.values.skip_compile != 'true': payload: | { "version": "${{ env.VERSION }}", @@ -96,6 +99,20 @@ jobs: "purl": "${{ steps.upstream.outputs.purl }}", "licenses": "${{ steps.flatten-licenses.outputs.licenses }}" } + #@ else: + payload: | + { + "version": "${{ env.VERSION }}", + "uri": "${{ steps.upstream.outputs.uri }}", + "sha256": "${{ steps.upstream.outputs.sha256 }}", + "source_uri": "${{ steps.upstream.outputs.uri }}", + "source_sha256": "${{ steps.upstream.outputs.sha256 }}", + "deprecation_date": "${{ steps.upstream.outputs.deprecation-date }}", + "cpe": "${{ steps.modify-cpe.outputs.cpe }}", + "purl": "${{ steps.upstream.outputs.purl }}", + "licenses": "${{ steps.flatten-licenses.outputs.licenses }}" + } + #@ end - name: Notify Maintainers of Failures if: ${{ failure() }} diff --git a/.github/workflows/generate-dependency-workflows.yml b/.github/workflows/generate-dependency-workflows.yml index 246ded8..c94f5c2 100644 --- a/.github/workflows/generate-dependency-workflows.yml +++ b/.github/workflows/generate-dependency-workflows.yml @@ -44,6 +44,7 @@ jobs: mixins="$(echo "${obj}" | jq -r '.stacks[] | select( .id == "io.buildpacks.stacks.bionic").mixins // empty' -c)" requires="$(echo "${obj}" | jq -r '.requires // empty')" skip_test="$(echo "${obj}" | jq -r '.skip_test // false')" + skip_compile="$(echo "${obj}" | jq -r '.skip_compile // false')" ytt \ -f ".github/templates/get-new-versions.yml" \ @@ -55,6 +56,7 @@ jobs: -f ".github/templates/build-upload.yml" \ -f ".github/data/dependency-workflows-config.yml" \ -v name="${name}" \ + -v skip_compile="${skip_compile}" \ > ".github/workflows/${name}-build-upload.yml" ytt \