Skip to content

Commit

Permalink
feat(插件): 增加超时上下文
Browse files Browse the repository at this point in the history
  • Loading branch information
storezhang committed Apr 24, 2023
1 parent cfd162d commit b70eda5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
kind: secret
name: token_docker
get:
path: secrets
name: token_docker_dronestock
---

kind: secret
name: password_ccr
get:
path: secrets
name: password_ccr
---

kind: secret
name: token_github
get:
path: secrets
name: token_github_storezhang
---


kind: pipeline
type: docker
name: 发布
Expand All @@ -14,9 +36,11 @@ environment:
steps:
- name: 代码
image: ccr.ccs.tencentyun.com/dronestock/git
pull: always

- name: 编译
image: ccr.ccs.tencentyun.com/pangum/drone
pull: always
volumes:
- name: go
path: /var/lib/go
Expand All @@ -26,6 +50,7 @@ steps:

- name: 改变
image: ccr.ccs.tencentyun.com/dronestock/changelog
pull: always
when:
event:
- tag
Expand All @@ -34,6 +59,7 @@ steps:

- name: 发布
image: ccr.ccs.tencentyun.com/dronestock/github
pull: always
when:
event:
- tag
Expand Down
2 changes: 1 addition & 1 deletion base.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (b *Base) Cleanup() *cleanupBuilder {
}

func (b *Base) Elapsed() time.Duration {
return time.Now().Sub(b.started)
return time.Since(b.started)
}

func (b *Base) Command(command string) (builder *commandBuilder) {
Expand Down

0 comments on commit b70eda5

Please sign in to comment.