Skip to content

Commit 8a0c99f

Browse files
authored
Merge branch 'master' into set-final
2 parents 59f33f6 + 7065817 commit 8a0c99f

5 files changed

Lines changed: 231 additions & 0 deletions

File tree

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Q Release Test
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_type:
7+
description: "Release type"
8+
required: true
9+
default: "release"
10+
type: choice
11+
options:
12+
- release
13+
- edge
14+
version_tag:
15+
description: "Version tag (e.g., v1.5.0)"
16+
required: true
17+
type: string
18+
19+
pull_request:
20+
branches:
21+
- master
22+
23+
concurrency:
24+
group: ${{ github.workflow }}-${{ github.ref }}
25+
cancel-in-progress: true
26+
27+
jobs:
28+
release-test:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
36+
- name: Set up QEMU
37+
uses: docker/setup-qemu-action@v3
38+
39+
- name: Setup Go
40+
uses: actions/setup-go@v6
41+
with:
42+
go-version-file: "go.mod"
43+
cache: false
44+
45+
- name: Configure git
46+
run: |
47+
git config --global user.name "MinIO Bot"
48+
git config --global user.email "dev@min.io"
49+
50+
- name: Install Just
51+
uses: extractions/setup-just@v3
52+
with:
53+
github-token: ${{ secrets.GITHUB_TOKEN }}
54+
55+
- name: Install Q Release Toolkit
56+
run: |
57+
curl -fsSL https://dl.min.io/download-info/qreleaser.tar.zst -o /tmp/qreleaser.tar.zst
58+
tar --zstd -xf /tmp/qreleaser.tar.zst -C /tmp/
59+
echo y | just -f /tmp/qreleaser/Justfile install
60+
echo "$HOME/.local/bin" >> $GITHUB_PATH
61+
qreleaser setup-deps --install
62+
63+
- name: Determine release type and version
64+
id: release-type
65+
run: |
66+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
67+
echo "type=${{ inputs.release_type }}" >> $GITHUB_OUTPUT
68+
echo "version=${{ inputs.version_tag }}" >> $GITHUB_OUTPUT
69+
else
70+
# For PRs, use a test version
71+
echo "type=release" >> $GITHUB_OUTPUT
72+
echo "version=v10.0.0" >> $GITHUB_OUTPUT
73+
fi
74+
75+
- name: Run Q Release (Test Mode)
76+
env:
77+
CI: "1"
78+
DEBUG: "1"
79+
Q_CI_SRC_DIR: ${{ github.workspace }}
80+
Q_VERSION_TAG: ${{ steps.release-type.outputs.version }}
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
run: |
83+
qreleaser main ${{ github.repository }} ${{ steps.release-type.outputs.type }}
84+
85+
- name: Verify Release Artifacts
86+
run: |
87+
find ${{ github.workspace }}/warp-release -type f
88+
${{ github.workspace }}/warp-release/${{ steps.release-type.outputs.type }}/linux-amd64/warp --version
89+
90+
- name: Upload Artifacts
91+
uses: actions/upload-artifact@v4
92+
if: always()
93+
with:
94+
name: release-artifacts-${{ steps.release-type.outputs.type }}
95+
path: warp-release/
96+
retention-days: 7

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ dist
1717

1818
# zst files
1919
*.zst
20+
21+
# qreleaser state file
22+
.release-state.sh

