feat 编译时插桩

This commit is contained in:
2026-01-24 12:24:00 +08:00
parent ad9895fa8a
commit ece659019e

31
deploy/Jenkinsfile vendored
View File

@@ -57,25 +57,28 @@ pipeline {
} }
} }
steps { steps {
script { sh """
// def goPath = sh(script: 'go env GOPATH', returnStdout: true).trim() echo "=== 当前环境 ==="
// def orchestrionPath = "${goPath}/bin/orchestrion" echo "PATH: \$PATH"
sh """ echo "PWD: \$(pwd)"
export GOPROXY=https://goproxy.cn,direct
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=amd64
export PATH=\$PATH:/go/bin export GOPROXY=https://goproxy.cn,direct
go install github.com/DataDog/orchestrion@v1.7.0 export CGO_ENABLED=0
export GOOS=linux
export GOARCH=amd64
export PATH=\$PATH:/go/bin
go install github.com/DataDog/orchestrion@v1.7.0
echo "=== 查找 orchestrion ==="
which orchestrion || echo "which: not found"
find /go -name orchestrion 2>/dev/null
ls -la /go/bin/ 2>/dev/null || echo "/go/bin 不存在"
orchestrion pin orchestrion pin
orchestrion go build -o ${env.APP_NAME} . orchestrion go build -o ${env.APP_NAME} .
""" """
}
} }
} }