forked from lynckia/licode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support to CircleCI (lynckia#967)
- Loading branch information
Showing
5 changed files
with
84 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
version: 2.0 | ||
|
||
jobs: | ||
build: | ||
docker: | ||
- image: buildpack-deps:trusty-curl | ||
|
||
working_directory: /tmp/licode | ||
|
||
steps: | ||
- checkout | ||
|
||
- setup_remote_docker | ||
|
||
- run: | ||
name: Install Docker client | ||
command: | | ||
set -x | ||
VER="17.03.0-ce" | ||
curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz | ||
tar -xz -C /tmp -f /tmp/docker-$VER.tgz | ||
mv /tmp/docker/* /usr/bin | ||
- run: | ||
name: Pull latest docker image | ||
command: | | ||
docker pull lynckia/licode:latest | ||
- run: | ||
name: Build docker image | ||
command: | | ||
echo Building lynckia/licode:develop | ||
docker build --cache-from lynckia/licode:latest -t lynckia/licode:develop . | ||
- run: | ||
name: Lint Erizo | ||
command: | | ||
docker run --rm -ti -w /opt/licode/erizo/build/ --entrypoint /bin/bash lynckia/licode:develop -c "make lint" | ||
- run: | ||
name: Unit Tests Erizo | ||
command: | | ||
docker run --rm -ti -w /opt/licode/erizo/build/ --entrypoint /bin/bash lynckia/licode:develop -c "ctest --verbose" | ||
- run: | ||
name: Lint Javascript | ||
command: | | ||
docker run --rm -ti -w /opt/licode --entrypoint /bin/bash lynckia/licode:develop -c ". ./build/libdeps/nvm/nvm.sh && npm install && npm run lint" | ||
docker run --rm -ti -w /opt/licode --entrypoint /bin/bash lynckia/licode:develop -c ". ./build/libdeps/nvm/nvm.sh && npm install && npm run lintClient" | ||
- run: | ||
name: Unit Tests Javascript | ||
command: | | ||
docker run --rm -ti -w /opt/licode --entrypoint /bin/bash lynckia/licode:develop -c ". ./build/libdeps/nvm/nvm.sh && npm install && cp scripts/licode_default.js licode_config.js && npm run test" | ||
- deploy: | ||
name: Push Licode Docker image | ||
command: | | ||
if [ "${CIRCLE_BRANCH}" == "master" ]; then | ||
SHORT_GIT_HASH="$(echo ${CIRCLE_SHA1} | cut -c -8)" | ||
docker login -u ${DOCKER_USER} -p ${DOCKER_PASS} | ||
echo Tagging to lynckia/licode:${SHORT_GIT_HASH} | ||
docker tag lynckia/licode:develop lynckia/licode:${SHORT_GIT_HASH} | ||
docker push lynckia/licode:develop | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters