Create new image for CI

Create a new image to be used for CI, this will be used for testing,
building and uploading to s3.

Put the extra files inside of the `.gitlab` directory to prevent any
conflicts since this is a fork of a project.
parent ad73618d
Pipeline #86280084 passed with stages
in 8 minutes and 43 seconds
image: docker
image: docker:19.03.2
stages:
- prepare
- validate
- build
services:
- docker:dind
variables:
USE_CONTAINER: "true"
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay
CI_IMAGE: registry.gitlab.com/gitlab-org/ci-cd/docker-machine/ci:alpine3.10
before_script:
- apk add -U make bash
.docker_in_docker:
services:
- docker:19.03.2-dind
variables:
DOCKER_HOST: tcp://docker:2376/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: "/certs"
tags:
- docker
.build_base: &build_base
extends:
- .docker_in_docker
stage: build
before_script:
- apk add -U make bash
......@@ -27,8 +33,6 @@ before_script:
paths:
- bin/
expire_in: 1 week
tags:
- docker
.build_validate: &build_validate
<<: *build_base
......@@ -39,6 +43,20 @@ before_script:
<<: *build_base
script: make build-x
prepare CI image:
extends:
- .docker_in_docker
stage: prepare
script:
- docker build --pull --no-cache -t ${CI_IMAGE} -f ./.gitlab/ci/Dockerfile ./.gitlab/ci/
- docker login --username ${CI_REGISTRY_USER} --password ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
- docker push ${CI_IMAGE}
- docker logout ${CI_REGISTRY}
only:
changes:
- ./gitlab/ci/Dockerfile
- .gitlab-ci.yml
darwin amd64: *build_x
linux amd64: *build_validate
openbsd amd64: *build_x
......
FROM golang:1.13-alpine3.10
RUN apk add --no-cache make git py-pip bash curl && \
pip install awscli
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment