This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
tsmpipe/.gitlab-ci.yml
2018-03-21 22:16:28 +11:00

91 lines
1.8 KiB
YAML

services:
- ${CI_REGISTRY}/leenooks/ci-docker:dind
stages:
- build
- test
- docker
# For some reason compiling on CentOS 6.x results in buffer corruption
build:6-7.1:
stage: build
image: ${CI_REGISTRY}/leenooks/ci-tsm:6-7.1
script:
- make -f Makefile.linux64
only:
- c6
tags:
- C
artifacts:
name: "$CI_BUILD_NAME"
paths:
- tsmpipe
test:6-7.1:
stage: test
image: ${CI_REGISTRY}/leenooks/ci-tsm:6-7.1
dependencies:
- build:6-7.1
script:
- cd test && ./test.sh
only:
- c6
tags:
- C
# Compile on CentOS 6.x, for some reason compiling on CentOS 7.x results in buffer corruption
build:7-8.1:
stage: build
image: ${CI_REGISTRY}/leenooks/ci-tsm:7-8.1
script:
- make -f Makefile.linux64
only:
- master
tags:
- C
artifacts:
name: "$CI_BUILD_NAME"
paths:
- tsmpipe
test:7-8.1:
stage: test
image: ${CI_REGISTRY}/leenooks/ci-tsm:7-8.1
dependencies:
- build:7-8.1
script:
- cd test && ./test.sh
only:
- master
tags:
- C
artifacts:
name: "$CI_BUILD_NAME"
paths:
- tsmpipe
docker:7-8.1:
stage: docker
image: docker:latest
before_script:
- docker info
- docker version
- echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
variables:
CACHETAG: build
VERSION: 8.1.4
DOCKER_HOST: tcp://${CI_REGISTRY}-leenooks-ci-docker:2375
dependencies:
- test:7-8.1
script:
- if [ -f init ]; then chmod 500 init; fi
- docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
- docker run ${CI_REGISTRY_IMAGE}:${VERSION} -h
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}
tags:
- docker
only:
- master