diff --git a/README.md b/README.md index 2cc35e2..91bd919 100644 --- a/README.md +++ b/README.md @@ -7,9 +7,25 @@ This repository has 6 files and the functions of each file are as follows: 1. README.md - Contains an some basic conventions and guidelines to show the working of folder level caching. 2. Shippable.yml - Configured for the language, version & to run a test during the CI step. http://docs.shippable.com/ci_configure/ gives you a detailed introduction on how to configure your CI on shippable. -3. Package.json - Installs all the libraries mentioned in dependencies list when we run npm install command from the root of this folder. The npm install command creates a new folder called node_modules which contains all the libraries mentioned in the dependency list. +3. Package.json - Installs all the libraries mentioned in dependencies list when we run npm install command from the root of this folder. The npm install command createsds a new folder called node_modules which contains all the libraries mentioned in the dependency list. 4. index.js - Outputs "Welcome to Shippable" in a browser 5. test.js - Configured to run a simple unit test to check the syntax of the index.js output 6. Gruntfile.js - grunt file that loads express server and mocha Test 7. xunit.xml - 8. .gitignore - default file created at the time of creating this repository +hellof the +dd +www +sdsdsd +asdad +sdsd +hello +hello world123gggg +hgsdf +d +123 +asdads +1234 +asd + + diff --git a/index.js b/index.js index 28b7e8c..1a0c9de 100644 --- a/index.js +++ b/index.js @@ -7,5 +7,5 @@ app.get("/", function (req, res) { }); app.listen(3000, function () { - console.log('Express listening on port 3000'); + console.log('Express listening on port11123457 3000'); }); diff --git a/shippable.yml b/shippable.yml index 2c74c51..373e854 100644 --- a/shippable.yml +++ b/shippable.yml @@ -1,12 +1,32 @@ language: node_js -node_js: - - 0.12 +#node_js: + #- 4.3.1 + #- 5.0.0 env: - - XUNIT_FILE=shippable/testresults/result.xml + matrix: + - foo=bar + - foo1=bar1 build: + #cache: true + pre_ci: + - echo "this is pr-ci1" ci: - - npm install - - npm test + - echo "printing env 123454787983" + - printenv + - echo "build-number $BUILD_NUMBER" + - echo "job-number $JOB_NUMBER" + - if [ "$JOB_NUMBER" == "2" ]; then echo "hello $JOB_NUMBER"; fi + - if [ "$JOB_NUMBER" == "2" ]; then echo "versionName=$BRANCH.$BUILD_NUMBER.$JOB_NUMBER" >> $JOB_STATE/box-nginx-2.env; fi + - if [ "$JOB_NUMBER" == "1" ]; then echo "versionName=$BRANCH.$JOB_NUMBER"; fi + - if [ "$JOB_NUMBER" == "1" ]; then echo "versionName=$BRANCH.$BUILD_NUMBER.$JOB_NUMBER" >> $JOB_STATE/box-nginx-1.env; fi + #- echo "versionName=$BRANCH.$BUILD_NUMBER" >> $JOB_STATE/box-nginx-1.env; + #- shipctl post_resource_state box-nginx-1 versionName "build_"$BUILD_NUMBER + +#integrations: + #hub: + #- integrationName: dockerhub + #type: generic + diff --git a/test.js b/test.js index d4d3857..d2628b5 100644 --- a/test.js +++ b/test.js @@ -11,3 +11,16 @@ describe("Index", function () { }); }); }); + +describe("Index", function () { + it("renders HTML", function (done) { + superagent.get("http://localhost:3000/") + .end(function (e, res) { + (e === null).should.equal(true); + res.text.should.equal("Welcome to Shippable"); + done(); + }); + }); +}); + + diff --git a/test1.js b/test1.js new file mode 100644 index 0000000..c484704 --- /dev/null +++ b/test1.js @@ -0,0 +1,24 @@ +var superagent = require("superagent"), + should = require("should"); + +describe("Index", function () { + it("renders HTML", function (done) { + superagent.get("http://localhost:3000/") + .end(function (e, res) { + (e === null).should.equal(true); + res.text.should.equal("Welcome to Shippable"); + done(); + }); + }); +}); + +describe("Index", function () { + it("renders HTML", function (done) { + superagent.get("http://localhost:3000/") + .end(function (e, res) { + (e === null).should.equal(true); + res.text.should.equal("Welcome to Shippable"); + done(); + }); + }); +});