Skip to content
This repository has been archived by the owner on Jan 30, 2019. It is now read-only.

setup Jenkins job #1699

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

setup Jenkins job #1699

wants to merge 1 commit into from

Conversation

yuHe1
Copy link
Member

@yuHe1 yuHe1 commented Jul 7, 2017

  1. Add support for glassfish 5.
  2. change 8080 to 7998 for port conflict.
  3. Disable devtest due to build issue and webservice folder has not been moved to tests/
  4. Only generate patch for published metro.

@Xiaojwu @zhengjl @gaoyan-gao @HOHOWU @lukasj

Copy link
Member

@lukasj lukasj left a 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

@@ -65,7 +65,7 @@ set_ports() {
ADMIN_PORT=4848
fi
if [ -z "$INSTANCE_PORT" ] ; then
INSTANCE_PORT=8080
INSTANCE_PORT=7998
Copy link
Member

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


#domain setup
echo "Re-creating default domain"
create_domain
Copy link
Member

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

#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright (c) 2012-2017 Oracle and/or its affiliates. All rights reserved.
Copy link
Member

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...


#set env like CTS_URL [required] , MVN_SETTINGS[optional] , GF_URL [optional]
METRO_MAJOR_VERSION=2.4.0
WORKSPACE=$PWD #linux
Copy link
Member

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

#PROXY
set_proxy

export JAVA_MEMORY_PROP="-Xms256m -Xmx768m -XX:PermSize=256m -XX:MaxPermSize=512m"
Copy link
Member

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)


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/*
Copy link
Member

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 ... ?


pushd $GF_SVN_ROOT
git reset --hard
git clean -fd
Copy link
Member

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

git clone $METRO_SVN_REPO $METRO_SVN_ROOT
pushd $METRO_SVN_ROOT/wsit/
git checkout $METRO_REVISION
git pull
Copy link
Member

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

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
Copy link
Member

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

@yuHe1 yuHe1 force-pushed the FIX-METRO-267 branch 4 times, most recently from 82bccc9 to 81092b2 Compare July 14, 2017 04:22
@yuHe1
Copy link
Member Author

yuHe1 commented Jul 14, 2017

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

@zhengjl
Copy link
Member

zhengjl commented Aug 3, 2017

@lukasj , I think we can rewrite GF test codes locally to modify the port, what's your opinion?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants