33 lines
719 B
YAML
33 lines
719 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: default
|
|
|
|
steps:
|
|
- name: build
|
|
image: docker:stable-dind
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
environment:
|
|
DOCKER_USERNAME:
|
|
from_secret: DOCKER_USERNAME
|
|
DOCKER_PASSWORD:
|
|
from_secret: DOCKER_PASSWORD
|
|
commands:
|
|
- sleep 15
|
|
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
|
- docker build -t="$DRONE_REPO:$DRONE_BUILD_NUMBER" . && docker push "$DRONE_REPO:$DRONE_BUILD_NUMBER"
|
|
- docker build -t="$DRONE_REPO" . && docker push "$DRONE_REPO"
|
|
|
|
services:
|
|
- name: docker
|
|
image: docker:stable-dind
|
|
privileged: true
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
|
|
volumes:
|
|
- name: dockersock
|
|
temp: {}
|