Skip to content
Snippets Groups Projects
Forked from clients / Cesium-grp / Cesium
587 commits behind the upstream repository.
.gitlab-ci.yml 2.44 KiB
stages:
  - build
  - alt_build
  - publish

fast-build:
  stage: build
  image: $CI_REGISTRY_IMAGE
  before_script:
    - mv /customCache/node_modules ./
    - cp -rf /customCache/www ./
    - cp -rf /customCache/hooks ./
  script:
    - node ./node_modules/gulp/bin/gulp webBuild
  after_script:
    - ls -la dist/web/
    - du -csh dist/web/
  artifacts:
    untracked: true
    paths:
      - dist/web
    expire_in: 60 minutes
  only:
    - master
    - tags
failsafe-build:
  stage: alt_build
  when: on_failure
  image: node:10
  script:
    - yarn
    - node ./node_modules/gulp/bin/gulp config --env default
    - node ./node_modules/gulp/bin/gulp webBuild
  artifacts:
    untracked: true
    paths:
      - dist/web
    expire_in: 60 minutes
  only:
    - master
    - tags
docker-for-fast-build:
  stage: alt_build
  when: on_failure
  allow_failure: true
  tags:
    - doppler-docker
  image: docker:latest
  services:
    - docker:dind
  script:
    - echo 'FROM node:10' > Dockerfile
    - echo 'WORKDIR /customCache' >> Dockerfile
    - echo 'COPY ./ ./' >> Dockerfile
    - echo 'RUN du -s `find . -maxdepth 1 | egrep -v "^\.$"`>/before.txt' >> Dockerfile
    - echo 'RUN yarn' >> Dockerfile
    - echo 'RUN du -s `find . -maxdepth 1 | egrep -v "^\.$"`>/after.txt' >> Dockerfile
    - echo 'WORKDIR /build' >> Dockerfile
    - echo "RUN diff /before.txt /after.txt || true" >> Dockerfile
    - docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" $CI_REGISTRY
    - docker build --pull -t "$CI_REGISTRY_IMAGE" .
    - docker push "$CI_REGISTRY_IMAGE"


pages:
  stage: publish
  image: node:10
  variables:
    GIT_STRATEGY: none
  script: