-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe0836d
commit 8551e84
Showing
3 changed files
with
71 additions
and
6 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 |
---|---|---|
@@ -1,13 +1,47 @@ | ||
sudo: required | ||
services: | ||
- docker | ||
env: | ||
global: | ||
# Ensure the install happens without prompts | ||
- CLOUDSDK_CORE_DISABLE_PROMPTS=1 | ||
language: node_js | ||
node_js: | ||
- "6" | ||
- '6' | ||
before_install: | ||
- echo "Cloudboost Tutorial" | ||
install: | ||
- npm install | ||
- npm install | ||
after_success: | ||
# Build Docker Images | ||
- docker build -t cloudboost/tutorial:2.0.$TRAVIS_BUILD_NUMBER . | ||
- docker build -t cloudboost/tutorial:latest . | ||
before_deploy: | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "Travis CI" | ||
- export GIT_TAG=2.0.$TRAVIS_BUILD_NUMBER | ||
- git tag $GIT_TAG -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER" | ||
- git push -q https://[email protected]/CloudBoost/tutorial --tags | ||
- ls -R | ||
deploy: | ||
provider: azure_web_apps | ||
username: "$azure_deployment_user" | ||
password: "$azure_deployment_password" | ||
site: "$azure_deployment_sitename" | ||
provider: releases | ||
api_key: $GH_TOKEN | ||
file: "README.md" | ||
skip_cleanup: true | ||
on: | ||
tags: false | ||
all_branches: true | ||
after_deploy: | ||
# Docker Deploy. | ||
- if [ "$TRAVIS_BRANCH" == "master" ]; then | ||
docker login --username $DOCKERUSERNAME --password $DOCKERPASSWORD --email $DOCKEREMAIL; | ||
docker push cloudboost/tutorial:2.0.$TRAVIS_BUILD_NUMBER; | ||
docker push cloudboost/tutorial:latest; | ||
fi | ||
branches: | ||
except: | ||
- /^*-v[0-9]/ | ||
#Notify Team on Slack | ||
notifications: | ||
slack: cloudboost:gm7nWJDLDtBRyF75VKLKOoMW | ||
|
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,28 @@ | ||
# | ||
# CloudBoost Tutorial Dockerfile | ||
# | ||
|
||
# Pull base image nodejs image. | ||
FROM node:boron | ||
|
||
#Maintainer. | ||
MAINTAINER Nawaz Dhandala <[email protected]> | ||
|
||
|
||
RUN mkdir -p /usr/src/app | ||
|
||
WORKDIR /usr/src/app | ||
|
||
# Install app dependencies | ||
COPY package.json /usr/src/app/ | ||
RUN npm install | ||
|
||
# Bundle app source | ||
COPY . /usr/src/app | ||
|
||
# Expose ports. | ||
# - 1446: CloudBoost Tutorial | ||
EXPOSE 1446 | ||
|
||
#Run the app | ||
CMD [ "npm", "start" ] |
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