Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
c290dfe
updating the code
kaviyakulothungan10 Feb 7, 2019
7eca85f
updating the code
kaviyakulothungan10 Feb 7, 2019
39a2126
Creating JenkinsFile
kaviyakulothungan10 Feb 7, 2019
8ceaac9
creating readme file
kaviyakulothungan10 Feb 7, 2019
ad8eb4e
fixing the syntax
kaviyakulothungan10 Feb 7, 2019
cb3ab24
updating the jenkinsfile
kaviyakulothungan10 Feb 7, 2019
23d47b2
updating the jenkinsfile
kaviyakulothungan10 Feb 7, 2019
6601ed6
updating the Jenkinsfile
kaviyakulothungan10 Feb 7, 2019
4cfa3a6
committing the yml file
ravindranathbarathy-cts Aug 28, 2019
fb6d57f
Merge pull request #1 from ravindranathbarathy-cts/ravindranathbarath…
ravindranathbarathy-cts Aug 28, 2019
ecd7abc
Delete nodejs.yml
ravindranathbarathy-cts Aug 28, 2019
01251ea
new commit
ravindranathbarathy-cts Aug 28, 2019
daa0dd5
Merge pull request #2 from ravindranathbarathy-cts/ravindranathbarath…
ravindranathbarathy-cts Aug 28, 2019
162be8d
updating changes
ravindranathbarathy-cts Aug 28, 2019
9c7f197
Delete workflow.yml
ravindranathbarathy-cts Aug 28, 2019
c82bc98
Create workflow.yml
ravindranathbarathy-cts Aug 28, 2019
dd0d61d
Merge pull request #3 from ravindranathbarathy-cts/master
ravindranathbarathy-cts Aug 28, 2019
561bd51
Update workflow.yml
ravindranathbarathy-cts Aug 29, 2019
c9c41ca
updating workflow.yml file
ravindranathbarathy-cts Aug 29, 2019
7021e8d
updating yml file
ravindranathbarathy-cts Aug 29, 2019
c904cb4
updated
ravindranathbarathy-cts Aug 29, 2019
0f6e279
Update workflow.yml
ravindranathbarathy-cts Aug 29, 2019
57c9ff8
Updating package.json for unit test error in mocha
ravindranathbarathy-cts Aug 29, 2019
c72f3b0
pointing correctly to .js file
ravindranathbarathy-cts Aug 29, 2019
acf6bc3
removing mocha exit
ravindranathbarathy-cts Aug 29, 2019
ad0bfcc
calling mocha
ravindranathbarathy-cts Aug 29, 2019
3bfd143
updating package.json file
ravindranathbarathy-cts Aug 29, 2019
b776464
Update package.json
ravindranathbarathy-cts Aug 29, 2019
d8fb156
Update package.json
ravindranathbarathy-cts Aug 29, 2019
241c763
Update workflow.yml
ravindranathbarathy-cts Aug 29, 2019
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
31 changes: 31 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Node CI
on:
push:
branches:
- develop

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [8.x, 10.x, 12.x]

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm install mocha -g
mocha --version
npm install --save-dev chai
mocha exit
env:
CI: true
8 changes: 8 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
node('docker') {
stage('SCM') {
checkout poll: false, scm: [$class: 'GitSCM', branches: [[name: 'refs/heads/develop']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/CodeBabel/MEANStackApp.git']]]
}
stage('SonarQube Analysis') {
sh "/home/jenkins/tools/hudson.plugins.sonar.SonarRunnerInstallation/sonarqubescanner/bin/sonar-scanner -Dsonar.host.url=http://192.168.0.14:9000 -Dsonar.projectName=meanstackapp -Dsonar.projectVersion=1.0 -Dsonar.projectKey=meanstack:app -Dsonar.sources=. -Dsonar.projectBaseDir=/home/jenkins/workspace/sonarqube_test_pipeline"
}
}
2 changes: 1 addition & 1 deletion app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ angular.module('app').controller('testCtrl', function($scope, $resource) {
//$scope.authors = [{name: 'Ravindranath Barathy', role:'Admin1'},{name: 'Kaviya Kulothungan', role:'Admin2'},{name: 'Vivek Cherarajan', role:'Admin3'}];

$scope.authors = $resource('/api/authors').query();
});
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Sample Dashboard App",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha 'test/**/*.js' --recursive --timeout 60000 --exit"
},
"author": "Kaviya Kulothungan",
"license": "ISC",
Expand Down