Skip to content
Merged
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
9 changes: 4 additions & 5 deletions jobs/Jenkinsmatrixfile.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.netbeans.jenkins.NetBeansConstants;

pipeline {
options {
Expand All @@ -29,8 +28,8 @@ pipeline {

stage("clone and prepare build") {
tools {
jdk NetBeansConstants.JDK_BASELINE
ant NetBeansConstants.ANT_VERSION
jdk 'JDK_BASELINE'
ant 'ANT_VERSION'
}
steps {

Expand All @@ -54,7 +53,7 @@ pipeline {
axes {
axis {
name 'JDK'
values NetBeansConstants.JDK_BASELINE, NetBeansConstants.JDK_LATEST, NetBeansConstants.JDK_FUTURE
values 'JDK_BASELINE', 'JDK_LATEST', 'JDK_FUTURE'
}
axis {
name 'CLUSTER'
Expand Down Expand Up @@ -101,7 +100,7 @@ pipeline {
script {
// generate an index
// matrix axis (jdk and cluster) should be copied here matrix do not allow variable
def jdk = [NetBeansConstants.JDK_BASELINE,NetBeansConstants.JDK_LATEST,NetBeansConstants.JDK_FUTURE]
def jdk = ['JDK_BASELINE','JDK_LATEST','JDK_FUTURE']
def cluster = ['platform','ide','java','webcommon']

def content = '<!doctype html><html lang="en"><head><meta charset="utf-8"><title>testing website</title></head><body><h1>Unit and QA functional testing for Apache NetBeans</h1>'
Expand Down
9 changes: 7 additions & 2 deletions jobs/netbeanstestmatrix.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,17 @@
* specific language governing permissions and limitations
* under the License.
*/
import org.apache.netbeans.jenkins.NetBeansConstants;

pipelineJob('NetBeans/netbeans-matrix') {
definition {
cps {

script(readFileFromWorkspace('jobs/Jenkinsmatrixfile.groovy'))
def scriptcontent = readFileFromWorkspace('jobs/Jenkinsmatrixfile.groovy')
// replace all constant in the map by the actual value
for (entry in NetBeansConstants.REPLACE) {
scriptcontent = scriptcontent.replaceAll(entry.key,entry.value)
}
script(scriptcontent)
sandbox()
}
}
Expand Down
6 changes: 2 additions & 4 deletions jobs/org/apache/netbeans/jenkins/NetBeansConstants.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ package org.apache.netbeans.jenkins;
class NetBeansConstants {

static final String JDK_BASELINE = 'jdk_21_latest';

static final String JDK_LATEST = 'jdk_25_latest';

static final String JDK_FUTURE = 'jdk_26_latest';
static final String ANT_VERSION = 'ant_1.10_latest';


static final String ANT_VERSION = 'ant_1.10_latest';
static final REPLACE = ['JDK_BASELINE':JDK_BASELINE,'JDK_LATEST':JDK_LATEST,'JDK_FUTURE':JDK_FUTURE,'ANT_VERSION':ANT_VERSION];
}