2016-09-26 19:56:13 +03:00
|
|
|
dependencies:
|
|
|
|
pre:
|
2016-10-27 18:54:56 +03:00
|
|
|
- pip install mozdownload mozinstall
|
2016-12-29 01:40:49 +03:00
|
|
|
- mozdownload --version 50.1.0 --destination firefox.tar.bz2
|
2016-10-27 18:54:56 +03:00
|
|
|
- mozinstall firefox.tar.bz2
|
2016-09-26 19:56:13 +03:00
|
|
|
- sudo apt-get install expect tightvncserver
|
|
|
|
- ulimit -S -n 2048;
|
|
|
|
- mkdir -p $HOME/.vnc
|
|
|
|
- bash tests/ci/setvncpass.sh
|
|
|
|
override:
|
2016-12-23 23:45:21 +03:00
|
|
|
- tightvncserver :1
|
2016-12-16 19:33:29 +03:00
|
|
|
- npm install --global retry-cli
|
2016-12-29 01:40:49 +03:00
|
|
|
- export DISPLAY=:1
|
2016-09-26 19:56:13 +03:00
|
|
|
- cp server/config/local.json-dist server/config/local.json
|
|
|
|
- npm i --production
|
2016-10-19 17:42:37 +03:00
|
|
|
- CONFIG_FILES=server/config/local.json,server/config/production.json,tests/ci/config_circleci.json node_modules/.bin/grunt build
|
2016-09-26 19:56:13 +03:00
|
|
|
- nohup bash -c "CONFIG_FILES=server/config/local.json,server/config/production.json,tests/ci/config_circleci.json node_modules/.bin/grunt serverproc:dist &"
|
2016-12-29 01:40:49 +03:00
|
|
|
- npm install intern@3.4.2 bower zaach/node-XMLHttpRequest.git#onerror firefox-profile@0.3.12 request@2.74.0 sync-exec@0.6.2 convict@1.4.0
|
2016-09-26 19:56:13 +03:00
|
|
|
post:
|
|
|
|
- curl 127.0.0.1:3030
|
2016-12-10 04:16:52 +03:00
|
|
|
- /home/ubuntu/fxa-content-server/firefox/firefox --version
|
2016-09-26 19:56:13 +03:00
|
|
|
|
|
|
|
machine:
|
|
|
|
node:
|
|
|
|
version: 4
|
|
|
|
|
|
|
|
test:
|
|
|
|
override:
|
2016-12-16 19:33:29 +03:00
|
|
|
# retry the build if the attempt failed
|
|
|
|
- retry -n 1 -- npm run test-circle firefoxBinary=/home/ubuntu/fxa-content-server/firefox/firefox:
|
2016-10-19 17:42:37 +03:00
|
|
|
parallel: true
|
2017-01-23 23:58:30 +03:00
|
|
|
|
|
|
|
# appropriately tag and push the container to dockerhub
|
|
|
|
deployment:
|
|
|
|
hub_latest:
|
|
|
|
branch: "master"
|
|
|
|
commands:
|
|
|
|
- "[ ! -z $DOCKERHUB_REPO ]"
|
|
|
|
- git clean -d --force -x
|
|
|
|
- docker info
|
|
|
|
- mkdir -p config
|
|
|
|
- >
|
|
|
|
printf '{"version":{"hash":"%s","version":"%s","source":"https://github.com/%s/%s","build":"%s"}}\n'
|
|
|
|
"$CIRCLE_SHA1"
|
|
|
|
"$CIRCLE_TAG"
|
|
|
|
"$CIRCLE_PROJECT_USERNAME"
|
|
|
|
"$CIRCLE_PROJECT_REPONAME"
|
|
|
|
"$CIRCLE_BUILD_URL"
|
|
|
|
| tee config/version.json version.json
|
|
|
|
- docker build -f Dockerfile-build -t fxa-content-server:build .
|
|
|
|
- docker login -e "$DOCKER_EMAIL" -u "$DOCKER_USER" -p "$DOCKER_PASS"
|
|
|
|
- "docker tag fxa-content-server:build ${DOCKERHUB_REPO}:latest"
|
|
|
|
- "docker push ${DOCKERHUB_REPO}:latest"
|
|
|
|
|
|
|
|
hub_releases:
|
|
|
|
# push all tags
|
|
|
|
tag: /.*/
|
|
|
|
commands:
|
|
|
|
- "[ ! -z $DOCKERHUB_REPO ]"
|
|
|
|
- git clean -d --force -x
|
|
|
|
- docker info
|
|
|
|
- mkdir -p config
|
|
|
|
- >
|
|
|
|
printf '{"version":{"hash":"%s","version":"%s","source":"https://github.com/%s/%s","build":"%s"}}\n'
|
|
|
|
"$CIRCLE_SHA1"
|
|
|
|
"$CIRCLE_TAG"
|
|
|
|
"$CIRCLE_PROJECT_USERNAME"
|
|
|
|
"$CIRCLE_PROJECT_REPONAME"
|
|
|
|
"$CIRCLE_BUILD_URL"
|
|
|
|
| tee config/version.json version.json
|
|
|
|
- docker build -f Dockerfile-build -t fxa-content-server:build .
|
|
|
|
- docker login -e "$DOCKER_EMAIL" -u "$DOCKER_USER" -p "$DOCKER_PASS"
|
|
|
|
- "echo ${DOCKERHUB_REPO}:${CIRCLE_TAG}"
|
|
|
|
- "docker tag fxa-content-server:build ${DOCKERHUB_REPO}:${CIRCLE_TAG}"
|
|
|
|
- "docker images"
|
|
|
|
- "docker push ${DOCKERHUB_REPO}:${CIRCLE_TAG}"
|