Skip to content

Commit

Permalink
Make sure build fails if image build fails (#642)
Browse files Browse the repository at this point in the history
* build validation fixes

* include -y for tdnf update

* change deploy to dev clusters dependencies

* add telegraf cve

* fix merge
  • Loading branch information
gracewehner authored Oct 19, 2023
1 parent 68b555a commit 32467cc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 9 additions & 2 deletions .pipelines/azure-pipeline-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,19 @@ jobs:
# Load in amd64 image to run vulnerability scan
docker buildx build . --file ./build/linux/Dockerfile -t $(LINUX_FULL_IMAGE_NAME) --metadata-file $(Build.ArtifactStagingDirectory)/linux/metadata.json
fi
workingDirectory: $(Build.SourcesDirectory)/otelcollector/
displayName: "Build: build and push image to dev ACR"
- bash: |
MEDIA_TYPE=$(docker manifest inspect -v $(LINUX_FULL_IMAGE_NAME) | jq '.Descriptor.mediaType')
DIGEST=$(docker manifest inspect -v $(LINUX_FULL_IMAGE_NAME) | jq '.Descriptor.digest')
SIZE=$(docker manifest inspect -v $(LINUX_FULL_IMAGE_NAME) | jq '.Descriptor.size')
cat <<EOF >>$(Build.ArtifactStagingDirectory)/linux/payload.json
{"targetArtifact":{"mediaType":$MEDIA_TYPE,"digest":$DIGEST,"size":$SIZE}}
EOF
workingDirectory: $(Build.SourcesDirectory)/otelcollector/
displayName: "Build: build and push image to dev ACR"
displayName: "Build: Set values in payload.json for signing"
condition: eq(variables.IS_MAIN_BRANCH, true)
- task: EsrpCodeSigning@3
displayName: "ESRP CodeSigning for Prometheus"
Expand Down Expand Up @@ -968,7 +973,9 @@ jobs:
condition: and(eq(variables.IS_PR, false), eq(variables.IS_MAIN_BRANCH, true))
dependsOn:
- Common
- Chart
- Linux
- WindowsMultiArch
- ARC_Chart
variables:
HELM_CHART_NAME: $[ dependencies.common.outputs['setup.HELM_CHART_NAME'] ]
HELM_SEMVER: $[ dependencies.common.outputs['setup.SEMVER'] ]
Expand Down
3 changes: 2 additions & 1 deletion .trivyignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
# none

# =========== HIGH ================
# none
# HIGH - telegraf
GHSA-fr2g-9hjm-wr23

# =========== MEDIUM ================
# MEDIUM - otelcollector
Expand Down

0 comments on commit 32467cc

Please sign in to comment.