Compare commits
1 Commits
ec4c3c0413
...
feat/instg
| Author | SHA1 | Date | |
|---|---|---|---|
| acef3423b3 |
@@ -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
9
deploy/Jenkinsfile
vendored
@@ -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} .
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user