Commit 5ff758e0 authored by Krzysztof Jurewicz's avatar Krzysztof Jurewicz

Run tests inside a generated container

Also upgrade Erlang version used in container.
parent 397e09e5
Pipeline #26035926 passed with stages
in 12 minutes and 22 seconds
stages:
- test
- build
- test
- release
image: erlang:20
image: docker:latest
services:
- docker:dind
variables:
GIT_DEPTH: "3"
CONTAINER_REF_IMAGE: ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}
CONTAINER_LATEST_IMAGE: ${CI_REGISTRY_IMAGE}:latest
test:
stage: test
before_script:
# Workaround for https://github.com/ninenines/erlang.mk/issues/501
- make plt || test $? -eq 2
script:
- make check
- make rel
build:
stage: build
image: docker:latest
script:
- docker build -t ${CONTAINER_REF_IMAGE} .
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
- docker push ${CONTAINER_REF_IMAGE}
services:
- docker:dind
tags:
- docker
test:
stage: test
script:
- docker run --rm -t ${CONTAINER_REF_IMAGE} make check
tags:
- docker
release:
stage: release
image: docker:latest
script:
- docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
- docker pull ${CONTAINER_REF_IMAGE}
- docker tag ${CONTAINER_REF_IMAGE} ${CONTAINER_LATEST_IMAGE}
- docker push ${CONTAINER_LATEST_IMAGE}
services:
- docker:dind
tags:
- docker
only:
- master
tags:
- docker
FROM erlang:20-alpine
FROM erlang:21-alpine
WORKDIR /app
......
This diff was suppressed by a .gitattributes entry.
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