Skip to content

Commit 0803b03

Browse files
committed
Merge branch 'main' into release
2 parents ad9ced9 + a4360c6 commit 0803b03

File tree

5 files changed

+25
-26
lines changed

5 files changed

+25
-26
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@ jobs:
1414
build:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/setup-go@v5
17+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
1818
with:
1919
go-version: "stable"
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
2121
- name: Build
2222
run: make
2323
# Run static/code-quality checks
2424
check:
2525
runs-on: ubuntu-latest
2626
steps:
27-
- uses: actions/setup-go@v5
27+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
2828
with:
2929
go-version: "stable"
30-
- uses: actions/checkout@v4
30+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
3131
- name: Install build tools
3232
run: make build-tools
3333
- name: Run checks
@@ -36,7 +36,7 @@ jobs:
3636
runs-on: ubuntu-latest
3737
if: github.event_name == 'pull_request'
3838
steps:
39-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
4040
with:
4141
fetch-depth: 0
4242
ref: ${{ github.event.pull_request.head.sha }}
@@ -48,10 +48,10 @@ jobs:
4848
needs: [build, check]
4949
runs-on: ubuntu-latest
5050
steps:
51-
- uses: actions/setup-go@v5
51+
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00
5252
with:
5353
go-version: "stable"
54-
- uses: actions/checkout@v4
54+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
5555
- name: Run tests
5656
run: make test
5757
podmanbuild:
@@ -60,7 +60,7 @@ jobs:
6060
# image build step, so no need to do it twice.
6161
if: github.event_name == 'pull_request'
6262
steps:
63-
- uses: actions/checkout@v4
63+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
6464
- name: Install fuse-overlayfs
6565
run: sudo apt-get -y install fuse-overlayfs
6666
- name: Setup podman config
@@ -88,7 +88,7 @@ jobs:
8888
# image build step, so no need to do it twice.
8989
if: github.event_name == 'pull_request'
9090
steps:
91-
- uses: actions/checkout@v4
91+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
9292
- name: build container image
9393
# note: forcing use of podman here since we are
9494
# using podman explicitly for the push job
@@ -99,7 +99,7 @@ jobs:
9999
runs-on: ubuntu-latest
100100
if: github.event_name == 'push'
101101
steps:
102-
- uses: actions/checkout@v4
102+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
103103
- name: log in to quay.io
104104
# using docker for now, since podman has an issue with space
105105
# consumption: image build fails with no space left on device...

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
# Args
21
ARG BASE_IMG="quay.io/samba.org/samba-server:latest"
2+
3+
# Build smbmetrics
4+
FROM docker.io/golang:1.25 AS builder
35
ARG GIT_VERSION="(unset)"
46
ARG COMMIT_ID="(unset)"
57
ARG ARCH=""
68

7-
# Build smbmetrics
8-
FROM docker.io/golang:1.24 AS builder
9-
109
WORKDIR /workspace
1110
# Copy the Go Modules manifests
1211
COPY go.mod go.mod

docs/release-process.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,17 @@ git merge main
2525
```
2626

2727
Now we need to "pin" the appropriate version of the samba-server container
28-
dependency. Edit `Dockerfile` and change the tag part of the "FROM" line with
29-
the `quay.io/samba.org/samba-server` image repository to use the latest
30-
released samba-server tag.
28+
dependency. Ensure that you use the proper base samba-server image (default:
29+
`quay.io/samba.org/samba-server`) and latest released samba-server tag.
3130

3231
At this point, an optional but recommended step is to do a test build before
33-
tagging. Run `make image-build`.
32+
tagging. Run `make BASE_IMG_TAG=v0.7 image-build`.
3433

3534
If you are happy with the content of the `release` branch, tag it. Example:
3635

3736
```
3837
git checkout release
39-
git tag -a -m 'Release v0.5' v0.5
38+
git tag -a -m 'Release v0.7' v0.7
4039
```
4140

4241
This creates an annotated tag. Release tags must be annotated tags.
@@ -53,18 +52,19 @@ is recommended to purge your local container engine of cached images
5352

5453
Build the images from scratch. Example:
5554
```
56-
make image-build
55+
make BASE_IMG_TAG=v0.7 image-build
5756
```
5857

5958
For the image that was just built, apply a temporary pre-release tag
6059
to it. Example:
6160
```
62-
podman tag quay.io/samba.org/samba-metrics:{latest,v0.5pre1}
61+
export IMG_TAG=v0.7
62+
podman tag quay.io/samba.org/samba-metrics:{${IMG_TAG},${IMG_TAG}pre1}
6363
```
6464

6565
Log into quay.io. Push the images to quay.io using the temporary tag. Example:
6666
```
67-
podman push quay.io/samba.org/samba-metrics:{latest,v0.5pre1}
67+
podman push quay.io/samba.org/samba-metrics:{${IMG_TAG},${IMG_TAG}pre1}
6868
```
6969

7070
Wait for the security scan to complete. There shouldn't be any issues if you
@@ -100,8 +100,8 @@ Use the following partial snippet as an example:
100100
101101
Images built for this release can be obtained from the quay.io image registry.
102102
103-
* By tag: quay.io/samba.org/samba-metrics:v0.5
104-
* By digest: quay.io/samba.org/samba-metrics@sha256:09c867343af39b237230f94a734eacc8313f2330c7d934994522ced46b740715
103+
* By tag: quay.io/samba.org/samba-metrics:v0.7
104+
* By digest: quay.io/samba.org/samba-metrics@sha256:aaaa17c124ca310177abc00bcb9c3a0cf20e52c8728afee13cd66eb7e472b164
105105
```
106106
... using the image that was pushed earlier
107107

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/samba-in-kubernetes/smbmetrics
22

3-
go 1.23.0
3+
go 1.24.0
44

55
require (
66
github.com/go-logr/logr v1.2.3

hack/install-tools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ _install_revive() {
4646
}
4747

4848
_install_golangci_lint() {
49-
_install_tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6
49+
_install_tool github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.6.1
5050
}
5151

5252
_install_yq() {

0 commit comments

Comments
 (0)