-
Notifications
You must be signed in to change notification settings - Fork 24
setup Jenkins job #1699
base: master
Are you sure you want to change the base?
setup Jenkins job #1699
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to give it another round, just some basics for now
wsit/hudson/setenv.sh
Outdated
@@ -65,7 +65,7 @@ set_ports() { | |||
ADMIN_PORT=4848 | |||
fi | |||
if [ -z "$INSTANCE_PORT" ] ; then | |||
INSTANCE_PORT=8080 | |||
INSTANCE_PORT=7998 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should not be changed as it is fallback
to the default where default glassfish domain is configured to listen at
wsit/hudson/quicklook.sh
Outdated
|
||
#domain setup | ||
echo "Re-creating default domain" | ||
create_domain |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is going to create new domain, later on (LInes 133-142) it is being altered...
Sth like following would do the same job:
#this can actually be set externally but if required to be explicitly overridden within the script
INSTANCE_PORT=7998
set_ports
create_domain
and you're done. Shorter, cleaner... important is ordering of these calls
wsit/hudson/jenkins.sh
Outdated
# | ||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | ||
# | ||
# Copyright (c) 2012-2017 Oracle and/or its affiliates. All rights reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is new file, so 2017 should be enough...
wsit/hudson/jenkins.sh
Outdated
|
||
#set env like CTS_URL [required] , MVN_SETTINGS[optional] , GF_URL [optional] | ||
METRO_MAJOR_VERSION=2.4.0 | ||
WORKSPACE=$PWD #linux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can and should be removed, the reference on line 359 can be replaced with $WORK_DIR
. Also note that this may overwrite the environment variable set by and coming from hudson/jenkins and that is unlikely something you want
if some sensitive default is really needed, then it should be wrapped within appropriate if
statement
wsit/hudson/jenkins.sh
Outdated
#PROXY | ||
set_proxy | ||
|
||
export JAVA_MEMORY_PROP="-Xms256m -Xmx768m -XX:PermSize=256m -XX:MaxPermSize=512m" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-XX:PermSize=256m -XX:MaxPermSize=512m
were deprecated on jdk8 and may cause troubles going forward... better to remove them (...you should see some warning on JDK8)
wsit/hudson/jenkins.sh
Outdated
|
||
if [! -d "$GF_SVN_ROOT" ]; then | ||
git init $GF_SVN_ROOT | ||
git fetch --tags --progress [email protected]:javaee/glassfish.git +refs/heads/*:refs/remotes/origin/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't you just git clone ...
?
wsit/hudson/jenkins.sh
Outdated
|
||
pushd $GF_SVN_ROOT | ||
git reset --hard | ||
git clean -fd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add x
... git clean -fdx
wsit/hudson/jenkins.sh
Outdated
git clone $METRO_SVN_REPO $METRO_SVN_ROOT | ||
pushd $METRO_SVN_ROOT/wsit/ | ||
git checkout $METRO_REVISION | ||
git pull |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, remove the call to git pull
. What is wanted here is to check given $METRO_REVISION
and not something on top of it
wsit/hudson/jenkins.sh
Outdated
echo "Updating IPS version to: metro_version=\"`echo $METRO_VERSION | cut -d \- -f 1`,0-`echo $METRO_VERSION | cut -d b -f 2`\"" | ||
pushd packager/resources/ | ||
sed -in 's/'`grep metro pkg_conf.py`'/metro_version="'`echo $METRO_VERSION | cut -d \- -f 1`',0-'`echo $METRO_VERSION | cut -d b -f 2`'"/g' pkg_conf.py | ||
popd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part related to IPS can be removed as it is not maintained on the GF side
82bccc9
to
81092b2
Compare
Some glassfish quicklook tests failed with FileNotFoundException , because the port 8080 are hard code in test. Should I just leave it there ? java.lang.Exception: java.io.FileNotFoundException: http://localhost:8080/jdbcusertx/MyServlet?testcase=noleak |
@lukasj , I think we can rewrite GF test codes locally to modify the port, what's your opinion? |
@Xiaojwu @zhengjl @gaoyan-gao @HOHOWU @lukasj