Skip to content
Snippets Groups Projects
Commit c478e792 authored by Millicent Billette's avatar Millicent Billette
Browse files

Update .gitlab-ci.yml

parent d082dee0
No related branches found
No related tags found
No related merge requests found
stages: stages:
# - github-sync - build
- build - alt_build
- publish - publish
#push_to_github: fast-build:
# stage: github-sync
# variables:
# GIT_STRATEGY: none
# tags:
# - github
# script:
# - rm -rf ./*
# - rm -rf .git
# - git clone --mirror $CI_REPOSITORY_URL .
# - git remote add github $GITHUB_URL_AND_KEY
# - git config --global user.email "contact@duniter.org"
# - git config --global user.name "Duniter"
# # Job would fail if we don't remove refs about pull requests
# - bash -c "cat packed-refs | grep -v 'refs/pull' > packed-refs-new; echo 'Removed pull refs.'"
# - mv packed-refs-new packed-refs
# - bash -c "git push --force --mirror github 2>&1 | grep -v duniter-gitlab; echo $?"
#.enforce_readme:
# stage: github-sync
# variables:
# GIT_STRATEGY: none
# tags:
# - github
# script:
# - rm -rf ./*
# - rm -rf .git
# - git clone $GITHUB_URL_AND_KEY .
# - git config --global user.email "contact@duniter.org"
# - git config --global user.name "Duniter"
# - git checkout master
# - cat .github/github_disclaimer.md > README.md.new
# - cat README.md >> README.md.new
# - mv README.md.new README.md
# - git commit -am "Enforce github readme"
# - git push origin master
build:
stage: build stage: build
image: $CI_REGISTRY_IMAGE
script:
- node ./node_modules/gulp/bin/gulp build:web
artifacts:
paths:
- public
expire_in: 60 minutes
only:
- master
failsafe-build:
stage: alt_build
image: node:5 image: node:5
script: script:
- npm install - npm install
...@@ -56,13 +31,34 @@ build: ...@@ -56,13 +31,34 @@ build:
only: only:
- master - master
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:5' > Dockerfile
- echo 'COPY * ./' >> Dockerfile
- echo 'COPY .bowerrc ./' >> Dockerfile
- echo 'COPY .gitmodules ./' >> Dockerfile
- echo 'RUN npm install' >> Dockerfile
- echo 'RUN npm run postinstall' >> 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: pages:
stage: publish stage: publish
image: node:latest image: node:latest
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
script: script:
- ls -la public - ls -la public || true
- mv platforms/web/www public - mv platforms/web/www public
artifacts: artifacts:
untracked: true untracked: true
...@@ -77,7 +73,7 @@ release-web: ...@@ -77,7 +73,7 @@ release-web:
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
script: script:
- ls -la www - ls -la www || true
- mv platforms/web/www www - mv platforms/web/www www
artifacts: artifacts:
untracked: true untracked: true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment