Browse Source

生成 tar

master
zhipeng.hu 1 year ago
parent
commit
52327f78c9
  1. 3
      .drone.yml
  2. 2
      main.go

3
.drone.yml

@ -31,6 +31,9 @@ steps:
dockerfile: Dockerfile dockerfile: Dockerfile
registry: https://registry.cn-hangzhou.aliyuncs.com registry: https://registry.cn-hangzhou.aliyuncs.com
tags: ${DRONE_BUILD_NUMBER} tags: ${DRONE_BUILD_NUMBER}
commands:
# - docker build -t registry.cn-hangzhou.aliyuncs.com/hvp/dpr:7 .
- docker save -o registry.cn-hangzhou.aliyuncs.com/huvipg/test-drone:${DRONE_BUILD_NUMBER}
when: when:
target: [ "" ] target: [ "" ]

2
main.go

@ -12,7 +12,7 @@ func main() {
r.GET("/", func(c *gin.Context) { r.GET("/", func(c *gin.Context) {
// 通过请求上下文对象Context, 直接往客户端返回一个json // 通过请求上下文对象Context, 直接往客户端返回一个json
c.JSON(200, gin.H{ c.JSON(200, gin.H{
"message": "pong1",
"message": "pong9",
}) })
}) })

Loading…
Cancel
Save