fxa-content-server/circle.yml

77 строки
2.8 KiB
YAML
Исходник Обычный вид История

dependencies:
pre:
2016-10-27 18:54:56 +03:00
- pip install mozdownload mozinstall
- mozdownload --version 50.1.0 --destination firefox.tar.bz2
2016-10-27 18:54:56 +03:00
- mozinstall firefox.tar.bz2
- 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
- npm install --global retry-cli
- export DISPLAY=:1
- cp server/config/local.json-dist server/config/local.json
- npm i --production
- CONFIG_FILES=server/config/local.json,server/config/production.json,tests/ci/config_circleci.json node_modules/.bin/grunt build
- nohup bash -c "CONFIG_FILES=server/config/local.json,server/config/production.json,tests/ci/config_circleci.json node_modules/.bin/grunt serverproc:dist &"
- 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
post:
- curl 127.0.0.1:3030
- /home/ubuntu/fxa-content-server/firefox/firefox --version
machine:
node:
version: 4
test:
override:
# retry the build if the attempt failed
- retry -n 1 -- npm run test-circle firefoxBinary=/home/ubuntu/fxa-content-server/firefox/firefox:
parallel: true
# 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}"