.goreleaser/qreleaser.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# GoReleaser configuration for qreleaser builds
2+
# This config is used by qreleaser (not the existing .goreleaser.yml for GitHub releases)
3+
version: 2
4+
5+
snapshot:
6+
version_template: "{{ .Env.VERSION_TAG }}"
7+
8+
builds:
9+
- id: warp
10+
main: ./
11+
binary: warp
12+
env:
13+
- CGO_ENABLED=0
14+
goos:
15+
- linux
16+
- darwin
17+
- windows
18+
goarch:
19+
- amd64
20+
- arm64
21+
ignore:
22+
- goos: windows
23+
goarch: arm64
24+
flags:
25+
- -trimpath
26+
- --tags=kqueue
27+
ldflags:
28+
# Match existing .goreleaser.yml ldflags format
29+
- -s -w
30+
- -X github.com/minio/warp/pkg.ReleaseTag={{ .Version }}
31+
- -X github.com/minio/warp/pkg.CommitID={{ .FullCommit }}
32+
- -X github.com/minio/warp/pkg.Version={{ .Version }}
33+
- -X github.com/minio/warp/pkg.ShortCommitID={{ .ShortCommit }}
34+
- -X github.com/minio/warp/pkg.ReleaseTime={{ .Date }}
35+
hooks:
36+
post: sh -c "cd $(dirname {{ .Path }}) && sha256sum $(basename {{ .Path }}) > $(basename {{ .Path }}).sha256sum"
37+
38+
archives:
39+
- id: warp-archive
40+
formats: [binary]
41+
42+
checksum:
43+
disable: true
44+
45+
binary_signs:
46+
- id: minisign
47+
cmd: minisign
48+
signature: "${artifact}.minisig"
49+
args:
50+
- "-qQS"
51+
- "-m"
52+
- "${artifact}"
53+
- "-x"
54+
- "${signature}"
55+
- "-s"
56+
- '{{ envOrDefault "CREDS_DIR" ".q-test-creds" }}/minisign.key'
57+
stdin: '{{ mustReadFile (printf "%s/minisign-passphrase" (envOrDefault "CREDS_DIR" ".q-test-creds")) }}'
58+
artifacts: binary
59+
60+
- id: gpg
61+
cmd: gpg
62+
signature: "${artifact}.asc"
63+
args:
64+
- "--quiet"
65+
- "--batch"
66+
- "--detach-sign"
67+
- "-a"
68+
- "--output"
69+
- "${signature}"
70+
- "${artifact}"
71+
artifacts: binary
72+
73+
release:
74+
disable: true
75+
76+
announce:
77+
skip: true

.qreleaser.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# qreleaser configuration for warp
2+
# This file controls the v2 release system behavior
3+
4+
# Binary configuration
5+
binary_name: warp
6+
goreleaser_config: .goreleaser/qreleaser.yaml
7+
8+
# Versioning - warp uses semantic versions (v1.4.0) not date-based
9+
use_semver: true # Requires Q_VERSION_TAG env var
10+
11+
# Distribution
12+
dl_upload_enabled: true # Upload binaries to dl.min.io
13+
14+
# Container images
15+
containers:
16+
image:
17+
- quay.io/minio/aistor/warp
18+
archs: [amd64, arm64]
19+
fips_enabled: false
20+
dockerfile: Dockerfile.v2.release
21+
22+
# Package generation (deb/rpm/apk via pkger)
23+
packaging:
24+
enabled: true
25+
app_name: warp
26+
license: "AGPLv3"
27+
service_file:
28+
url: https://raw.githubusercontent.com/minio/warp/master/systemd/warp.service
29+
dest: warp.service

Dockerfile.v2.release

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM alpine:latest
2+
3+
ARG TARGETARCH
4+
ARG RELEASE
5+
ARG RELEASE_TYPE=release
6+
7+
LABEL name="Warp" \
8+
vendor="MinIO Inc <dev@min.io>" \
9+
maintainer="MinIO Inc <dev@min.io>" \
10+
version="${RELEASE}" \
11+
org.opencontainers.image.source="https://github.com/minio/warp" \
12+
summary="Warp is a S3 API Benchmark Tool" \
13+
description="Warp is a high-performance S3 benchmarking tool for testing object storage systems."
14+
15+
# Install ca-certificates
16+
RUN apk add -U --no-cache ca-certificates
17+
18+
# Copy warp binary and signature files from local Q layout
19+
# Expected context: warp-release/{release,edge}/linux-{amd64,arm64}/
20+
COPY --chmod=755 warp-release/${RELEASE_TYPE}/linux-${TARGETARCH}/warp.${RELEASE} /warp
21+
COPY warp-release/${RELEASE_TYPE}/linux-${TARGETARCH}/warp.${RELEASE}.sha256sum /warp.sha256sum
22+
COPY warp-release/${RELEASE_TYPE}/linux-${TARGETARCH}/warp.${RELEASE}.minisig /warp.minisig
23+
24+
EXPOSE 7761
25+
26+
ENTRYPOINT ["/warp"]

0 commit comments

Comments
 (0)