You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ad...@apache.org on 2019/07/04 09:23:11 UTC

[james-project] 01/03: JAMES-2773 Fix CI benchmark glowroot creation

This is an automated email from the ASF dual-hosted git repository.

aduprat pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit f7cf9679f0d0437fa5745619251956d5f7e84ad0
Author: Gautier DI FOLCO <gd...@linagora.com>
AuthorDate: Tue Jul 2 15:00:08 2019 +0200

    JAMES-2773 Fix CI benchmark glowroot creation
---
 JenkinsfileStressTests        | 88 -------------------------------------------
 JenkinsfileStressTests.groovy |  1 +
 2 files changed, 1 insertion(+), 88 deletions(-)

diff --git a/JenkinsfileStressTests b/JenkinsfileStressTests
deleted file mode 100644
index 9bf9425..0000000
--- a/JenkinsfileStressTests
+++ /dev/null
@@ -1,88 +0,0 @@
-// This file should respect the Jenkinsfile format describe here: 
-// https://jenkins.io/doc/book/pipeline/jenkinsfile/
-// 
-// It may be used by any Jenkins instance you own.
-//
-// In order to work properly, it requires the following parameters:
-// - SENARIO: the Gatling scenrio you want to play (ex. com.linagora.gatling.imap.scenario.ImapSimpleScenario)
-
-// Method in order to retry a command.
-// It may be used to wait for a service to be available.
-def maxRetries = 120
-def waitForCommandSuccess(command, maxRetries) {
-    def tries = 0;
-    while (tries++ < maxRetries) {
-        try {
-            sh command
-            return true
-        } catch (Exception e) {
-            if (tries >= maxRetries) {
-                throw new Exception("${maxRetries} tries exceeded. ${command} failed.", e)
-            }
-            sleep 1 SECONDS
-        }
-    }
-}
-
-pipeline {
-    agent { label 'my-slave' }
-
-    tools {
-        maven 'maven'
-    }
-
-    stages {
-        stage('Compile') {
-            steps {
-                sh "mvn clean install -T1C -DskipTests"
-            }
-        }
-        stage('Build image') {
-            steps {
-                script {
-                    docker.withTool('docker') {
-                        sh "cp server/container/guice/cassandra-rabbitmq-guice/target/james-server-cassandra-rabbitmq-guice.jar dockerfiles/run/guice/cassandra-rabbitmq/destination"
-                        sh "cp -r server/container/guice/cassandra-rabbitmq-guice/target/james-server-cassandra-rabbitmq-guice.lib dockerfiles/run/guice/cassandra-rabbitmq/destination"
-                        sh "cp server/container/cli/target/james-server-cli.jar dockerfiles/run/guice/cassandra-rabbitmq/destination"
-                        sh "cp -r server/container/cli/target/james-server-cli.lib dockerfiles/run/guice/cassandra-rabbitmq/destination"
-                        sh "docker build -t james_run dockerfiles/run/guice/cassandra-rabbitmq"
-                    }
-                }
-            }
-        }
-        stage('Start James') {
-            steps {
-                script {
-                    docker.withTool('docker') {
-                        sh "docker run -d --name=cassandra cassandra:3.11.3"
-                        sh "docker run -d --name=rabbitmq rabbitmq:3.7.7-management"
-                        sh "docker run -d --name=elasticsearch --env 'discovery.type=single-node' docker.elastic.co/elasticsearch/elasticsearch:6.3.2"
-
-                        sh "docker run -d --hostname HOSTNAME -p 25:25 -p 8081:80 -p 110:110 -p 143:143 -p 465:465 -p 587:587 -p 993:993 --link cassandra:cassandra --link rabbitmq:rabbitmq --link elasticsearch:elasticsearch --name james_run -t james_run"
-                        try {
-                            def jamesCliWithOptions = 'java -jar /root/james-cli.jar -h 127.0.0.1'
-                            waitForCommandSuccess("docker exec james_run ${jamesCliWithOptions} listusers", maxRetries)
-                        } catch (Exception e) {
-                            sh "docker logs james_run"
-                        }
-                    }
-                }
-            }
-        }
-        stage('Run Gatling test') {
-            steps {
-                build job: 'Gatling job', parameters: [[$class: 'StringParameterValue', name: 'SBT_ACTION', value: "gatling:testOnly  ${params.SCENARIO}"]]
-            }
-        }
-    }
-
-    post {
-        always {
-            script {
-                docker.withTool('docker') {
-                    sh "docker rm -f cassandra rabbitmq elasticsearch james_run"
-                }
-            }
-        }
-    }
-}
diff --git a/JenkinsfileStressTests.groovy b/JenkinsfileStressTests.groovy
index f9fb851..076cbdb 100644
--- a/JenkinsfileStressTests.groovy
+++ b/JenkinsfileStressTests.groovy
@@ -38,6 +38,7 @@ pipeline {
                             sh "cp server/container/cli/target/james-server-cli.jar dockerfiles/run/guice/cassandra-rabbitmq/destination"
                             sh "cp -r server/container/cli/target/james-server-cli.lib dockerfiles/run/guice/cassandra-rabbitmq/destination"
                             sh 'cp server/protocols/jmap-integration-testing/rabbitmq-jmap-integration-testing/src/test/resources/keystore dockerfiles/run/guice/cassandra-rabbitmq/destination/conf'
+                            sh 'wget -O dockerfiles/run/guice/cassandra-rabbitmq/destination/glowroot.zip https://github.com/glowroot/glowroot/releases/download/v0.13.4/glowroot-0.13.4-dist.zip && unzip -u dockerfiles/run/guice/cassandra-rabbitmq/destination/glowroot.zip -d dockerfiles/run/guice/cassandra-rabbitmq/destination'
                             sh 'docker build -t james_run dockerfiles/run/guice/cassandra-rabbitmq'
                         }
                     }


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org