dotfiles/.gitlab-ci.yml

66 lines
1.8 KiB
YAML
Raw Normal View History

2019-01-20 16:03:40 +00:00
image:fedora:
stage: build
2019-01-20 16:10:14 +00:00
image: docker:stable
services:
- docker:dind
2019-01-20 16:20:01 +00:00
before_script:
2019-01-20 16:09:21 +00:00
- docker info
2019-01-20 16:20:01 +00:00
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
script:
- docker pull $CONTAINER_IMAGE:latest || true
2019-01-20 16:39:51 +00:00
- docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:$CI_COMMIT_SHA --tag $CONTAINER_IMAGE:latest ./fedora/
2019-01-20 16:20:01 +00:00
- docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA
- docker push $CONTAINER_IMAGE:latest
2019-01-20 16:10:14 +00:00
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
2019-01-20 16:20:01 +00:00
CONTAINER_IMAGE: registry.gitlab.com/$CI_PROJECT_PATH/fedora
2019-01-20 16:03:40 +00:00
image:ubuntu:
stage: build
2019-01-20 16:10:14 +00:00
image: docker:stable
services:
- docker:dind
2019-01-20 16:20:01 +00:00
before_script:
2019-01-20 16:10:14 +00:00
- docker info
2019-01-20 16:20:01 +00:00
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com
script:
- docker pull $CONTAINER_IMAGE:latest || true
2019-01-20 16:39:51 +00:00
- docker build --cache-from $CONTAINER_IMAGE:latest --tag $CONTAINER_IMAGE:$CI_COMMIT_SHA --tag $CONTAINER_IMAGE:latest ./ubuntu/
2019-01-20 16:20:01 +00:00
- docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA
- docker push $CONTAINER_IMAGE:latest
2019-01-20 16:10:14 +00:00
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
2019-01-20 16:20:01 +00:00
CONTAINER_IMAGE: registry.gitlab.com/$CI_PROJECT_PATH/ubuntu
2019-01-20 16:03:40 +00:00
2019-01-20 12:25:43 +00:00
fedora:
2019-01-20 12:53:14 +00:00
before_script:
- apk add bash
2019-01-20 13:09:46 +00:00
script: ./test.sh
2019-01-20 12:34:54 +00:00
image: docker:stable
services:
- docker:dind
variables:
DETECTED_OS: fedora:29
DOCKER_IMAGE: cyplo/fedora29_base
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
2019-01-20 16:03:40 +00:00
dependencies:
- image:fedora
2019-01-20 12:25:43 +00:00
ubuntu:
2019-01-20 12:53:14 +00:00
before_script:
- apk add bash
2019-01-20 13:09:46 +00:00
script: ./test.sh
2019-01-20 12:34:54 +00:00
image: docker:stable
services:
- docker:dind
2019-01-20 12:25:43 +00:00
variables:
2019-01-20 12:34:54 +00:00
DETECTED_OS: ubuntu:cosmic
DOCKER_IMAGE: cyplo/cosmic_base
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
2019-01-20 16:03:40 +00:00
dependencies:
- image:ubuntu