language: node_js
before_install:
  - echo "`date -u '+%Y-%m-%d %H:%M:%S'` Start to build Luna"
  - docker pull node:latest
install:
  - sed -i 's/{{BUILD_NUMBER}}/'$BUILD_NUMBER'/g' src/environments/environment.prod.ts
  - rm -rf dist/
  - docker run -i -v `pwd`:/data -w /data node  sh -c "npm i && npm rebuild node-sass&& npm run-script build"
script:
  - docker build -t registry.fit2cloud.com/jumpserver/luna:$Branch .
  - docker push registry.fit2cloud.com/jumpserver/luna:$Branch

