@@ -37,13 +37,12 @@ jobs:
3737 forked_workflow=${{ (github.event.pull_request && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) || github.repository != 'nginx/nginx-prometheus-exporter' }}
3838 echo "forked_workflow=${forked_workflow}" >> $GITHUB_OUTPUT
3939 if [ "$forked_workflow" = "false" ] && [ "${{ github.ref_name }}" != "${{ github.event.repository.default_branch }}" ]; then
40- go_proxy="${{ secrets.ARTIFACTORY_DEV_ENDPOINT }}"
40+ go_proxy="${{ secrets.ARTIFACTORY_DEV_ENDPOINT }}" >> $GITHUB_OUTPUT
4141 elif [ "${{ github.ref_name }}" = "${{ github.event.repository.default_branch }}" ]; then
42- go_proxy="${{ secrets.ARTIFACTORY_ENDPOINT }}"
42+ go_proxy="${{ secrets.ARTIFACTORY_ENDPOINT }}" >> $GITHUB_OUTPUT
4343 else
44- go_proxy="https://proxy.golang.org,direct"
44+ go_proxy="https://proxy.golang.org,direct" >> $GITHUB_OUTPUT
4545 fi
46- echo "go_proxy=${go_proxy}" >> $GITHUB_OUTPUT
4746 cat $GITHUB_OUTPUT
4847
4948 unit-tests :
@@ -257,74 +256,74 @@ jobs:
257256 rm -f $HOME/.netrc
258257 if : ${{ always() }}
259258
260- generate-assertion-doc :
261- if : ${{ github.event_name != 'pull_request' }}
262- name : Assertion Doc ${{ matrix.prometheus.arch }}
263- needs : [build-docker, variables]
264- runs-on : ubuntu-24.04-amd64
265- permissions :
266- contents : read
267- id-token : write # for compliance-rules action to sign assertion doc
268- strategy :
269- fail-fast : false
270- matrix :
271- prometheus : ${{ fromJSON( needs.build-docker.outputs.binaries ) }}
272- steps :
273- - name : Checkout Repository
274- uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
275-
276- - name : Setup Golang Environment
277- uses : actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
278- with :
279- go-version-file : go.mod
280-
281- - name : Setup netrc
282- run : |
283- cat <<EOF > $HOME/.netrc
284- machine azr.artifactory.f5net.com
285- login ${{ secrets.ARTIFACTORY_USER }}
286- password ${{ secrets.ARTIFACTORY_TOKEN }}
287- EOF
288- chmod 600 $HOME/.netrc
289-
290- - name : Fetch Cached Artifacts
291- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
292- with :
293- path : ${{ github.workspace }}/dist
294- key : nginx-prometheus-exporter-${{ github.sha }}
295- fail-on-cache-miss : true
296-
297- - name : List packages in Go binary
298- id : godeps
299- env :
300- GOPROXY : ${{ needs.variables.outputs.go_proxy }}
301- run : |
302- go version -m ${{ matrix.prometheus.path }} > go_version_out_${{ github.run_id }}_${{ github.run_number }}.txt
303- echo "go_version_out=$(find -type f -name "go_version_out*.txt" | head -n 1)" >> $GITHUB_OUTPUT
304- echo "artifact_digest=$(openssl dgst -sha256 -r ${{ matrix.prometheus.path }} | cut -d ' ' -f 1)" >> $GITHUB_OUTPUT
305- cat $GITHUB_OUTPUT
306-
307- - name : Generate Assertion Document
308- id : assertiondoc
309- uses : nginxinc/compliance-rules/.github/actions/assertion@83e452166aaf0ad8f07caf91a4f1f903b3dea1e6 # v0.3.0
310- with :
311- artifact-name : " ${{ github.event.repository.name }}_${{ github.sha }}_${{ github.run_number }}_${{ matrix.prometheus.os }}_${{ matrix.prometheus.arch }}"
312- artifact-digest : ${{ steps.godeps.outputs.artifact_digest }}
313- build-type : " github.com"
314- builder-id : " github"
315- builder-version : v0.1.0
316- started-on : ${{ github.event.head_commit.timestamp }}
317- finished-on : ${{ github.event.head_commit.timestamp }}
318- invocation-id : ${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }}
319- artifactory-user : ${{ secrets.ARTIFACTORY_USER }}
320- artifactory-api-token : ${{ secrets.ARTIFACTORY_TOKEN }}
321- artifactory-url : ${{ secrets.ARTIFACTORY_URL }}
322- artifactory-repo : ' f5-nginx-go-local-approved-dependency'
323- assertion-doc-file : assertion_${{ github.event.repository.name }}_${{ github.sha }}_${{ github.run_id }}_${{ github.run_number }}_${{ matrix.prometheus.os }}_${{ matrix.prometheus.arch }}.json
324- build-content-path : ${{ steps.godeps.outputs.go_version_out }}
325-
326- - name : Sign and Store Assertion Document
327- id : sign
328- uses : nginxinc/compliance-rules/.github/actions/sign@83e452166aaf0ad8f07caf91a4f1f903b3dea1e6 # v0.3.0
329- with :
330- assertion-doc : ${{ steps.assertiondoc.outputs.assertion-document-path }}
259+ # generate-assertion-doc:
260+ # if: ${{ github.event_name != 'pull_request' }}
261+ # name: Assertion Doc ${{ matrix.prometheus.os }}/ ${{ matrix.prometheus.arch }}
262+ # needs: [build-docker, variables]
263+ # runs-on: ubuntu-24.04-amd64
264+ # permissions:
265+ # contents: read
266+ # id-token: write # for compliance-rules action to sign assertion doc
267+ # strategy:
268+ # fail-fast: false
269+ # matrix:
270+ # prometheus: ${{ fromJSON( needs.build-docker.outputs.binaries ) }}
271+ # steps:
272+ # - name: Checkout Repository
273+ # uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
274+
275+ # - name: Setup Golang Environment
276+ # uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
277+ # with:
278+ # go-version-file: go.mod
279+
280+ # - name: Setup netrc
281+ # run: |
282+ # cat <<EOF > $HOME/.netrc
283+ # machine azr.artifactory.f5net.com
284+ # login ${{ secrets.ARTIFACTORY_USER }}
285+ # password ${{ secrets.ARTIFACTORY_TOKEN }}
286+ # EOF
287+ # chmod 600 $HOME/.netrc
288+
289+ # - name: Fetch Cached Artifacts
290+ # uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
291+ # with:
292+ # path: ${{ github.workspace }}/dist
293+ # key: nginx-prometheus-exporter-${{ github.sha }}
294+ # fail-on-cache-miss: true
295+
296+ # - name: List packages in Go binary
297+ # id: godeps
298+ # env:
299+ # GOPROXY: ${{ needs.variables.outputs.go_proxy }}
300+ # run: |
301+ # go version -m ${{ matrix.prometheus.path }} > go_version_out_${{ github.run_id }}_${{ github.run_number }}.txt
302+ # echo "go_version_out=$(find -type f -name "go_version_out*.txt" | head -n 1)" >> $GITHUB_OUTPUT
303+ # echo "artifact_digest=$(openssl dgst -sha256 -r ${{ matrix.prometheus.path }} | cut -d ' ' -f 1)" >> $GITHUB_OUTPUT
304+ # cat $GITHUB_OUTPUT
305+
306+ # - name: Generate Assertion Document
307+ # id: assertiondoc
308+ # uses: nginxinc/compliance-rules/.github/actions/assertion@83e452166aaf0ad8f07caf91a4f1f903b3dea1e6 # v0.3.0
309+ # with:
310+ # artifact-name: "${{ github.event.repository.name }}_${{ github.sha }}_${{ github.run_number }}_${{ matrix.prometheus.os }}_${{ matrix.prometheus.arch }}"
311+ # artifact-digest: ${{ steps.godeps.outputs.artifact_digest }}
312+ # build-type: "github.com"
313+ # builder-id: "github"
314+ # builder-version: v0.1.0
315+ # started-on: ${{ github.event.head_commit.timestamp }}
316+ # finished-on: ${{ github.event.head_commit.timestamp }}
317+ # invocation-id: ${{ github.run_id }}.${{ github.run_number }}.${{ github.run_attempt }}
318+ # artifactory-user: ${{ secrets.ARTIFACTORY_USER }}
319+ # artifactory-api-token: ${{ secrets.ARTIFACTORY_TOKEN }}
320+ # artifactory-url: ${{ secrets.ARTIFACTORY_URL }}
321+ # artifactory-repo: 'f5-nginx-go-local-approved-dependency'
322+ # assertion-doc-file: assertion_${{ github.event.repository.name }}_${{ github.sha }}_${{ github.run_id }}_${{ github.run_number }}_${{ matrix.prometheus.os }}_${{ matrix.prometheus.arch }}.json
323+ # build-content-path: ${{ steps.godeps.outputs.go_version_out }}
324+
325+ # - name: Sign and Store Assertion Document
326+ # id: sign
327+ # uses: nginxinc/compliance-rules/.github/actions/sign@83e452166aaf0ad8f07caf91a4f1f903b3dea1e6 # v0.3.0
328+ # with:
329+ # assertion-doc: ${{ steps.assertiondoc.outputs.assertion-document-path }}
0 commit comments