Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ca61292

Browse files
Show the latest changes for toolkit projects during build (#3235)
1 parent 311262e commit ca61292

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

‎Jenkinsfile‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// Copyright (c) 2017, 2022, Oracle and/or its affiliates.
22
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
33
//
4+
import groovy.json.JsonSlurper
5+
import java.time.Instant
6+
import java.time.temporal.ChronoUnit
7+
48
def kind_k8s_map = [
59
'0.11.1': [
610
'1.23.3': 'kindest/node:v1.23.3@sha256:0cb1a35ccd539118ce38d29a97823bae8fcef22fc94e9e33c0f4fadcdf9d4059',
@@ -51,6 +55,26 @@ def kind_k8s_map = [
5155
]
5256
def _kind_image = null
5357

58+
def printLatestChanges() {
59+
// Show the latest changes for toolkit projects to help with troubleshooting build failures
60+
def projectMap = [ 'WIT': 'https://api.github.com/repos/oracle/weblogic-image-tool/commits',
61+
'WDT': 'https://api.github.com/repos/oracle/weblogic-deploy-tooling/commits']
62+
def result = new StringBuilder().append("Project changes in last 2 days:")
63+
def since = Instant.now().minus(2, ChronoUnit.DAYS).toString()
64+
for ( def project in projectMap.entrySet() ) {
65+
def projectCommitsResp = httpRequest project.value + '?since=' + since
66+
if(projectCommitsResp.getStatus() == 200) {
67+
def projectCommits = new JsonSlurper().parseText( projectCommitsResp.getContent() )
68+
projectCommits.each{
69+
result.append('\n').append(project.key).append(' : ').append(it.commit.message)
70+
}
71+
} else {
72+
result.append('\n').append(project.key).append(' : HTTP ERROR, failed to get commits')
73+
}
74+
}
75+
print result
76+
}
77+
5478
pipeline {
5579
agent { label 'VM.Standard2.8' }
5680
options {
@@ -254,6 +278,7 @@ pipeline {
254278
ulimit -a
255279
ulimit -aH
256280
'''
281+
printLatestChanges()
257282
script {
258283
def knd = params.KIND_VERSION
259284
def k8s = params.KUBE_VERSION

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /