Skip to content

Update unit tests #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 128 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
467c27c
removing expose fro Dockerfile
May 4, 2016
ec54504
change order of commands in Dockerfile
May 4, 2016
bc46ff6
updating less module in package.json
May 9, 2016
2bf04b0
Update README.md
bmeiri Jun 21, 2016
387d856
Update README.md
bmeiri Jun 21, 2016
f4bea46
adding docker-compose
Aug 13, 2016
c6c36e6
adding codefresh.yml
Sep 20, 2016
465d19d
change node version
Sep 20, 2016
bc67b6a
change node version
Sep 20, 2016
7752270
change node version
Sep 20, 2016
8afaf3e
Update defaults.yml
advance512-demo Oct 5, 2016
df77655
Update defaults.yml
advance512-demo Oct 5, 2016
21478af
Create settings.yml
advance512-demo Oct 5, 2016
7d28cee
Added multiple connection tries
advance512-demo Oct 6, 2016
f7f585c
Update app.js
advance512-demo Oct 6, 2016
cabb8c9
Updating app.js
advance512-demo Oct 6, 2016
53cfaa4
Calling tryConnect()..
advance512-demo Oct 6, 2016
fa7b383
Deleting settings.yml
advance512-demo Oct 6, 2016
56bc5a0
Merge pull request #1 from advance512-demo/master
Superfresh Oct 9, 2016
93fce75
modify yaml
verchol Nov 14, 2016
8dadac2
new yaml
verchol Nov 14, 2016
2d4414d
new yaml
verchol Nov 14, 2016
774673c
new yaml
verchol Nov 14, 2016
4b5687c
remove npm from yaml
verchol Nov 14, 2016
6c677b7
remove npm from yaml
verchol Nov 14, 2016
184429a
run with composition
verchol Nov 14, 2016
23bf354
run with composition
verchol Nov 14, 2016
53c9369
add CD
verchol Nov 14, 2016
96063f7
add staging
verchol Nov 14, 2016
e3a5413
fix codefreshCD
verchol Nov 14, 2016
7700972
add push
verchol Nov 14, 2016
06f96b8
add push
verchol Nov 14, 2016
b49118d
add push
verchol Nov 14, 2016
a35bd2d
fix yaml
verchol Nov 14, 2016
e283c88
fix
verchol Nov 14, 2016
6eec5a3
hotfix
verchol Nov 14, 2016
febacce
Merge branch 'devtlv' into staging
verchol Nov 14, 2016
07f46c3
yaml file
verchol Nov 14, 2016
dbfecd0
add staff
verchol Nov 14, 2016
5416a94
add staff
verchol Nov 14, 2016
eafbac1
add hotfix
verchol Nov 14, 2016
c17e68c
add hotfix
verchol Nov 14, 2016
6363c11
add hotfix
verchol Nov 14, 2016
277d97f
add hotfix1
verchol Nov 14, 2016
cd85546
add hotfix2
verchol Nov 14, 2016
08c742b
add hotfix4
verchol Nov 14, 2016
8d0e394
add hotfix5
verchol Nov 14, 2016
ebc04a7
add codefreshdev
verchol Nov 14, 2016
75948cc
change the title
verchol Nov 14, 2016
24e148c
add production filter to ecs
verchol Nov 14, 2016
fa75451
add integration tests
verchol Nov 14, 2016
84f6587
add integration tests
verchol Nov 14, 2016
94a8fa4
Update codefresh.yml
Superfresh Nov 15, 2016
06297cf
update yaml
Superfresh Nov 15, 2016
6e778e8
my new feature
Nov 15, 2016
f55212f
remove integrations
Superfresh Nov 15, 2016
9ccc19b
Merge branch 'master' of github.com:containers101/demochat into devcon
Nov 15, 2016
9f45699
update
Superfresh Nov 15, 2016
521b19e
Merge branch 'master' of github.com:containers101/demochat
Nov 15, 2016
65285e2
back to default
Nov 15, 2016
9c8a45b
my feature
Nov 15, 2016
e6063f3
fix titles
Superfresh Nov 23, 2016
b203274
Change the header
Superfresh Nov 23, 2016
97e0798
title
Superfresh Nov 23, 2016
a23eb61
remove underscore
Superfresh Nov 23, 2016
6b5edce
Change the title
Superfresh Nov 23, 2016
00c58dd
Merge pull request #2 from containers101/chat-webinar
Superfresh Nov 23, 2016
7454a3a
Test commit
Superfresh Nov 30, 2016
621b5af
Update login.html
Superfresh Nov 30, 2016
2abd988
changed the title
Superfresh Nov 30, 2016
aae52a8
Update login.html
Superfresh Nov 30, 2016
e25b9e9
Update login.html
Superfresh Nov 30, 2016
c353ed9
Update login.html
Superfresh Nov 30, 2016
6bb61d3
new title - don't PUSH
Superfresh Nov 30, 2016
92a4157
Doing it
Superfresh Nov 30, 2016
7e1f5f8
Update README.md
bmeiri Nov 30, 2016
2ebef7b
Update login.html
Superfresh Nov 30, 2016
db30d8e
Update login.html
Superfresh Nov 30, 2016
ecc8164
Update README.md
itai-codefresh Nov 30, 2016
c6da32c
Update login.html
Superfresh Nov 30, 2016
a6e1ff1
Update README.md
itai-codefresh Nov 30, 2016
e9541ac
Update login.html
Superfresh Nov 30, 2016
4dce04b
Eric commit msg
Superfresh Nov 30, 2016
4ed090a
name change on production
Superfresh Nov 30, 2016
02b8d04
Push to master
Superfresh Dec 1, 2016
f5f8c4c
Update login.html
Superfresh Dec 1, 2016
13c4bb1
Daniel title
Superfresh Dec 1, 2016
564a057
Update login.html
Superfresh Dec 1, 2016
d599d14
Release 1.2 - Phil
Superfresh Dec 1, 2016
6c65822
Update login.html
Superfresh Dec 1, 2016
e1941a6
Adding Ben to Codefresh
Superfresh Dec 2, 2016
24c8195
Update login.html
Superfresh Dec 2, 2016
b90eb61
Update login.html
Superfresh Dec 2, 2016
6ed47b3
Update login.html
Superfresh Dec 7, 2016
84a2c99
Merge pull request #3 from containers101/dan
Dec 8, 2016
4cf2ac2
fix migration
verchol Dec 28, 2016
e591c2a
fix wrong mongo url
verchol Jan 4, 2017
83205bd
Update README.md
Jan 18, 2017
d17e378
Update README.md
Jan 18, 2017
c7ffa86
add mongo db test
verchol Feb 10, 2017
9c0be29
Update codefresh.yml
bmeiri Feb 10, 2017
29e6097
second build should be much faster
verchol Mar 8, 2017
d479476
Update login.html
Superfresh Mar 14, 2017
6ff3f7a
Update codefresh.yml
Superfresh Mar 14, 2017
383ac9e
Merge pull request #6 from containers101/raziel
Superfresh Mar 14, 2017
cfbf69f
Update docker-compose.yml
Superfresh Mar 14, 2017
9d372a8
Update login.html
Superfresh Mar 14, 2017
8b797e5
Merge pull request #7 from containers101/raziel
Superfresh Mar 14, 2017
dd36f50
Update login.html
Superfresh Mar 14, 2017
b98fb66
Merge pull request #8 from containers101/chegg
Superfresh Mar 14, 2017
4456500
Update login.html
Superfresh Mar 15, 2017
c2cc9aa
Merge pull request #9 from containers101/razielbranch
Superfresh Mar 15, 2017
87f1dd4
redeploy to ecs
nIvanovp Mar 17, 2017
dee53eb
Update login.html
Superfresh Mar 30, 2017
462a837
Update codefresh.yml
Superfresh Mar 31, 2017
50035be
Update codefresh.yml
Superfresh Mar 31, 2017
feac878
add connection
verchol Apr 3, 2017
d3ae3c0
fix package json
verchol Apr 3, 2017
02b2142
Update docker-compose.yml
Superfresh Apr 3, 2017
4eb1cf7
Update docker-compose.yml
Apr 3, 2017
b5b3161
add retry mechaninsm
verchol Apr 4, 2017
bf49980
add retry mechaninsm
verchol Apr 4, 2017
1772f45
remove prestart
verchol Apr 4, 2017
413fc9d
Update README.md
Superfresh Apr 4, 2017
de81001
Merge pull request #10 from containers101/fix_mongo_connection
verchol Apr 4, 2017
c23f939
update to latest node
verchol Apr 4, 2017
384ecb0
fix unit mongo test
verchol Apr 5, 2017
70ae89b
skip tests
verchol Apr 5, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
FROM node:0.10-slim
# Change latest to your desired node version (https://hub.docker.com/r/library/node/tags/)
FROM node:latest

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY ./package.json /src/package.json
RUN cd /src && npm install
COPY ./ /src
RUN npm install -g mocha
RUN npm install -g istanbul
RUN npm install -g gulp
COPY package.json /usr/src/app/
RUN npm install --silent
COPY . /usr/src/app

