30 lines
587 B
YAML
30 lines
587 B
YAML
|
---
|
||
|
.install-make: &install-make
|
||
|
- apk add --no-cache make
|
||
|
|
||
|
.docker-build-setup:
|
||
|
image: docker:19.03.8
|
||
|
services:
|
||
|
- docker:19.03.8-dind
|
||
|
|
||
|
.dockerfile-lint:
|
||
|
stage: test
|
||
|
image: hadolint/hadolint:v1.18.0-alpine
|
||
|
script:
|
||
|
- hadolint ${DOCKERFILE}
|
||
|
|
||
|
.dockerbuild-test:
|
||
|
stage: test
|
||
|
extends: .docker-build-setup
|
||
|
before_script:
|
||
|
- *install-make
|
||
|
|
||
|
.docker-publish:
|
||
|
stage: publish
|
||
|
extends: .docker-build-setup
|
||
|
before_script:
|
||
|
- *install-make
|
||
|
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
|
||
|
after_script:
|
||
|
- docker logout ${CI_REGISTRY}
|