Skip to content
Merged
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
25 changes: 25 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
// Copyright (c) 2017, 2022, Oracle and/or its affiliates.
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
//
import groovy.json.JsonSlurper
import java.time.Instant
import java.time.temporal.ChronoUnit

def kind_k8s_map = [
'0.11.1': [
'1.23.3': 'kindest/node:v1.23.3@sha256:0cb1a35ccd539118ce38d29a97823bae8fcef22fc94e9e33c0f4fadcdf9d4059',
Expand Down Expand Up @@ -51,6 +55,26 @@ def kind_k8s_map = [
]
def _kind_image = null

def printLatestChanges() {
// Show the latest changes for toolkit projects to help with troubleshooting build failures
def projectMap = [ 'WIT': 'https://api.github.com/repos/oracle/weblogic-image-tool/commits',
'WDT': 'https://api.github.com/repos/oracle/weblogic-deploy-tooling/commits']
def result = new StringBuilder().append("Project changes in last 2 days:")
def since = Instant.now().minus(2, ChronoUnit.DAYS).toString()
for ( def project in projectMap.entrySet() ) {
def projectCommitsResp = httpRequest project.value + '?since=' + since
if(projectCommitsResp.getStatus() == 200) {
def projectCommits = new JsonSlurper().parseText( projectCommitsResp.getContent() )
projectCommits.each{
result.append('\n').append(project.key).append(' : ').append(it.commit.message)
}
} else {
result.append('\n').append(project.key).append(' : HTTP ERROR, failed to get commits')
}
}
print result
}

pipeline {
agent { label 'VM.Standard2.8' }
options {
Expand Down Expand Up @@ -254,6 +278,7 @@ pipeline {
ulimit -a
ulimit -aH
'''
printLatestChanges()
script {
def knd = params.KIND_VERSION
def k8s = params.KUBE_VERSION
Expand Down