Skip to content

Commit e5bc6c8

Browse files
authored
Release 0.25.2 (#1168)
### What does this PR do? This commit cuts 0.25.2. Minor changes are present here -- some telemetry changes, base OS image is updated -- and we believe now that the container images will be published properly.
1 parent fdcd881 commit e5bc6c8

File tree

4 files changed

+68
-26
lines changed

4 files changed

+68
-26
lines changed

.github/workflows/container.yml

+63-22
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,62 @@ env:
88
IMAGE_NAME: ${{ github.repository }}
99

1010
jobs:
11+
tagging:
12+
name: Determine Tags
13+
runs-on: ubuntu-20.04
14+
permissions:
15+
contents: read
16+
packages: read
17+
outputs:
18+
FINAL_TAG: ${{ steps.tags.outputs.FINAL_TAG }}
19+
SHA_TAG: ${{ steps.tags.outputs.SHA_TAG }}
20+
21+
steps:
22+
- name: Log in to Container Registry
23+
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
24+
with:
25+
registry: ${{ env.REGISTRY }}
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
31+
32+
- name: Extract Docker Metadata
33+
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
34+
id: meta
35+
with:
36+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
37+
tags: |
38+
# Tag event produce a semver tag. This will capture tags that begin
39+
# vX.Y.Z and X.Y.Z.
40+
type=semver,pattern={{version}},event=tag
41+
# All other push events (no PR, no semver tag), produce a SHA tag
42+
type=sha,format=long
43+
44+
- name: Determine Final Tag
45+
id: tags
46+
run: |
47+
ALL_TAGS="${{ steps.meta.outputs.tags }}"
48+
SEMVER_TAG=$(echo "$ALL_TAGS" | grep -E '^ghcr.io/.+:[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]+)?' || true)
49+
SHA_TAG=$(echo "$ALL_TAGS" | grep sha- || true)
50+
51+
if [ -n "$SEMVER_TAG" ]; then
52+
FINAL_TAG="$SEMVER_TAG"
53+
else
54+
FINAL_TAG="$SHA_TAG"
55+
fi
56+
57+
echo "SHA_TAG=$SHA_TAG" >> $GITHUB_OUTPUT
58+
echo "FINAL_TAG=$FINAL_TAG" >> $GITHUB_OUTPUT
59+
60+
- name: Debug Tags
61+
run: |
62+
echo "SHA_TAG: ${{ steps.tags.outputs.SHA_TAG }}"
63+
echo "FINAL_TAG: ${{ steps.tags.outputs.FINAL_TAG }}"
64+
1165
build:
66+
needs: tagging
1267
runs-on: ${{ matrix.runner }}
1368
strategy:
1469
matrix:
@@ -41,27 +96,25 @@ jobs:
4196
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
4297
id: meta
4398
with:
99+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
44100
tags: |
45101
type=sha,format=long
46-
type=ref,prefix=pr-,event=pr
47-
type=semver,pattern={{version}},event=tag
48-
type=semver,pattern={{major}}.{{minor}},event=tag
49-
type=semver,pattern={{major}},event=tag
50-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
51102
52103
- name: Build and push Docker image
53104
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
54105
with:
55106
file: Dockerfile
56-
tags: ${{ steps.meta.outputs.tags }}-${{ matrix.arch }}
107+
tags: ${{ needs.tagging.outputs.SHA_TAG }}-${{ matrix.arch }}
57108
push: true
58109
labels: ${{ steps.meta.outputs.labels }}
59110
cache-from: type=registry,ref=ghcr.io/datadog/lading:cache
60111
cache-to: type=registry,ref=ghcr.io/datadog/lading:cache,mode=max
61112

62113
manifest:
63114
name: Create Multi-Arch Manifest
64-
needs: build
115+
needs:
116+
- tagging
117+
- build
65118
runs-on: ubuntu-20.04
66119
permissions:
67120
contents: read
@@ -78,21 +131,9 @@ jobs:
78131
- name: Set up Docker Buildx
79132
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
80133

81-
- name: Extract Docker Metadata
82-
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
83-
id: meta
84-
with:
85-
tags: |
86-
type=sha,format=long
87-
type=ref,prefix=pr-,event=pr
88-
type=semver,pattern={{version}},event=tag
89-
type=semver,pattern={{major}}.{{minor}},event=tag
90-
type=semver,pattern={{major}},event=tag
91-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
92-
93134
- name: Create and Push Multiarch Manifest
94135
run: |
95136
docker buildx imagetools create \
96-
--tag ${{ steps.meta.outputs.tags }} \
97-
${{ steps.meta.outputs.tags }}-amd64 \
98-
${{ steps.meta.outputs.tags }}-arm64
137+
--tag "${{ needs.tagging.outputs.FINAL_TAG }}" \
138+
"${{ needs.tagging.outputs.SHA_TAG }}-amd64" \
139+
"${{ needs.tagging.outputs.SHA_TAG }}-arm64"

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

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

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lading/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "lading"
3-
version = "0.25.1"
3+
version = "0.25.2"
44
authors = [
55
"Brian L. Troutwine <[email protected]>",
66
"George Hahn <[email protected]>",

0 commit comments

Comments
 (0)