Commit 174c1792 authored by Oscar Leijendekker's avatar Oscar Leijendekker

CI pipeline with own container image

parent 04fcd7e0
Pipeline #71036379 failed with stages
in 2 minutes and 49 seconds
stages:
- build-requirements
- build
variables:
DOCKER_DRIVER: overlay2
BUILD_ENV_IMAGE_TAG: registry.gitlab.com/drbearhands/haskell-tutorial/buildenv
BUILD_ENV_IMAGE_TAG_VERSIONED: ${BUILD_ENV_IMAGE_TAG}:${CI_COMMIT_SHA}
build-environment:
stage: build-requirements
when: manual
image: docker:latest
services:
- docker:dind
script:
- docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} registry.gitlab.com
- docker build -f dockerfiles/buildenv -t ${BUILD_ENV_IMAGE_TAG} .
- docker tag ${BUILD_ENV_IMAGE_TAG} ${BUILD_ENV_IMAGE_TAG_VERSIONED}
#push twice, both latest and versioned tags
- docker push ${BUILD_ENV_IMAGE_TAG}
- docker push ${BUILD_ENV_IMAGE_TAG_VERSIONED}
build-backend:
stage: build
image: ${BUILD_ENV_IMAGE_TAG}:latest
script:
- stack build --system-ghc
FROM alpine:latest
ENV PATH ${PATH}:/root/.cabal/bin:/root/.local/bin
RUN apk add --no-cache ghc curl musl-dev zlib-dev postgresql-dev
RUN curl -sSL https://get.haskellstack.org/ | sh
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