Skip to content

Commit 19749b9

Browse files
author
Tim Middleton
authored
Fix CI/CD for WLS (#281)
* Fix CI/CD for WLS * Fix scripts to use WORKSPACE if exists
1 parent b6b2dc7 commit 19749b9

File tree

4 files changed

+27
-12
lines changed

4 files changed

+27
-12
lines changed

scripts/test-create-cluster.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ fi
1818

1919
VERSION=$1
2020

21-
CONFIG_DIR=/tmp/$$.create
21+
# Use WORKSPACE directory if running under Jenkins
22+
TEMP_DIR=/tmp
23+
[ ! -z "$WORKSPACE" ] && TEMP_DIR=$WORKSPACE
24+
25+
CONFIG_DIR=${TEMP_DIR}/$$.create
2226
DIR=`pwd`
23-
OUTPUT=/tmp/$$.output
27+
OUTPUT=${TEMP_DIR}/$$.output
2428

2529
mkdir -p ${CONFIG_DIR}
2630
trap "rm -rf ${CONFIG_DIR} $OUTPUT" EXIT SIGINT

scripts/test-create-starter.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@
1111

1212
pwd
1313

14+
# Use WORKSPACE directory if running under Jenkins
15+
TEMP_DIR=/tmp
16+
[ ! -z "$WORKSPACE" ] && TEMP_DIR=$WORKSPACE
1417

15-
CONFIG_DIR=/tmp/$$.create.starter
18+
CONFIG_DIR=${TEMP_DIR}/$$.create.starter
1619
DIR=`pwd`
17-
OUTPUT=/tmp/$$.output
18-
STARTER_DIR=`mktemp -d`
20+
OUTPUT=${TEMP_DIR}/$$.output
21+
STARTER_DIR=${TEMP_DIR}/$$.starter
1922
LOGS_DIR=$DIR/build/_output/test-logs
2023

2124
mkdir -p ${CONFIG_DIR} ${STARTER_DIR} ${LOGS_DIR}

scripts/test-monitor-cluster.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
#
4-
# Copyright (c) 2024 Oracle and/or its affiliates.
4+
# Copyright (c) 2024, 2025 Oracle and/or its affiliates.
55
# Licensed under the Universal Permissive License v 1.0 as shown at
66
# https://oss.oracle.com/licenses/upl.
77
#
@@ -17,9 +17,13 @@ fi
1717

1818
VERSION=$1
1919

20-
export CONFIG_DIR=/tmp/$$.create
20+
# Use WORKSPACE directory if running under Jenkins
21+
TEMP_DIR=/tmp
22+
[ ! -z "$WORKSPACE" ] && TEMP_DIR=$WORKSPACE
23+
24+
export CONFIG_DIR=${TEMP_DIR}/$$.create
2125
export DIR=`pwd`
22-
OUTPUT=/tmp/$$.output
26+
OUTPUT=${TEMP_DIR}/$$.output
2327

2428
mkdir -p ${CONFIG_DIR}
2529
trap "rm -rf $CONFIG_DIR $OUTPUT" EXIT SIGINT

scripts/test-weblogic.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
#
4-
# Copyright (c) 2022, 2024 Oracle and/or its affiliates.
4+
# Copyright (c) 2022, 2025 Oracle and/or its affiliates.
55
# Licensed under the Universal Permissive License v 1.0 as shown at
66
# https://oss.oracle.com/licenses/upl.
77
#
@@ -20,13 +20,17 @@ if [ $# -ne 1 ] ; then
2020
exit
2121
fi
2222

23+
# Use WORKSPACE directory if running under Jenkins
24+
TEMP_DIR=/tmp
25+
[ ! -z "$WORKSPACE" ] && TEMP_DIR=$WORKSPACE
26+
2327
URL=$1
24-
CONFIG_DIR=/tmp/$$.weblogic
28+
CONFIG_DIR=${TEMP_DIR}/$$.weblogic
2529
DIR=`pwd`
26-
OUTPUT=/tmp/$$.output
30+
OUTPUT=${TEMP_DIR}/$$.output
2731

2832
mkdir -p ${CONFIG_DIR}
29-
trap "rm -rf ${CONFIG_DIR} $OUTPUT" EXIT SIGINT
33+
trap "cp ${CONFIG_DIR}/cohctl.log /tmp; rm -rf ${CONFIG_DIR} $OUTPUT" EXIT SIGINT
3034

3135
echo
3236
echo "Using URL: ${URL}"

0 commit comments

Comments
 (0)