Skip to content

Commit

Permalink
add travis
Browse files Browse the repository at this point in the history
  • Loading branch information
navrotskyj committed May 27, 2016
1 parent 4351414 commit a381a5b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
sudo: required
language: bash

services:
- docker

env:
- DOCKER_IMAGE_NAME=webitel/acr

before_install:
- if [ ! -z "$TRAVIS_TAG" ]; then sed -i 's/ENV VERSION/ENV VERSION '${TRAVIS_TAG}'#'${TRAVIS_BUILD_NUMBER}'-sha1:'${TRAVIS_COMMIT}'/g' Dockerfile; else sed -i 's/ENV VERSION/ENV VERSION master#'${TRAVIS_BUILD_NUMBER}'-sha1:'${TRAVIS_COMMIT}'/g' Dockerfile; fi

install:
- docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD

script:
- docker build -t $DOCKER_IMAGE_NAME .
- if [ ! -z "$TRAVIS_TAG" ]; then docker tag $DOCKER_IMAGE_NAME:latest $DOCKER_IMAGE_NAME:$TRAVIS_TAG; fi && docker push $DOCKER_IMAGE_NAME
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM node:slim
MAINTAINER Vitaly Kovalyshyn "[email protected]"

ENV VERSION 3.1
ENV WEBITEL_MAJOR 3.1
ENV VERSION
ENV WEBITEL_MAJOR 3
ENV WEBITEL_REPO_BASE https://github.com/webitel

COPY src /acr
Expand Down

0 comments on commit a381a5b

Please sign in to comment.