[CI] Use drone plugin to build docker image
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
5dcbec2448
commit
8db37c73f7
1 changed files with 27 additions and 17 deletions
44
.drone.yml
44
.drone.yml
|
@ -32,28 +32,38 @@ steps:
|
|||
---
|
||||
kind: pipeline
|
||||
name: build
|
||||
#
|
||||
#steps:
|
||||
#- name: build image
|
||||
# image: docker
|
||||
# environment:
|
||||
# DOCKER_HOST: tcp://docker
|
||||
# USERNAME:
|
||||
# from_secret: dockerhub_username
|
||||
# PASSWORD:
|
||||
# from_secret: dockerhub_password
|
||||
# commands:
|
||||
# - docker build -t kleph/beer .
|
||||
# - docker login -u $USERNAME -p $PASSWORD
|
||||
# - docker image push kleph/beer
|
||||
#
|
||||
#services:
|
||||
#- name: docker
|
||||
# image: docker:dind
|
||||
# environment:
|
||||
# DOCKER_TLS_CERTDIR: ""
|
||||
# command: ["--storage-driver=vfs", "--tls=false"]
|
||||
# privileged: true
|
||||
|
||||
steps:
|
||||
- name: build image
|
||||
image: docker
|
||||
environment:
|
||||
DOCKER_HOST: tcp://docker
|
||||
USERNAME:
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: kleph/beer
|
||||
username:
|
||||
from_secret: dockerhub_username
|
||||
PASSWORD:
|
||||
password:
|
||||
from_secret: dockerhub_password
|
||||
commands:
|
||||
- docker build -t kleph/beer .
|
||||
- docker login -u $USERNAME -p $PASSWORD
|
||||
- docker image push kleph/beer
|
||||
|
||||
services:
|
||||
- name: docker
|
||||
image: docker:dind
|
||||
environment:
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
command: ["--storage-driver=vfs", "--tls=false"]
|
||||
privileged: true
|
||||
|
||||
depends_on:
|
||||
- lint
|
||||
|
|
Loading…
Reference in a new issue