Skip to content

Commit baf0b2c

Browse files
Add nightly test to verify alias files against WLS versions (#862)
1 parent 28057ca commit baf0b2c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+1458743
-2
lines changed

Jenkinsfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,46 @@ pipeline {
7575
}
7676
}
7777
}
78+
stage ('Alias Test') {
79+
// only run this stage when triggered by a cron timer and the commit does not have []skip-ci in the message
80+
// for example, only run integration tests during the timer triggered nightly build
81+
when {
82+
allOf {
83+
triggeredBy 'TimerTrigger'
84+
branch "master"
85+
}
86+
}
87+
matrix {
88+
// run verify tests for each version in parallel.
89+
axes {
90+
axis {
91+
name 'WLS_VERSION'
92+
values '10.3.6.0', '12.1.1.0', '12.1.2.0.0', '12.1.3.0.0', '12.2.1.0.0', '12.2.1.1.0', '12.2.1.2.0', '12.2.1.3.0', '12.2.1.4.0', '14.1.1.0.0', '14.1.2.0.0'
93+
}
94+
}
95+
stages {
96+
stage('Test') {
97+
agent {
98+
docker {
99+
alwaysPull true
100+
reuseNode true
101+
image 'phx.ocir.io/weblogick8s/wdt/jenkinsslave:aliastest'
102+
args '-u jenkins -v /var/run/docker.sock:/var/run/docker.sock'
103+
}
104+
}
105+
steps {
106+
sh '/u01/verify/alias-test/src/test/resources/runIntegrationTest.sh -wls_version ${WLS_VERSION} -testfiles_path /u01/verify/testfiles;cp /u01/verify/testfiles/report* $WORKSPACE'
107+
}
108+
post {
109+
always {
110+
archiveArtifacts artifacts: 'report*', fingerprint: true
111+
}
112+
}
113+
}
114+
}
115+
}
116+
// after all sets are complete, the job will continue here.
117+
}
78118
stage ('Save Nightly Installer'){
79119
when {
80120
allOf {

alias-test/pom.xml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
4+
The Universal Permissive License (UPL), Version 1.0
5+
-->
6+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
7+
<modelVersion>4.0.0</modelVersion>
8+
9+
<artifactId>weblogic-deploy-alias-test</artifactId>
10+
11+
<parent>
12+
<artifactId>weblogic-deploy</artifactId>
13+
<groupId>com.oracle.weblogic.lifecycle</groupId>
14+
<version>1.9.7-SNAPSHOT</version>
15+
</parent>
16+
17+
<properties>
18+
<mw_home>${env.ORACLE_HOME}</mw_home>
19+
</properties>
20+
21+
<dependencies>
22+
<dependency>
23+
<groupId>junit</groupId>
24+
<artifactId>junit</artifactId>
25+
<scope>test</scope>
26+
</dependency>
27+
<dependency>
28+
<groupId>com.google.guava</groupId>
29+
<artifactId>guava</artifactId>
30+
<scope>test</scope>
31+
</dependency>
32+
<dependency>
33+
<groupId>commons-io</groupId>
34+
<artifactId>commons-io</artifactId>
35+
<version>2.6</version>
36+
<scope>test</scope>
37+
</dependency>
38+
</dependencies>
39+
40+
<build>
41+
<plugins>
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-compiler-plugin</artifactId>
45+
<executions>
46+
<execution>
47+
<id>test-compile</id>
48+
<phase>test-compile</phase>
49+
<goals>
50+
<goal>testCompile</goal>
51+
</goals>
52+
<configuration>
53+
</configuration>
54+
</execution>
55+
</executions>
56+
</plugin>
57+
<plugin>
58+
<groupId>org.apache.maven.plugins</groupId>
59+
<artifactId>maven-resources-plugin</artifactId>
60+
<executions>
61+
<execution>
62+
<id>test-resources</id>
63+
<phase>process-test-resources</phase>
64+
<goals>
65+
<goal>testResources</goal>
66+
</goals>
67+
</execution>
68+
</executions>
69+
</plugin>
70+
<plugin>
71+
<groupId>org.apache.maven.plugins</groupId>
72+
<artifactId>maven-failsafe-plugin</artifactId>
73+
<version>3.0.0-M3</version>
74+
<configuration>
75+
<encoding>UTF-8</encoding>
76+
<failIfNoTests>false</failIfNoTests>
77+
<argLine>
78+
-Xmx1024m -XX:MaxPermSize=256m
79+
</argLine>
80+
<systemProperties>
81+
<property>
82+
<name>wdtversion</name>
83+
<value>${project.version}</value>
84+
</property>
85+
<property>
86+
<name>MW_HOME</name>
87+
<value>${mw_home}</value>
88+
</property>
89+
</systemProperties>
90+
</configuration>
91+
<executions>
92+
<execution>
93+
<id>integration-tests</id>
94+
<goals>
95+
<goal>integration-test</goal>
96+
<goal>verify</goal>
97+
</goals>
98+
<phase>integration-test</phase>
99+
<configuration>
100+
<systemPropertyVariables>
101+
<java.util.logging.SimpleFormatter.format>%1$tm-%1$td-%1$tY %1$tH:%1$tM:%1$tS %4$-6s %2$s %5$s%6$s%n</java.util.logging.SimpleFormatter.format>
102+
</systemPropertyVariables>
103+
<trimStackTrace>false</trimStackTrace>
104+
</configuration>
105+
</execution>
106+
</executions>
107+
</plugin>
108+
</plugins>
109+
</build>
110+
</project>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""
2+
Copyright (c) 2020, Oracle Corporation and/or its affiliates.
3+
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
4+
"""
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""
2+
Copyright (c) 2020, Oracle Corporation and/or its affiliates.
3+
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
4+
"""
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
"""
2+
Copyright (c) 2020, Oracle Corporation and/or its affiliates.
3+
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
4+
"""
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
"""
2+
Copyright (c) 2021, Oracle Corporation and/or its affiliates.
3+
Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
4+
"""
5+
6+
import aliastest.generate.generator_wlst as generator_wlst
7+
8+
TYPES = 'Types'
9+
ADJUDICATOR_STRING = 'Adjudicator'
10+
adjudicator_types = None
11+
AUDITOR_STRING = 'Auditor'
12+
auditor_types = None
13+
AUTHENTICATION_PROVIDER_STRING = 'AuthenticationProvider'
14+
authentication_provider_types = None
15+
AUTHORIZER_STRING = 'Authorizer'
16+
authorizer_types = None
17+
CERTPATH_PROVIDER_STRING = 'CertPathProvider'
18+
certpath_provider_types = None
19+
PASSWORD_VALIDATOR_STRING = 'PasswordValidator'
20+
password_validator_types = None
21+
ROLE_MAPPER_STRING = 'RoleMapper'
22+
role_mapper_types = None
23+
24+
25+
def populate_security_types(helper):
26+
generator_wlst.connect(helper.admin_user, helper.admin_password, helper.admin_url)
27+
cd_security_configuration(helper.domain_name)
28+
adjudicator_types = generator_wlst.get(ADJUDICATOR_STRING + TYPES)
29+
auditor_types = genearator_wlst.get(AUDITOR_STRING + TYPES)
30+
authentication_provider_types = generator_wlst.get(AUTHENTICATION_PROVIDER_STRING + TYPES)
31+
32+
33+
def create_security_types(helper, offline):
34+
for i in adjudicator_types:
35+
if offline
36+
37+
38+
def create_security_type(helper, type, name, offline):
39+
cd_security_configuration(helper.domain_name)
40+
41+
42+
def cd_security_configuration(domain_name)
43+
generator_wlst.cd_mbean('/SecurityConfiguration/' + domain_name + '/Realms/myrealm')

0 commit comments

Comments
 (0)