feat 编译时插桩
This commit is contained in:
8
deploy/Jenkinsfile
vendored
8
deploy/Jenkinsfile
vendored
@@ -56,14 +56,18 @@ pipeline {
|
|||||||
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'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
environment {
|
||||||
|
// 将 Go 的 bin 目录添加到 PATH 中
|
||||||
|
PATH = "$PATH:${sh(script: 'go env GOPATH', returnStdout: true).trim()}/bin"
|
||||||
|
}
|
||||||
steps {
|
steps {
|
||||||
sh """
|
sh """
|
||||||
export GOPROXY=https://goproxy.cn,direct
|
export GOPROXY=https://goproxy.cn,direct
|
||||||
export CGO_ENABLED=0
|
export CGO_ENABLED=0
|
||||||
export GOOS=linux
|
export GOOS=linux
|
||||||
export GOARCH=amd64
|
export GOARCH=amd64
|
||||||
go install github.com/DataDog/orchestrion@latest
|
go install github.com/DataDog/orchestrion@v1.7.0
|
||||||
orchestrion go build -o ${env.APP_NAME} .
|
go build -toolexec="orchestrion toolexec" -o ${env.APP_NAME} .
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user