Compare commits
No commits in common. "78719a6bb1a3ba7800ef56fbf2198a586efbb4bf" and "0acb114bb8a1d3842610dcba5c81d3a7bc97b1cf" have entirely different histories.
78719a6bb1
...
0acb114bb8
37
.drone.yml
37
.drone.yml
@ -10,12 +10,12 @@ steps:
|
|||||||
- name: BuildToRegistry
|
- name: BuildToRegistry
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: registry.cn-shanghai.aliyuncs.com
|
registry: registry.cn-hangzhou.aliyuncs.com
|
||||||
repo: registry.cn-shanghai.aliyuncs.com/docker-echo
|
repo: registry.cn-hangzhou.aliyuncs.com/hyxc_dev/scale_manager
|
||||||
username:
|
username:
|
||||||
from_secret: xs765911
|
from_secret: registry_username
|
||||||
password:
|
password:
|
||||||
from_secret: loser7659
|
from_secret: registry_password
|
||||||
use_cache: true
|
use_cache: true
|
||||||
# event为push且分支为master的时候,自动打latest,为tag则会根据tag自动生成
|
# event为push且分支为master的时候,自动打latest,为tag则会根据tag自动生成
|
||||||
tag:
|
tag:
|
||||||
@ -24,3 +24,32 @@ steps:
|
|||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- "success"
|
- "success"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: BuildProd
|
||||||
|
|
||||||
|
trigger:
|
||||||
|
event: [tag]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: BuildToRegistry
|
||||||
|
image: plugins/docker
|
||||||
|
# depends_on:
|
||||||
|
# - CheckCode
|
||||||
|
settings:
|
||||||
|
registry: registry.cn-hangzhou.aliyuncs.com
|
||||||
|
repo: registry.cn-hangzhou.aliyuncs.com/hyxc/scale_manager
|
||||||
|
username:
|
||||||
|
from_secret: registry_username
|
||||||
|
password:
|
||||||
|
from_secret: registry_password
|
||||||
|
use_cache: true
|
||||||
|
# event为push且分支为master的时候,自动打latest,为tag则会根据tag自动生成
|
||||||
|
auto_tag: true
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- "success"
|
10
Dockerfile
10
Dockerfile
@ -1,10 +0,0 @@
|
|||||||
FROM golang:1.18 as builder
|
|
||||||
WORKDIR /build
|
|
||||||
COPY . .
|
|
||||||
RUN CGO_ENABLED=0 GOPROXY=https://proxy.golang.com.cn,direct go build -o demo
|
|
||||||
FROM alpine:3.10 as runner
|
|
||||||
LABEL description="the image is a demo"
|
|
||||||
WORKDIR /app
|
|
||||||
COPY --from=builder /build/demo /app/
|
|
||||||
EXPOSE 8080
|
|
||||||
ENTRYPOINT ["./demo"]
|
|
Loading…
Reference in New Issue
Block a user