[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
|
kind: pipeline
|
||||||
name: build
|
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:
|
steps:
|
||||||
- name: build image
|
- name: build image
|
||||||
image: docker
|
image: plugins/docker
|
||||||
environment:
|
settings:
|
||||||
DOCKER_HOST: tcp://docker
|
repo: kleph/beer
|
||||||
USERNAME:
|
username:
|
||||||
from_secret: dockerhub_username
|
from_secret: dockerhub_username
|
||||||
PASSWORD:
|
password:
|
||||||
from_secret: dockerhub_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:
|
depends_on:
|
||||||
- lint
|
- lint
|
||||||
|
|
Loading…
Reference in a new issue