👷 Add GitLab CI

parent bd501197
Pipeline #3200 canceled with stages
in 1 minute and 5 seconds
image: node:alpine
stages:
- test
- docker
cache:
paths:
- node_modules/
variables:
CONTAINER_TEST_IMAGE: git.cartooncraft.fr/osufrlive/obs-sync:$CI_BUILD_REF_NAME
CONTAINER_RELEASE_IMAGE: git.cartooncraft.fr/osufrlive/obs-sync:latest
lint:
stage: test
script:
- apk add git
- npm i
- npm run lint
typescript build:
stage: test
script:
- apk add git
- npm i
- npm run build
docker build:
image: docker:stable
stage: docker
services:
- docker:dind
tags:
- docker-build
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN git.cartooncraft.fr
- docker build --pull -t $CONTAINER_TEST_IMAGE .
- docker push $CONTAINER_TEST_IMAGE
# Tag as latest if on master
- sh -c "if [ $CI_BUILD_REF_NAME == "master" ]; then docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE && docker push $CONTAINER_RELEASE_IMAGE; fi"
\ No newline at end of file
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