Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure build fails if image build fails #642

Merged
merged 6 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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