This repository has been archived by the owner on Jun 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
circle.yml
73 lines (69 loc) · 2.93 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
machine:
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
- sudo rm /usr/local/bin/docker-compose
- sudo curl -L https://github.com/docker/compose/releases/download/1.7.0/docker-compose-Linux-x86_64 > docker-compose
- sudo mv docker-compose /usr/local/bin/
- sudo chmod +x /usr/local/bin/docker-compose
- touch mappamundi/.env
services:
- docker
dependencies:
cache_directories:
- "sysconfcpus"
override:
- docker-compose run --entrypoint="psql -h db -U postgres -c 'CREATE DATABASE mappamundi_dev'" sqitch
- |
if [ ! -d sysconfcpus/bin ];
then
git clone https://github.com/obmarg/libsysconfcpus.git;
cd libsysconfcpus;
./configure --prefix="$HOME/$CIRCLE_PROJECT_REPONAME/sysconfcpus";
make && make install;
cd ..;
fi
- $HOME/$CIRCLE_PROJECT_REPONAME/sysconfcpus/bin/sysconfcpus -n 2 npm install --only=dev:
timeout: 900
pwd:
web
test:
override:
- docker-compose run sqitch deploy
- ./vendor/linux/hugo:
pwd:
marketing
- docker build --rm=false -t kindlyops/complianceopsmarketing -f marketing/Dockerfile .
- docker build --rm=false -t kindlyops/mappamundi .
- $HOME/$CIRCLE_PROJECT_REPONAME/sysconfcpus/bin/sysconfcpus -n 2 npm run-script build:
timeout: 900
pwd:
web
- docker build --rm=false -t kindlyops/havenweb web
deployment:
prerelease:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker tag kindlyops/mappamundi kindlyops/mappamundi:$CIRCLE_SHA1
- docker tag kindlyops/complianceopsmarketing kindlyops/complianceopsmarketing:$CIRCLE_SHA1
- docker tag kindlyops/havenweb kindlyops/havenweb:$CIRCLE_SHA1
- docker push kindlyops/mappamundi:$CIRCLE_SHA1
- docker push kindlyops/complianceopsmarketing:$CIRCLE_SHA1
- docker push kindlyops/havenweb:$CIRCLE_SHA1
release:
tag: /v[0-9]+(\.[0-9]+)*/
owner: kindlyops
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker tag kindlyops/mappamundi kindlyops/mappamundi:$CIRCLE_TAG
- docker tag kindlyops/complianceopsmarketing kindlyops/complianceopsmarketing:$CIRCLE_TAG
- docker tag kindlyops/havenweb kindlyops/havenweb:$CIRCLE_TAG
- docker tag kindlyops/mappamundi kindlyops/mappamundi:$CIRCLE_SHA1
- docker tag kindlyops/complianceopsmarketing kindlyops/complianceopsmarketing:$CIRCLE_SHA1
- docker tag kindlyops/havenweb kindlyops/havenweb:$CIRCLE_SHA1
- docker push kindlyops/mappamundi:$CIRCLE_TAG
- docker push kindlyops/havenweb:$CIRCLE_TAG
- docker push kindlyops/complianceopsmarketing:$CIRCLE_TAG
- docker push kindlyops/complianceopsmarketing:$CIRCLE_SHA1
- docker push kindlyops/mappamundi:$CIRCLE_SHA1
- docker push kindlyops/havenweb:$CIRCLE_SHA1