Commit abfc76ff authored by ourfbht's avatar ourfbht
Browse files

Merge branch 'master' of https://github.com/Zegorax/MentorArc

parents 36cd1bf6 d897c8dd
Loading
Loading
Loading
Loading
+52 −34
Original line number Diff line number Diff line
@@ -13,50 +13,68 @@ pipeline {
                        checkout scm
                        sh 'mv src/main/resources/application.properties.production src/main/resources/application.properties'
                        sh 'mvn -B -DskipTests clean package' 
						stash name: 'mentorarc', includes: '**'
                    }
                }

                
            }
            }
        stage('Test') {
            steps{
                script {
                    docker.image('mysql').withRun('-e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=mentorarc -e MYSQL_USER=mentorarc -e MYSQL_PASSWORD=mentorarc') { c ->
                        docker.image('mysql').inside("--link ${c.id}:db") {
                            /* Wait until mysql service is up */
                            sh 'while ! mysqladmin ping -hdb --silent; do sleep 1; done'
                        }

                        docker.image('maven:3-alpine').inside("--link ${c.id}:db") {
                            checkout scm
                            sh 'mv src/main/resources/application.properties.production src/main/resources/application.properties'
                            sh 'mvn test'
        }
        // stage('Test') {
        //     steps{
        //         script {
        //             docker.image('mysql').withRun('-e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=mentorarc -e MYSQL_USER=mentorarc -e MYSQL_PASSWORD=mentorarc') { c ->
        //                 docker.image('mysql').inside("--link ${c.id}:db") {
        //                     /* Wait until mysql service is up */
        //                     sh 'while ! mysqladmin ping -hdb --silent; do sleep 1; done'
        //                 }

                    }
                }
            }
        //                 docker.image('maven:3-alpine').inside("--link ${c.id}:db") {
        //                     unstash 'mentorarc'
        //                     sh 'mvn test'
        //                 }
        //             }
        //         }
        //     }
            
            post {
                always {
                    junit 'target/surefire-reports/*.xml'
                }
            }
        }
        stage('Quality'){
        //     post {
        //         always {
        //             junit 'target/surefire-reports/*.xml'
        //         }
        //     }
        // }
        // stage('Quality'){
        //     steps{
        //         script{
        //             withCredentials([usernamePassword(credentialsId: 'SonarCloud_Zegorax_Token', passwordVariable: 'SONARCLOUD_API_TOKEN', usernameVariable: 'SONARCLOUD_API_USER')]) {
        //                 docker.image('mysql').withRun('-e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=mentorarc -e MYSQL_USER=mentorarc -e MYSQL_PASSWORD=mentorarc') { c ->
        //                     docker.image('mysql').inside("--link ${c.id}:db") {
        //                         /* Wait until mysql service is up */
        //                         sh 'while ! mysqladmin ping -hdb --silent; do sleep 1; done'
        //                     }
        //                     docker.image('maven:3-alpine').inside("--link ${c.id}:db") {
        //                             unstash 'mentorarc'
        //                             sh 'mvn verify sonar:sonar'
        //                     }
        //                 }
        //             }
        //         }
        //     }
        // }
		stage('IntegrationTests') {
            steps{
                script {
                    withCredentials([usernamePassword(credentialsId: 'SonarCloud_Zegorax_Token', passwordVariable: 'SONARCLOUD_API_TOKEN', usernameVariable: 'SONARCLOUD_API_USER')]) {
                    docker.image('mysql').withRun('-e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=mentorarc -e MYSQL_USER=mentorarc -e MYSQL_PASSWORD=mentorarc') { c ->
                        docker.image('mysql').inside("--link ${c.id}:db") {
                            /* Wait until mysql service is up */
                            sh 'while ! mysqladmin ping -hdb --silent; do sleep 1; done'
                        }
                            docker.image('maven:3-alpine').inside("--link ${c.id}:db") {
                                    checkout scm
                                    sh 'mv src/main/resources/application.properties.production src/main/resources/application.properties'
                                    sh 'mvn verify sonar:sonar'

						docker.image('maven:3-alpine').inside("--link ${c.id}:db") { d ->
							unstash 'mentorarc'
							sh 'java -jar ./MentorArc/target/MentorArc-0.0.1-SNAPSHOT.jar >/dev/null 2>&1 &'

							docker.image('lucienmoor/katalon-for-jenkins:latest').inside("--link ${d.id}") { 
								sh 'sleep 20'
								sh 'curl mentorarc:8081'
							}
						}
                    }

Katalon/.gitignore

0 → 100644
+16 −0
Original line number Diff line number Diff line
.gradle

bin

Reports

Libs

output

!output/.gitkeep
build

.classpath

.project
 No newline at end of file
+6 −0
Original line number Diff line number Diff line
# This file is used to configure Katalon Studio execution log levels.

# When you need to troubleshoot Katalon Studio issue
# logging.level.com.kms=TRACE

# logging.level.com.mycompany=DEBUG
 No newline at end of file
+28 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<Project>
   <description></description>
   <name>Mentorarc-Katalon</name>
   <tag></tag>
   <UUID>0ea3a622-e930-4edd-84b3-da286d23e01e</UUID>
   <migratedVersion>5.9.0</migratedVersion>
   <pageLoadTimeout>0</pageLoadTimeout>
   <sourceContent>
      <sourceFolderList>
         <sourceFolderConfiguration>
            <url>Include/scripts/groovy</url>
         </sourceFolderConfiguration>
      </sourceFolderList>
      <systemFolderList>
         <systemFolderConfiguration>
            <url>Include/scripts/groovy</url>
         </systemFolderConfiguration>
         <systemFolderConfiguration>
            <url>Include/features</url>
         </systemFolderConfiguration>
         <systemFolderConfiguration>
            <url>Include/config</url>
         </systemFolderConfiguration>
      </systemFolderList>
   </sourceContent>
   <type>WEBUI</type>
</Project>
+64 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<WebElementEntity>
   <description></description>
   <name>input_Mentor_waves-effect waves-light right btn teal darken-2</name>
   <tag></tag>
   <elementGuidId>6014ad1c-2681-4280-95e3-8fd2b40394e7</elementGuidId>
   <selectorCollection>
      <entry>
         <key>XPATH</key>
         <value>//input[@value='Se proposer']</value>
      </entry>
   </selectorCollection>
   <selectorMethod>XPATH</selectorMethod>
   <useRalativeImagePath>false</useRalativeImagePath>
   <webElementProperties>
      <isSelected>false</isSelected>
      <matchCondition>equals</matchCondition>
      <name>tag</name>
      <type>Main</type>
      <value>input</value>
   </webElementProperties>
   <webElementProperties>
      <isSelected>false</isSelected>
      <matchCondition>equals</matchCondition>
      <name>class</name>
      <type>Main</type>
      <value>waves-effect waves-light right btn teal darken-2</value>
   </webElementProperties>
   <webElementProperties>
      <isSelected>true</isSelected>
      <matchCondition>equals</matchCondition>
      <name>type</name>
      <type>Main</type>
      <value>submit</value>
   </webElementProperties>
   <webElementProperties>
      <isSelected>false</isSelected>
      <matchCondition>equals</matchCondition>
      <name>value</name>
      <type>Main</type>
      <value>Se proposer</value>
   </webElementProperties>
   <webElementProperties>
      <isSelected>false</isSelected>
      <matchCondition>equals</matchCondition>
      <name>xpath</name>
      <type>Main</type>
      <value>/html[1]/body[1]/div[@class=&quot;container&quot;]/div[1]/div[@class=&quot;row&quot;]/div[@class=&quot;col s12 m6&quot;]/div[@class=&quot;card-panel teal lighten-1&quot;]/div[@class=&quot;card-content white-text&quot;]/form[1]/input[@class=&quot;waves-effect waves-light right btn teal darken-2&quot;]</value>
   </webElementProperties>
   <webElementXpaths>
      <isSelected>true</isSelected>
      <matchCondition>equals</matchCondition>
      <name>xpath:attributes</name>
      <type>Main</type>
      <value>//input[@value='Se proposer']</value>
   </webElementXpaths>
   <webElementXpaths>
      <isSelected>false</isSelected>
      <matchCondition>equals</matchCondition>
      <name>xpath:position</name>
      <type>Main</type>
      <value>//input</value>
   </webElementXpaths>
</WebElementEntity>
Loading