WORKDIR /src
#ENV DEBUG=*

EXPOSE 8080 5222

CMD ["npm", "start"]
CMD [ "npm", "start" ]
11 changes: 11 additions & 0 deletions Dockerfile.latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Change latest to your desired node version (https://hub.docker.com/r/library/node/tags/)
FROM node:latest

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY package.json /usr/src/app/
RUN npm install --silent
COPY . /usr/src/app

CMD [ "npm", "start" ]
12 changes: 12 additions & 0 deletions Dockerfile_prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM node:0.10-slim

COPY ./package.json /src/package.json
RUN cd /src && npm install
COPY ./ /src

WORKDIR /src
#ENV DEBUG=*


CMD ["npm", "start"]

173 changes: 167 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
Build status: [![Codefresh build status]( https://g.codefresh.io/api/badges/build?repoOwner=containers101&repoName=demochat&branch=master&pipelineName=demochatdfdf&accountName=Razielt77_github&type=cf-1)]( https://g.codefresh.io/repositories/containers101/demochat/builds?filter=trigger:build;branch:master;service:58543cb490a3f40100db408f~demochatdfdf)

![Let's Chat Greylock](http://i.imgur.com/0a3l5VF.png)
#test1
#test2
![Screenshot](http://i.imgur.com/C4uMD67.png)
Test Test
A self-hosted chat app for small teams or big Gal by [Security Compass][seccom].

[![Build Status](https://travis-ci.org/sdelements/lets-chat.svg?branch=master)](https://travis-ci.org/sdelements/lets-chat)
[![Dependency Status](https://david-dm.org/sdelements/lets-chat.svg)](https://david-dm.org/sdelements/lets-chat)
[![devDependency Status](https://david-dm.org/sdelements/lets-chat/dev-status.svg)](https://david-dm.org/sdelements/lets-chat#info=devDependencies)


## Features and Stuff

Expand Down Expand Up @@ -91,3 +88,167 @@ Released under [the MIT license][license].
[install-docker]: https://registry.hub.docker.com/u/sdelements/lets-chat/
[install-heroku]: https://github.com/sdelements/lets-chat/wiki/Heroku
[install-vagrant]: https://github.com/sdelements/lets-chat/wiki/Vagrant





![Let's Chat Greylock](https://codefresh.io/wp-content/uploads/2017/03/lets-chat.png)


## Use this tutorial to familiarize yourself with codefresh.yml file and Codefresh functionality.


This tutorial is based on Let’s Chat [app].

https://github.com/containers101/demochat

### Let’s Chat is self-hosted chat app for small teams or big

This tutorial will walk you through the process of adding the following :


* Build step - that will build Docker image for your Let’s Chat app

* Push to registry step - that will push your image to Docker Hub

* Unit Test step - A freestyle step that runs the unit test of the demo chat after the build

* Composition step - This step will create and launch a composition.

So, the first thing you need to do is :

## Fork our repo

Enter the following link and fork Let’s Chat app!: ```https://github.com/containers101/demochat```


## Add a service
Now enter Codefresh and add your Let’s Chat app as a Codefresh service.

Click on ___Add Repository___

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/add-repo.png)


Now add your forked demochat repo. You can search for it by typing "demochat" to search. You can also Add by URL here.

Also, choose the branch for your first build (in this case ```master```)

When you finish press ___Next___.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/select-repo2.png)


Select how you would like to setup your repository. In this case, our repo has a ___Dockerfile___, so we'll select the middle option.


![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/15.png)

By default, Codefresh searches for your Dockerfile at the root level of your repository, by the name "Dockerfile". The demo-chat example includes a Dockerfile in the root level.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/16.png)


Review your Dockerfile, and click ___Create___ to add your repository.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/17.png)

Clicking on ___Build___ button will trigger a regular build.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/18.png)

Great, you are running your build for the first time!

## Push your image to Docker registry
Click on ___Repositories___, and then click on the ___Pipelines___ gear.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/19.png)

Scroll down to ___Workflow___, and you will see a ___Push to Docker___ button. If you have set up your credentials, click ___Save___ at the bottom of the screen. Otherwise- click on the ___integration page___ link.

Write your User/Password info, and click ___Save___ to connect.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/20.png)


## Unit test your image
Let's head over to ___Piplines___ again.
![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/19.png)

Scroll down to Workflow under ___Build and Unit Test___

We'll type in ```echo $(date)``` in the Unit Test Script area. This will print the date, and we'll be able to see our test in action.

Let's click ___Save___, and ___Build___ to see it in action.

Great- the date has been printed!

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/22.png)


Now let's add a full composition that also contains mongo db.


## Add composition

Our Let's Chat app needs mongo in order to work, so let's add it!

You can read more about compositions in our docs, but we will also walk through the process here :
https://docs.codefresh.io/docs/create-composition


Click the ___Composition___ view icon in the left pane, and click the ___Add Composition___.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/1.png)

Choose a name for your composition

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/2.png)

We'll be using a file from our repo, so select the appropriate option (for the purpose of this demo, you may also use the Let's Chat template if you wish).

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/3.png)

We will be selecting containers101/demochat from our list. If it is not appearing, click ___Add by URL___ and enter https://github.com/Superfresh/demochat

![Screenshot](https://codefresh.io/wp-content/uploads/2017/04/select_repo.png)


We know our Docker Compose file is at the root of our directory, so we'll click ___Next___.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/5.png)


Now we will review and update our yml. Looks good- let's click ___Continue___.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/04/review_and_update1.png)


Great- let's click ___Create___!

![Screenshot](https://codefresh.io/wp-content/uploads/2017/04/customize2.png)


Everything looks good here- so let's go ahead and launch...


![Screenshot](https://codefresh.io/wp-content/uploads/2017/04/launch3.png)


Once it has completed, a link to our app will be displayed. Let's click it to see if it worked.


![Screenshot](https://codefresh.io/wp-content/uploads/2017/04/completed_in.png)

Success! We have successfully launched a composition.

![Screenshot](https://codefresh.io/wp-content/uploads/2017/03/10.png)






[app]: https://github.com/containers101/demochat

Loading