|
@@ -44,37 +44,55 @@ jobs:
|
|
|
environment:
|
|
|
BUILDTARGET: build:uitests
|
|
|
TESTTARGET: test:ui chrome
|
|
|
- dist:
|
|
|
+ lint:
|
|
|
docker:
|
|
|
- - image: circleci/node:10-browsers
|
|
|
+ - image: circleci/node:8-browsers
|
|
|
steps:
|
|
|
- checkout
|
|
|
- restore_cache:
|
|
|
keys:
|
|
|
- - v2-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "package.json" }}
|
|
|
- - run: npm install --release
|
|
|
- - run: npm run dist
|
|
|
- - save_cache:
|
|
|
- key: v2-dependencies-{{ .Environment.CIRCLE_JOB }}-{{ arch }}-{{ checksum "package.json" }}
|
|
|
- paths:
|
|
|
- - node_modules
|
|
|
+ - v2-dependencies-test-node8-{{ arch }}-{{ checksum "package.json" }}
|
|
|
+ - run: npm install
|
|
|
+ - run: npm run lint
|
|
|
docker-build:
|
|
|
docker:
|
|
|
- image: docker:stable
|
|
|
steps:
|
|
|
- checkout
|
|
|
- setup_remote_docker
|
|
|
- - run: docker build . --no-cache -t threema/threema-web:${CIRCLE_BRANCH}
|
|
|
- lint:
|
|
|
+ - run: docker build . --no-cache
|
|
|
+ docker-push-branch:
|
|
|
docker:
|
|
|
- - image: circleci/node:8-browsers
|
|
|
+ - image: docker:stable
|
|
|
steps:
|
|
|
- checkout
|
|
|
- - restore_cache:
|
|
|
- keys:
|
|
|
- - v2-dependencies-test-node8-{{ arch }}-{{ checksum "package.json" }}
|
|
|
- - run: npm install
|
|
|
- - run: npm run lint
|
|
|
+ - setup_remote_docker
|
|
|
+ - run: >
|
|
|
+ docker build . --no-cache -t threema/threema-web:${CIRCLE_BRANCH}
|
|
|
+ && docker login -u $DOCKER_USER -p $DOCKER_API_KEY
|
|
|
+ && docker push threema/threema-web
|
|
|
+ docker-push-tag:
|
|
|
+ docker:
|
|
|
+ - image: docker:stable
|
|
|
+ environment:
|
|
|
+ IMAGE: threema/threema-web
|
|
|
+ steps:
|
|
|
+ - checkout
|
|
|
+ - setup_remote_docker
|
|
|
+ - run: >
|
|
|
+ export minortag=$(echo $CIRCLE_TAG | sed 's/^\(v[0-9]*\.[0-9]*\)\..*$/\1/')
|
|
|
+ majortag=$(echo $CIRCLE_TAG | sed 's/^\(v[0-9]*\)\..*$/\1/')
|
|
|
+ && docker build . --no-cache -t $IMAGE:$CIRCLE_TAG -t $IMAGE:$minortag -t $IMAGE:$majortag
|
|
|
+ && docker login -u $DOCKER_USER -p $DOCKER_API_KEY
|
|
|
+ && docker push threema/threema-web
|
|
|
+ docker-rebuild-images:
|
|
|
+ docker:
|
|
|
+ - image: docker:stable
|
|
|
+ steps:
|
|
|
+ - checkout
|
|
|
+ - setup_remote_docker
|
|
|
+ - run: bash docker/rebuild.sh
|
|
|
+
|
|
|
|
|
|
workflows:
|
|
|
version: 2
|
|
@@ -84,6 +102,26 @@ workflows:
|
|
|
- unittest-node10
|
|
|
- uitest-firefox
|
|
|
- uitest-chrome
|
|
|
- - dist
|
|
|
- lint
|
|
|
- - docker-build
|
|
|
+ - docker-build:
|
|
|
+ filters:
|
|
|
+ branches:
|
|
|
+ ignore: master
|
|
|
+ - docker-push-branch:
|
|
|
+ filters:
|
|
|
+ branches:
|
|
|
+ only: master
|
|
|
+ - docker-push-tag:
|
|
|
+ filters:
|
|
|
+ branches:
|
|
|
+ only: /v[0-9.]*/
|
|
|
+ weekly:
|
|
|
+ triggers:
|
|
|
+ - schedule:
|
|
|
+ cron: "45 14 * * 4"
|
|
|
+ filters:
|
|
|
+ branches:
|
|
|
+ only:
|
|
|
+ - master
|
|
|
+ jobs:
|
|
|
+ - docker-rebuild-images
|