test new Jenkinsfile and switch integration test port to 8888
This commit is contained in:
parent
26406b4fdb
commit
015806db5b
6 changed files with 37 additions and 7 deletions
32
Jenkinsfile
vendored
32
Jenkinsfile
vendored
|
@ -14,12 +14,42 @@ pipeline {
|
||||||
stages {
|
stages {
|
||||||
stage('Maven build') {
|
stage('Maven build') {
|
||||||
steps {
|
steps {
|
||||||
withMaven(maven: 'Maven3.9.6') {
|
withMaven(maven: 'Maven3.9.6', options: [findbugsPublisher(disabled: true)]) {
|
||||||
sh "mvn clean install"
|
sh "mvn clean install"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
stage('Reporting') {
|
||||||
|
steps {
|
||||||
|
withMaven(maven: 'Maven', options: [findbugsPublisher(disabled: true)]) {
|
||||||
|
sh "mvn --batch-mode -V -U -e -P let_reporting pmd:pmd pmd:cpd findbugs:findbugs spotbugs:spotbugs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
junit testResults: '**/target/surefire-reports/TEST-*.xml'
|
||||||
|
|
||||||
|
recordIssues enabledForFailure: true, tool: spotBugs()
|
||||||
|
recordIssues enabledForFailure: true, tool: pmdParser(pattern: '**/target/pmd.xml')
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
setBuildStatus("Build failed", "FAILURE");
|
||||||
|
emailext body: "The build of the LET Application (${env.JOB_NAME}) failed! See ${env.BUILD_URL}", recipientProviders: [[$class: 'CulpritsRecipientProvider']], subject: 'LET Application Build Failure'
|
||||||
|
}
|
||||||
|
success {
|
||||||
|
setBuildStatus("Build complete", "SUCCESS");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
options {
|
||||||
|
timeout(time: 10, unit: 'MINUTES')
|
||||||
|
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '7'))
|
||||||
|
}
|
||||||
|
triggers {
|
||||||
|
pollSCM('H/5 * * * *')
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -16,9 +16,9 @@ public class ProxyDataTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCreation() {
|
public void testCreation() {
|
||||||
final ProxyData proxyData = new ProxyData("proxyName", 8080, new ClientCredentials("user1", "password"));
|
final ProxyData proxyData = new ProxyData("proxyName", 8888, new ClientCredentials("user1", "password"));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
"ProxyData [proxyName=proxyName, proxyPort=8080, clientCredentials=ClientCredentials [clientId=user1]]",
|
"ProxyData [proxyName=proxyName, proxyPort=8888, clientCredentials=ClientCredentials [clientId=user1]]",
|
||||||
proxyData.toString());
|
proxyData.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ public abstract class GuiIntegrationTest {
|
||||||
|
|
||||||
final HttpSession sessionMock = Mockito.mock(HttpSession.class);
|
final HttpSession sessionMock = Mockito.mock(HttpSession.class);
|
||||||
final WebserviceURIService webserviceURIService = new WebserviceURIService(
|
final WebserviceURIService webserviceURIService = new WebserviceURIService(
|
||||||
"http", "localhost", "8080", "/", this.endpoint);
|
"http", "localhost", "8888", "/", this.endpoint);
|
||||||
|
|
||||||
final ClientHttpRequestFactoryService clientHttpRequestFactoryService = Mockito
|
final ClientHttpRequestFactoryService clientHttpRequestFactoryService = Mockito
|
||||||
.mock(ClientHttpRequestFactoryService.class);
|
.mock(ClientHttpRequestFactoryService.class);
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class SEBClientBot {
|
||||||
private final ObjectMapper jsonMapper = new ObjectMapper();
|
private final ObjectMapper jsonMapper = new ObjectMapper();
|
||||||
private final Random random = new Random();
|
private final Random random = new Random();
|
||||||
|
|
||||||
String webserviceAddress = "http://localhost:8080";
|
String webserviceAddress = "http://localhost:8888";
|
||||||
String accessTokenEndpoint = "/oauth/token";
|
String accessTokenEndpoint = "/oauth/token";
|
||||||
String clientId = "test";
|
String clientId = "test";
|
||||||
String sessionId = null;
|
String sessionId = null;
|
||||||
|
|
|
@ -2922,7 +2922,7 @@ public class UseCasesIntegrationTest extends GuiIntegrationTest {
|
||||||
.getBuilder(NewLmsSetup.class)
|
.getBuilder(NewLmsSetup.class)
|
||||||
.withFormParam(Domain.LMS_SETUP.ATTR_NAME, "Test Open edx")
|
.withFormParam(Domain.LMS_SETUP.ATTR_NAME, "Test Open edx")
|
||||||
.withFormParam(Domain.LMS_SETUP.ATTR_LMS_TYPE, LmsType.OPEN_EDX.name())
|
.withFormParam(Domain.LMS_SETUP.ATTR_LMS_TYPE, LmsType.OPEN_EDX.name())
|
||||||
.withFormParam(Domain.LMS_SETUP.ATTR_LMS_URL, "http://localhost:8080/openedxtest")
|
.withFormParam(Domain.LMS_SETUP.ATTR_LMS_URL, "http://localhost:8888/openedxtest")
|
||||||
.withFormParam(Domain.LMS_SETUP.ATTR_LMS_CLIENTNAME, "test")
|
.withFormParam(Domain.LMS_SETUP.ATTR_LMS_CLIENTNAME, "test")
|
||||||
.withFormParam(Domain.LMS_SETUP.ATTR_LMS_CLIENTSECRET, "test")
|
.withFormParam(Domain.LMS_SETUP.ATTR_LMS_CLIENTSECRET, "test")
|
||||||
.call();
|
.call();
|
||||||
|
|
|
@ -6,7 +6,7 @@ spring.http.encoding.charset=UTF-8
|
||||||
spring.http.encoding.enabled=true
|
spring.http.encoding.enabled=true
|
||||||
|
|
||||||
server.address=localhost
|
server.address=localhost
|
||||||
server.port=8080
|
server.port=8888
|
||||||
server.servlet.context-path=/
|
server.servlet.context-path=/
|
||||||
|
|
||||||
spring.main.allow-bean-definition-overriding=true
|
spring.main.allow-bean-definition-overriding=true
|
||||||
|
|
Loading…
Reference in a new issue