Compare commits

1 Commits

Author SHA1 Message Date
acef3423b3 feat 阿里云观测平台 2026-01-24 18:08:36 +08:00
2 changed files with 12 additions and 2 deletions

View File

@@ -1,5 +1,10 @@
FROM alpine:3.23.2 FROM alpine:3.23.2
ENV ARMS_ENABLE=true
ENV ARMS_APP_NAME=gateway
ENV ARMS_REGION_ID=cn-chengdu
ENV ARMS_LICENSE_KEY=gys9jv7jqe@144a6fd684976b3
RUN apk add --no-cache tzdata && \ RUN apk add --no-cache tzdata && \
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
echo "Asia/Shanghai" > /etc/timezone echo "Asia/Shanghai" > /etc/timezone

9
deploy/Jenkinsfile vendored
View File

@@ -19,6 +19,7 @@ pipeline {
APP_NAME = 'service-gateway' APP_NAME = 'service-gateway'
GO_MOD_CACHE_DIR = '/home/pi/Desktop/docker/jenkins/caches/go-mod' GO_MOD_CACHE_DIR = '/home/pi/Desktop/docker/jenkins/caches/go-mod'
GO_BUILD_CACHE_DIR = '/home/pi/Desktop/docker/jenkins/caches/go-build' GO_BUILD_CACHE_DIR = '/home/pi/Desktop/docker/jenkins/caches/go-build'
INSTGO_CACHE_DIR = '/home/pi/Desktop/docker/jenkins/caches/instgo'
} }
options { options {
@@ -53,7 +54,7 @@ pipeline {
docker { docker {
image 'golang:1.24.0-alpine' image 'golang:1.24.0-alpine'
reuseNode true reuseNode true
args '-u root:root -v $GO_MOD_CACHE_DIR:/go/pkg/mod -v $GO_BUILD_CACHE_DIR:/root/.cache/go-build' args '-u root:root -v $GO_MOD_CACHE_DIR:/go/pkg/mod -v $GO_BUILD_CACHE_DIR:/root/.cache/go-build -v $INSTGO_CACHE_DIR:/root/instgo-caches'
} }
} }
steps { steps {
@@ -62,8 +63,12 @@ pipeline {
export CGO_ENABLED=0 export CGO_ENABLED=0
export GOOS=linux export GOOS=linux
export GOARCH=amd64 export GOARCH=amd64
export INSTGO_CACHE_DIR=/root/instgo-caches
go build -o ${env.APP_NAME} . wget "http://arms-apm-cn-chengdu.oss-cn-chengdu.aliyuncs.com/instgo/instgo-linux-arm64" -O instgo
chmod +x instgo
./instgo set --licenseKey=gys9jv7jqe@144a6fd684976b3
./instgo go build -o ${env.APP_NAME} .
""" """
} }
} }