mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 16:32:31 +01:00
maintenance (upgrade): go 1.24
This commit is contained in:
parent
2dd23cf644
commit
e7097b402c
3 changed files with 6 additions and 17 deletions
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
|
|
@ -27,7 +27,7 @@ pipeline {
|
||||||
sh "npm install"
|
sh "npm install"
|
||||||
sh "make build_frontend"
|
sh "make build_frontend"
|
||||||
}
|
}
|
||||||
docker.image("golang:1.23-bookworm").inside("--user=root") {
|
docker.image("golang:1.24-bookworm").inside("--user=root") {
|
||||||
// prepare: todo - statically compile plg_image_c so we don't have to do this to pass the e2e tests
|
// prepare: todo - statically compile plg_image_c so we don't have to do this to pass the e2e tests
|
||||||
sh "sed -i 's|plg_image_c|plg_image_golang|' server/plugin/index.go"
|
sh "sed -i 's|plg_image_c|plg_image_golang|' server/plugin/index.go"
|
||||||
// build
|
// build
|
||||||
|
|
@ -42,7 +42,7 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
// smoke test
|
// smoke test
|
||||||
docker.image("golang:1.23-bookworm").inside("--user=root") {
|
docker.image("golang:1.24-bookworm").inside("--user=root") {
|
||||||
sh 'timeout 5 ./dist/filestash > access.log || code=$?; if [ $code -ne 124 ]; then exit $code; fi'
|
sh 'timeout 5 ./dist/filestash > access.log || code=$?; if [ $code -ne 124 ]; then exit $code; fi'
|
||||||
sh "cat access.log"
|
sh "cat access.log"
|
||||||
sh "cat access.log | grep -q \"\\[http\\] starting\""
|
sh "cat access.log | grep -q \"\\[http\\] starting\""
|
||||||
|
|
@ -62,7 +62,7 @@ pipeline {
|
||||||
// sh "cd public && npm run test"
|
// sh "cd public && npm run test"
|
||||||
}
|
}
|
||||||
// test backend
|
// test backend
|
||||||
docker.image("golang:1.23-bookworm").inside("--user=root") {
|
docker.image("golang:1.24-bookworm").inside("--user=root") {
|
||||||
sh "cp ./test/assets/* /tmp/"
|
sh "cp ./test/assets/* /tmp/"
|
||||||
sh "go generate ./test/unit_go/..."
|
sh "go generate ./test/unit_go/..."
|
||||||
sh "go get ./..."
|
sh "go get ./..."
|
||||||
|
|
@ -82,18 +82,7 @@ pipeline {
|
||||||
|
|
||||||
stage("Release") {
|
stage("Release") {
|
||||||
steps {
|
steps {
|
||||||
// amd64
|
sh "docker buildx build --platform linux/amd64,linux/arm64 -t machines/filestash:latest --push ./docker/"
|
||||||
sh "docker build --no-cache -t machines/filestash:latest-amd64 ./docker/"
|
|
||||||
sh "docker push machines/filestash:latest-amd64"
|
|
||||||
|
|
||||||
// // arm
|
|
||||||
// sh "docker buildx build --platform linux/arm64 -t machines/filestash:latest-arm64 ./docker/"
|
|
||||||
|
|
||||||
// create final image
|
|
||||||
sh "docker manifest rm machines/filestash:latest || true"
|
|
||||||
// sh "docker manifest create machines/filestash:latest --amend machines/filestash:latest-amd64 --amend machines/filestash:latest-arm64v8"
|
|
||||||
sh "docker manifest create machines/filestash:latest --amend machines/filestash:latest-amd64"
|
|
||||||
sh "docker manifest push machines/filestash:latest"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ RUN apk add make git gzip brotli && \
|
||||||
make build_frontend
|
make build_frontend
|
||||||
|
|
||||||
# STEP3: BUILD BACKEND
|
# STEP3: BUILD BACKEND
|
||||||
FROM golang:1.23-bookworm AS builder_backend
|
FROM golang:1.24-bookworm AS builder_backend
|
||||||
WORKDIR /home/filestash/
|
WORKDIR /home/filestash/
|
||||||
COPY --from=builder_frontend /home/filestash/ .
|
COPY --from=builder_frontend /home/filestash/ .
|
||||||
RUN apt-get update > /dev/null && \
|
RUN apt-get update > /dev/null && \
|
||||||
|
|
|
||||||
2
go.mod
2
go.mod
|
|
@ -1,6 +1,6 @@
|
||||||
module github.com/mickael-kerjean/filestash
|
module github.com/mickael-kerjean/filestash
|
||||||
|
|
||||||
go 1.23.0
|
go 1.24.0
|
||||||
|
|
||||||
require (
|
require (
|
||||||
cloud.google.com/go/storage v1.48.0
|
cloud.google.com/go/storage v1.48.0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue