编程语言/Drone/plugins/docker:修订间差异
来自康健生活
创建页面,内容为“== 标题文本 == == 标题文本 == <syntaxhighlight lang="yaml">kind: pipeline name: api steps: # api unit test - name: api-test image: node:11 depends_on: [clone] commands: - cd ./api/ - npm install --registry https://registry.npm.taobao.org - cd ./dgc_sdk && npm install --production - cd .. && npm run test # web lint - name: web-lint image: node:10.15.1 depends_on: [clone] commands: - cd ./web…” |
|||
| 第1行: | 第1行: | ||
== 标题文本 == | == 标题文本 == | ||
<syntaxhighlight lang="yaml"> | |||
- name: push-docker-staging | |||
image: plugins/docker | |||
settings: | |||
repo: allovince/xxx | |||
username: allovince | |||
password: | |||
from_secret: DOCKER_PASSWORD | |||
tag: | |||
- staging | |||
- sha_${DRONE_COMMIT_SHA} | |||
when: | |||
branch: master | |||
event: push | |||
- name: semantic-release | |||
image: gtramontina/semantic-release:15.13.3 | |||
environment: | |||
GITHUB_TOKEN: | |||
from_secret: GITHUB_TOKEN | |||
entrypoint: | |||
- semantic-release | |||
when: | |||
branch: master | |||
event: push | |||
- name: push-docker-production | |||
image: plugins/docker | |||
environment: | |||
DOCKER_PASSWORD: | |||
from_secret: DOCKER_PASSWORD | |||
commands: | |||
- docker -v | |||
- nohup dockerd & | |||
- docker login -u allovince -p ?{DOCKER_PASSWORD} | |||
- docker pull allovince/xxx:sha_?{DRONE_COMMIT_SHA} | |||
- docker tag allovince/xxx:sha_?{DRONE_COMMIT_SHA} allovince/xxx:?{DRONE_TAG} | |||
- docker push allovince/xxx:?{DRONE_TAG} | |||
when: | |||
event: tag | |||
privileged: true</syntaxhighlight> | |||
== 标题文本 == | == 标题文本 == | ||
<syntaxhighlight lang="yaml">kind: pipeline | <syntaxhighlight lang="yaml">kind: pipeline | ||