forked from blacklabelops/logrotate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
35 lines (33 loc) · 1.25 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
workspace:
base: /opt/airwallex
path: logrotate
pipeline:
publish:
image: plugins/docker
repo: ${AIRWALLEX_DEV_REGISTRY}/logrotate
tags:
- ${DRONE_REPO_BRANCH/\//-}-${DRONE_BUILD_NUMBER}
- latest
secrets: [ docker_username, docker_password, airwallex_dev_registry ]
dockerfile: Dockerfile
retag-containers:
image: ${AIRWALLEX_DEV_REGISTRY}/awx-docker-tag:latest
pull: true
tags:
- ${DRONE_REPO_BRANCH//\//-}-${DRONE_BUILD_NUMBER}
release_registry: ${AIRWALLEX_REGISTRY}
registry: ${${AIRWALLEX_DEV_REGISTRY}}
aliyun_region_filters:
- ap-southeast-2
enable_push_release: true
secrets: [ airwallex_dev_registry, airwallex_registry ]
docker_agent: unix:///var/run/docker.sock
volumes:
- /var/run/docker.sock:/var/run/docker.sock
images:
- logrotate
secrets: [ docker_username, docker_password, airwallex_dev_registry ]
commands:
- DOCKER_HOST="$PLUGIN_DOCKER_AGENT" docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD} ${AIRWALLEX_DEV_REGISTRY}
- /entrypoint.sh retag || (DOCKER_HOST="$PLUGIN_DOCKER_AGENT" docker logout ${AIRWALLEX_DEV_REGISTRY} && exit 1)
- DOCKER_HOST="$PLUGIN_DOCKER_AGENT" docker logout ${${AIRWALLEX_DEV_REGISTRY}}