formation 1 vuosi sitten
vanhempi
commit
6ec08f5eea

+ 18 - 23
Jenkinsfile

@@ -24,39 +24,34 @@ node{
 	// {
 	// 	docker.withRegistry('http://localhost:8083','885ef60c-9352-489a-bd1c-e4b695747c21')
 	// 	{
-	// 			imageApache.push('latest')
-	// 		    imageExpress.push('latest')
-	// 	}
+	// 		imageApache.push('latest')
+	// 		imageExpress.push('latest')
+	// 	}*/
 	// }
-
-    
-	
-	
-    stage('SonarQube analysis') 
-    {  
-         def scannerHome = tool name: 'SonarQube Scanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation';
-        withSonarQubeEnv('SonarQube') 
-        { 
-        // If you have configured more than one global server connection, you can specify its name
-        sh "${scannerHome}/bin/sonar-scanner  \
-        -Dsonar.projectKey=FatboarProject \
-        -Dsonar.sources=. \
-        -Dsonar.host.url=https://sonarqube.foodgame.fr \
-        -Dsonar.login=sqa_9980d9f6eac6a910947f1b55aaa280c93f02236b"
-        }
-    }
+    // stage('SonarQube analysis') 
+    // {  
+    //      def scannerHome = tool name: 'SonarQube Scanner', type: 'hudson.plugins.sonar.SonarRunnerInstallation';
+    //     withSonarQubeEnv('SonarQube') 
+    //     { 
+    //     // If you have configured more than one global server connection, you can specify its name
+    //     sh "${scannerHome}/bin/sonar-scanner  \
+    //     -Dsonar.projectKey=FatboarProject \
+    //     -Dsonar.sources=. \
+    //     -Dsonar.host.url=https://sonarqube.foodgame.fr \
+    //     -Dsonar.login=sqp_09ee9072c917af8212864baf0f75c950afc14c64"
+    //     }
+    // }
 	
 
-    stage('Build Docker MEAN Stack(PreProduction Deployment)') 
+    stage('Build Docker MEAN Stack(Test Deployment)') 
     {
         sh 'docker-compose -v'
-        sh 'docker-compose stop'
         sh 'docker-compose build'
         sh 'docker-compose up -d'
     }
    
     stage('Fin du Pipeline') 
     {
-       sh 'echo "Félicitation tout s\'est bien déroulé!"'  
+       sh 'echo "Félicitation tout c\'est bien déroulé!"'  
    }
 }

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1706 - 1219
angular-client/package-lock.json


+ 3 - 2
angular-client/src/app/components/auth/gain/gain-list/gain-list.component.html

@@ -1,7 +1,8 @@
  <!-- table of users -->
-<<<<<< HEAD
-=======
+<<<<<<<<< Temporary merge branch 1
+=========
 
+>>>>>>> test
     <table *ngIf="lots" mat-table  [dataSource]="lots" class="tablegain">
 
 >>>>>>> dev

+ 4 - 7
angular-client/src/app/services/auth.service.ts

@@ -18,7 +18,7 @@ import * as jwt_decode from 'jwt-decode';
 export class AuthService {
 
   //url api
- private apiUrl = environment.apiUrl
+  private apiUrl = environment.apiUrl
 
   private currentUserSubject: BehaviorSubject<User> = new BehaviorSubject<User>(null);
   public currentUser: Observable<User> = this.currentUserSubject.asObservable();
@@ -62,7 +62,7 @@ export class AuthService {
   // login get  token on login 
   signIn(credentials): Observable<Token> {
      //debugger;
-   // console.log("url ========",this.apiUrl);
+    console.log("url ========",this.apiUrl);
 
     return this.http.post<Token>(`${this.apiUrl}/api/auth/login`, credentials)
       .pipe(map(token => {
@@ -98,7 +98,7 @@ export class AuthService {
     // login get  token on login admin
     signInAdmin(credentials): Observable<Token> {
        //debugger;
-      //console.log("url ========",this.apiUrl);
+      console.log("url ========",this.apiUrl);
   
       return this.http.post<Token>(`${this.apiUrl}/api/auth/admin`, credentials)
         .pipe(map(token => {
@@ -113,9 +113,6 @@ export class AuthService {
 
   // iscription get  token on login 
   signUP(data): Observable<Token> {
-     debugger;
-    // console.log("url ========",this.apiUrl);
-  
 
     return this.http.post<Token>(`${this.apiUrl}/api/auth/signup`, data)
       .pipe(map(token => {
@@ -203,4 +200,4 @@ resetPassword(data): Observable<any> {
   }
 
 
-}
+}

+ 0 - 8
docker-compose.yml

@@ -21,14 +21,6 @@
 
 
 
-# networks:
-#   private:
-#   web:
-#    external:
-#     name: web
-#   #pipeline-test-mean-stack-docker_default:
-#   #pipeline-test-mean-stack-docker_private:
-#   #grafana:
 
 version: '3'
 

+ 4 - 2
express-server/lib/db.js

@@ -5,9 +5,11 @@ const  config  = require('../config/config.json');
 // const { User } = require('../models/user.model');
  //const bcrypt = require('bcrypt');
 // const Role = require('../lib/role');
-//const db = config.url;
+const db = config.url;
 
-var db = 'mongodb://database_prod:27017/mean-fatboar-db';
+//var db = 'mongodb://database_preprod:27017/mean-fatboar-db';
+//var mongoURI = 'mongodb://localhost:27017/my-db';
+//mongoose.set('useCreateIndex', true)
 mongoose.connect(db, {useNewUrlParser: true, useUnifiedTopology: true })
 .then(() => {
     console.log("Successfully connected to the database.");