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

Release 0.25.2 #1168

Merged
merged 15 commits into from
Dec 18, 2024
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
85 changes: 63 additions & 22 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,62 @@ env:
IMAGE_NAME: ${{ github.repository }}

jobs:
tagging:
name: Determine Tags
runs-on: ubuntu-20.04
permissions:
contents: read
packages: read
outputs:
FINAL_TAG: ${{ steps.tags.outputs.FINAL_TAG }}
SHA_TAG: ${{ steps.tags.outputs.SHA_TAG }}

steps:
- name: Log in to Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1

- name: Extract Docker Metadata
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
# Tag event produce a semver tag. This will capture tags that begin
# vX.Y.Z and X.Y.Z.
type=semver,pattern={{version}},event=tag
# All other push events (no PR, no semver tag), produce a SHA tag
type=sha,format=long

- name: Determine Final Tag
id: tags
run: |
ALL_TAGS="${{ steps.meta.outputs.tags }}"
SEMVER_TAG=$(echo "$ALL_TAGS" | grep -E '^ghcr.io/.+:[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?' || true)
SHA_TAG=$(echo "$ALL_TAGS" | grep sha- || true)

if [ -n "$SEMVER_TAG" ]; then
FINAL_TAG="$SEMVER_TAG"
else
FINAL_TAG="$SHA_TAG"
fi

echo "SHA_TAG=$SHA_TAG" >> $GITHUB_OUTPUT
echo "FINAL_TAG=$FINAL_TAG" >> $GITHUB_OUTPUT

- name: Debug Tags
run: |
echo "SHA_TAG: ${{ steps.tags.outputs.SHA_TAG }}"
echo "FINAL_TAG: ${{ steps.tags.outputs.FINAL_TAG }}"

build:
needs: tagging
runs-on: ${{ matrix.runner }}
strategy:
matrix:
Expand Down Expand Up @@ -41,27 +96,25 @@ jobs:
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,format=long
type=ref,prefix=pr-,event=pr
type=semver,pattern={{version}},event=tag
type=semver,pattern={{major}}.{{minor}},event=tag
type=semver,pattern={{major}},event=tag
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
file: Dockerfile
tags: ${{ steps.meta.outputs.tags }}-${{ matrix.arch }}
tags: ${{ needs.tagging.outputs.SHA_TAG }}-${{ matrix.arch }}
push: true
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=ghcr.io/datadog/lading:cache
cache-to: type=registry,ref=ghcr.io/datadog/lading:cache,mode=max

manifest:
name: Create Multi-Arch Manifest
needs: build
needs:
- tagging
- build
runs-on: ubuntu-20.04
permissions:
contents: read
Expand All @@ -78,21 +131,9 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1

- name: Extract Docker Metadata
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
id: meta
with:
tags: |
type=sha,format=long
type=ref,prefix=pr-,event=pr
type=semver,pattern={{version}},event=tag
type=semver,pattern={{major}}.{{minor}},event=tag
type=semver,pattern={{major}},event=tag
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Create and Push Multiarch Manifest
run: |
docker buildx imagetools create \
--tag ${{ steps.meta.outputs.tags }} \
${{ steps.meta.outputs.tags }}-amd64 \
${{ steps.meta.outputs.tags }}-arm64
--tag "${{ needs.tagging.outputs.FINAL_TAG }}" \
"${{ needs.tagging.outputs.SHA_TAG }}-amd64" \
"${{ needs.tagging.outputs.SHA_TAG }}-arm64"
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- The `bytes_received` metric in the HTTP and splunk_hec blackholes now tracks
## [0.25.2]
## Changed
- The `bytes_received` metric in the HTTP and splunk_heck blackholes now tracks
wire bytes, the former metric is preserved with `decoded_bytes_received`.
- Base image is now bookworm, updated from bullseye.

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lading/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lading"
version = "0.25.1"
version = "0.25.2"
authors = [
"Brian L. Troutwine <[email protected]>",
"George Hahn <[email protected]>",
Expand Down
Loading