-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
48 lines (42 loc) · 1.04 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
stages:
- test
- deploy
variables:
STACK_ROOT: "$CI_PROJECT_DIR/.stack"
CABAL_STORE_DIR: "$CI_PROJECT_DIR/.cabal-store"
DOCKER_REGISTRY: "hub.docker.com/migamake/pandoc-filter-indent"
cache:
key: "ALL"
paths:
- .stack-work/
- .stack/
- .cabal-store/
- dist-newstyle/
shellcheck-bash-scripts:
stage: test
script:
- ./ci/scripts_shellcheck.sh
build-haskell-stack:
stage: test
tags:
- docker
image: fpco/stack-build:lts-18.12
script:
- stack build
- stack test
docker-image:
stage: deploy
image: docker
tags: [docker]
before_script:
- docker login -u ${DOCKER_REGISTRY_USER} -p ${DOCKER_REGISTRY_PASSWORD} ${DOCKER_REGISTRY}
script: |
docker build -t "$DOCKER_REGISTRY":${CI_COMMIT_SHORT_SHA} .
docker push "$DOCKER_REGISTRY":${CI_COMMIT_SHORT_SHA}
if [ -z "${CI_MERGE_REQUEST_ID}" ] ; then
docker tag "$DOCKER_REGISTRY":${CI_COMMIT_SHORT_SHA} "$DOCKER_REGISTRY":latest
docker push "$DOCKER_REGISTRY":latest
fi
services:
- docker:20.10.10-dind
cache: []