grim/gf2b
Clone
Summary
Browse
Changes
Graph
The push task needs the same environment variables as the build task
draft
2019-05-25, Gary Kramlich
bb2efaa4e4db
The push task needs the same environment variables as the build task
environment
:
-
TAG=latest
-
REGISTRY_USERNAME
-
REGISTRY_PASSWORD
-
REGISTRY_HOST=docker.io
tasks
:
import
:
type
:
docker/import
files
:
.:.
build
:
type
:
docker/build
dockerfile
:
${DOCKERFILE}
tags
:
${REGISTRY_HOST}/${REPO}:${TAG}
push
:
type
:
docker/push
image
:
${REGISTRY_HOST}/${REPO}:${TAG}
login
:
type
:
docker/login
server
:
${REGISTRY_HOST}
username
:
${REGISTRY_USERNAME}
password
:
${REGISTRY_PASSWORD}
logout
:
type
:
docker/logout
server
:
${REGISTRY_HOST}
plans
:
default
:
stages
:
-
tasks
:
[
import
]
-
environment
:
[
DOCKERFILE=Dockerfile.fail2ban
,
REPO=rwgrim/gf2b-fail2ban
]
tasks
:
[
build
]
cicd
:
stages
:
-
tasks
:
[
login
,
import
]
-
environment
:
[
DOCKERFILE=Dockerfile.fail2ban
,
REPO=rwgrim/gf2b-fail2ban
]
tasks
:
[
build
,
push
]
-
tasks
:
[
logout
]
run
:
always