Question
· Jan 13, 2017

GitLab CI examples?

Recently I started working with GitLab - GitHub self-hosted foss alternative. So far so good, liked the UI,  ease of administration, and available functionality (I was on Phabricator previously,  and still use it for repo mirroring).

GitLab has GitLab CI  (GitLab Continuous Integration) which looks promising (pluggable docker/vm/ds to run code) , but I wondered if someone uses it already and can share scripts for it?

Discussion (4)0
Log in or sign up to continue

Good choice, I'm already using gitlab in our company, with closed sources. In our process, I even deploy to our own windows server. Our application on Angular 2.

it is our gitlab-ci.yml, I've removed deploy stage.

image: node:5

stages:
  - test
  - build

cache:
  key: "$CI_PROJECT_NAME/$CI_BUILD_REF_NAME"
  paths:
    - ./node_modules/

before_script:
  - export PATH=$PATH:./node_modules/.bin/
  - npm install

tslint_job:
  stage: test
  tags:
    - linux
    - docker
  script:
    - ng lint

test_job:
  stage: test
  tags:
    - linux
    - docker
  script:
    - karma start --browsers PhantomJS --single-run

build_job:
  stage: build
  tags:
    - linux
    - docker
  artifacts:
    expire_in: 1 week
    paths:
      - dist/*
  script:
    - ng build --aot-prod --bh "./"