Commit 01c7d03d authored by Petter Goksøyr Åsen's avatar Petter Goksøyr Åsen
Browse files

build: add gitlab ci configuration attempt

parent 6c8dbb2a
before_script:
- apt-get update -qq && apt-get install -y make
stages:
- build
- test
build-timber:
script:
- make build CONTAINER=timber
stage: build
only:
changes: timber/**/*
test-timber:
script:
- make timber-lint
- make timber-test
stage: test
only:
changes: timber/**/*
......@@ -21,7 +21,6 @@ endif
docker-compose -f docker-compose.yml -f docker-compose-dev.yml build $(CONTAINER)
docker-compose -f docker-compose.yml -f docker-compose-dev.yml up $(CONTAINER)
KATALOG_GRAPH=https://katalog.deichman.no
define clear_graph
......@@ -70,4 +69,11 @@ ifndef TARGET
@echo "ERROR: missing required TARGET variable, ex: make deploy TARGET=test-1 TAG=2018-12-17.b1"
@exit 1
endif
@echo "TODO"
\ No newline at end of file
@echo "TODO"
timber-lint:
docker run --rm deichman_timber npm run-script lint
timber-test:
docker run --rm deichman_timber npm run-script test
\ No newline at end of file
image: docker:latest
variables:
DOCKERHUB_USERNAME: deichman
stages:
- build
- test
- push
before_script:
- apk add --update build-base git nodejs nodejs-npm
build:
script:
- npm install
- npm run productionbuild
artifacts:
paths:
- node_modules/
- public/dist
expire_in: 10 mins
stage: build
test:
script: "npm run verify"
stage: test
push:
script:
- docker build -t digibib/timber .
- docker tag digibib/timber digibib/timber:$CI_COMMIT_TAG
- docker login --username=$DOCKERHUB_USERNAME --password=$DOCKERHUB_PASSWORD
- docker push digibib/timber:$CI_COMMIT_TAG
stage: push
only:
- tags
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