-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
32 lines (30 loc) · 1.21 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
image: docker:stable
services:
- docker:dind
variables:
GITLAB_TAG: $CI_REGISTRY_IMAGE
HUB_TAG: prantlf/node-git-chromium-java
build:
script:
- |
docker run --rm -i \
-v "${PWD}"/.hadolint.yaml:/.config/hadolint.yaml \
hadolint/hadolint < Dockerfile.8
docker run --rm -i \
-v "${PWD}"/.hadolint.yaml:/.config/hadolint.yaml \
hadolint/hadolint < Dockerfile.11
- docker build -t $GITLAB_TAG -f Dockerfile.8 .
- docker tag $GITLAB_TAG $GITLAB_TAG:lts-alpine-java8
- docker tag $GITLAB_TAG $HUB_TAG:lts-alpine-java8
- docker build -t $GITLAB_TAG -f Dockerfile.11 .
- docker tag $GITLAB_TAG $GITLAB_TAG:lts-alpine-openjdk
- docker tag $GITLAB_TAG $HUB_TAG:lts-alpine-openjdk
- echo -n "$CI_REGISTRY_PASSWORD" | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY
- docker push $GITLAB_TAG:lts-alpine-java8
- docker push $GITLAB_TAG:lts-alpine-openjdk
- |
mkdir -p $HOME/.docker
echo '{ "auths": { "'https://index.docker.io/v1/'": { "auth": "'$DOCKER_AUTH'", "email": "prantlf@gmail.com" } } }' \
> $HOME/.docker/config.json
- docker push $HUB_TAG:lts-alpine-java8
- docker push $HUB_TAG:lts-alpine-openjdk