Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiP - ARC-530 test instance #17

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion aws/agent-host/launch-agent.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
#!/bin/bash
set -xe

source "../settings.sh"
AGENT_NUMBER=${1:-0}

# Launch worker
docker run --rm -d \
--add-host jenkins:${IP_JENKINS_MASTER} --add-host gitserver:${IP_UTIL_CONTAINERS} \
--name agent -l role=agent \
--name agent_${AGENT_NUMBER} -l role=agent \
-e "COMMAND_OPTIONS=-master http://jenkins:8080 -executors $(nproc) -description swarm-slave" \
svanoort/jenkins-swarm-agent-mvn:1.0
7 changes: 7 additions & 0 deletions aws/agent-host/launch-multiple-agents.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
set -xe
AGENT_NUMBER=${1:-5}

for ((n=0;n<${AGENT_NUMBER};n++)) ; do
bash -ex launch-agent.sh $n
done
2 changes: 1 addition & 1 deletion aws/instance-preconfigure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ sudo yum install -y git
sudo yum install -y docker && sudo service docker start
sudo chkconfig docker on
sudo groupadd docker || echo "Group already exists"
sudo usermod -aG docker $USER
sudo usermod -aG docker ec2-user

# Add Maven installation?
38 changes: 38 additions & 0 deletions gitserver/testcases/ScriptedCloneAndBuildParallel/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
def x = [:]
for (def i=0; i<15; i++) {
def j = i;
x.put("branch${i}", {
node {

// TODO:copy-paste
// Figure out why the Global Tools stuff refuses to work.
// withEnv(["JAVA_HOME=${ tool 'jdk8' }", "PATH+MAVEN=${tool 'maven'}/bin:${env.JAVA_HOME}/bin"]) {

stage ('Sanity Check') {
echo "Where is maven?"
sh "which mvn"
echo "Where is java?"
sh "which java"
}

stage('Check out') {
git (credentialsId: "git-ssh", url: "ssh://git@gitserver:2222/git-server/repos/simple-maven-project-with-tests.git")
}

stage('Build it') {
// Old, fancy way which never worked:
// sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean package"
// New, simple way which works fine:
sh "mvn -Dmaven.test.failure.ignore clean package"
}

stage('Archive our results') {
junit '**/target/surefire-reports/TEST-*.xml'
archive 'target/*.jar'
}
// } // ends the withEnv block

}})
}

parallel(x)
3 changes: 0 additions & 3 deletions jenkins/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,9 @@ ENTRYPOINT ["/bin/tini", "--", "/usr/local/bin/full-start.sh"]
# Lock files write is a workaround for a bug in plugin install file where it tries to remove nonexistent lock
# Basic config - install custom and test framework plugins + custom snapshots
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
COPY minimal-plugins.txt /usr/share/jenkins/ref/minimal-plugins.txt
RUN mkdir -p /usr/share/jenkins/ref/plugins \
&& echo 'placeholder' > /usr/share/jenkins/ref/plugins/placeholder.lock \
&& /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt
RUN echo 'placeholder' > /usr/share/jenkins/ref/plugins/placeholder.lock \
&& /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/minimal-plugins.txt
COPY CUSTOM-PLUGINS/*.*pi /usr/share/jenkins/ref/plugins/

# Remove stale executor files and rename HPI files to JPI files to input custom versions
Expand Down
11 changes: 0 additions & 11 deletions jenkins/minimal-plugins.txt

This file was deleted.

84 changes: 59 additions & 25 deletions jenkins/plugins.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,60 @@
git:latest
git-client:latest
pipeline-build-step:latest
pipeline-graph-analysis:latest
pipeline-input-step:latest
pipeline-maven:latest
pipeline-milestone-step:latest
pipeline-model-api:latest
pipeline-model-declarative-agent:latest
pipeline-model-definition:latest
pipeline-stage-step:latest
pipeline-stage-tags-metadata:latest
pipeline-stage-view:latest
scm-api:latest
script-security:latest
ace-editor:1.1
apache-httpcomponents-client-4-api:4.5.5-3.0
authentication-tokens:1.3
branch-api:2.0.20
cloudbees-folder:6.5.1
command-launcher:1.0
config-file-provider:2.18
credentials:2.1.18
credentials-binding:1.16
display-url-api:2.2.0
docker-commons:1.13
docker-workflow:1.17
durable-task:1.25
git:3.9.1
git-client:2.7.3
git-server:1.7
handlebars:1.1.1
jackson2-api:2.8.11.3
jdk-tool:1.0
jquery-detached:1.2.1
jsch:0.1.54.2
junit:1.24
mailer:1.21
matrix-project:1.13
metrics:4.0.2.2
momentjs:1.1.1
pipeline-build-step:2.7
pipeline-graph-analysis:1.7
pipeline-input-step:2.8
pipeline-maven:3.5.11
pipeline-milestone-step:1.3.1
pipeline-model-api:1.3.1
pipeline-model-declarative-agent:1.1.1
pipeline-model-definition:1.3.1
pipeline-model-extensions:1.3.1
pipeline-rest-api:2.10
pipeline-stage-step:2.3
pipeline-stage-tags-metadata:1.3.1
pipeline-stage-view:2.10
plain-credentials:1.4
scm-api:2.2.7
script-security:1.44
ssh-credentials:1.14
ssh-slaves:1.26
structs:1.14
support-core:2.49
swarm:3.4
token-macro:2.5
variant:1.1
workflow-aggregator:2.5
workflow-api:latest
workflow-basic-steps:latest
workflow-cps:latest
workflow-cps-global-lib:latest
workflow-durable-task-step:latest
workflow-job:latest
workflow-multibranch:latest
workflow-scm-step:latest
workflow-step-api:latest
workflow-support:latest
workflow-api:2.29
workflow-basic-steps:2.9
workflow-cps:2.54
workflow-cps-global-lib:2.9
workflow-durable-task-step:2.20
workflow-job:2.24
workflow-multibranch:2.20
workflow-scm-step:2.6
workflow-step-api:2.16
workflow-support:2.20
8 changes: 8 additions & 0 deletions runner/ARC-530-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Trivial testcase for standard Hydra
# Intended to exercise runner framework
# format: test name, jobname, max concurrent number to run, ramp up time in ms, testDuration ms
Sample Test|testcases/LotsOfEchoSteps|6|30000|120000
Large Shell Step Logs|testcases/LargeShellStepLogs|4|30000|120000
Massively Parallel Node Use And Sh Steps|testcases/MassivelyParallelNodes|4|30000|450000
Scripted Pipeline Maven Build - Single|testcases/ScriptedCloneAndBuild|64|600000|300000
Scripted Pipeline Maven Build - Parallel|testcases/ScriptedCloneAndBuildParallel|64|600000|300000
2 changes: 2 additions & 0 deletions runner/run-arc-530-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
java -jar target/hydra-runner-1.0-SNAPSHOT-jar-with-dependencies.jar -t "basic-test,sample" -f ARC-530-test.txt -w 30000 -i ${IP_UTIL_CONTAINERS}:8086 -j ${IP_JENKINS_MASTER}:8080