aqa-tests icon indicating copy to clipboard operation
aqa-tests copied to clipboard

Update the code for logic of USE_TESTENV_PROPERTIES

Open sophia-guo opened this issue 3 years ago • 5 comments

Boolean parameter USE_TESTENV_PROPERTIES is used to decide use the environment variables defined in testenv.properties file or defined by user.

Currently the codes are scattered in different places, which make it hard to maintain and understand.

https://github.com/adoptium/aqa-tests/blob/master/buildenv/jenkins/JenkinsfileBase#L32-L45 https://github.com/adoptium/aqa-tests/blob/master/buildenv/jenkins/JenkinsfileBase#L401-L406 https://github.com/adoptium/aqa-tests/blob/master/buildenv/jenkins/JenkinsfileBase#L425-L429 https://github.com/adoptium/aqa-tests/blob/master/buildenv/jenkins/JenkinsfileBase#L419-L423 https://github.com/adoptium/aqa-tests/blob/master/buildenv/jenkins/JenkinsfileBase#L413-L417

All those can be moved to one place https://github.com/adoptium/aqa-tests/blob/master/buildenv/jenkins/JenkinsfileBase#L32-L45

As function getGitRepoBranch() requires the defaultOwnerBranch, the second condition is unnecessary. For example if(!params.USE_TESTENV_PROPERTIES && params.ADOPTOPENJDK_SYSTEMTEST_OWNER_BRANCH) the condition params.ADOPTOPENJDK_SYSTEMTEST_OWNER_BRANCH can just be removed.

sophia-guo avatar Feb 10 '22 04:02 sophia-guo

i am up for this one

LizyBbethy avatar Feb 10 '22 07:02 LizyBbethy

@LizyBbethy - I've just assigned https://github.com/adoptium/aqa-tests/issues/3334 to you, so will leave this one unassigned for now.

smlambert avatar Feb 10 '22 16:02 smlambert

@sophia-guo I was unable to understand the Problem Correctly, Will you Please Help me Do we need to Replace

with !params.USE_TESTENV_PROPERTIES in code

I am new to groovy But I can try if this is only thing to do. Please Guide me.

abhijeetjejurkar avatar Mar 11 '22 16:03 abhijeetjejurkar

@sophia-guo I was unable to understand the Problem Correctly, Will you Please Help me Do we need to Replace

!params.USE_TESTENV_PROPERTIES && params.ADOPTOPENJDK_SYSTEMTEST_OWNER_BRANCH !params.USE_TESTENV_PROPERTIES && params.OPENJ9_SYSTEMTEST_OWNER_BRANCH !params.USE_TESTENV_PROPERTIES && params.STF_OWNER_BRANCH with !params.USE_TESTENV_PROPERTIES in code

Yes, @abhijeetjejurkar that is correct. And all three block can be combined to one !params.USE_TESTENV_PROPERTIES block.

sophia-guo avatar Apr 05 '22 21:04 sophia-guo

Hi @smlambert would like to take this issue

julian55455 avatar Oct 09 '22 15:10 julian55455

@julian55455 has this issue been accomplished?

zdtsw avatar Jan 12 '23 07:01 zdtsw

@zdtsw do you mean this https://github.com/adoptium/aqa-tests/pull/4023?

julian55455 avatar Jan 12 '23 07:01 julian55455

@zdtsw do you mean this #4023?

if #4023 is enough to close this issue, we should mark it as done.

zdtsw avatar Jan 12 '23 07:01 zdtsw

Closed via https://github.com/adoptium/aqa-tests/pull/4023

smlambert avatar Jan 12 '23 22:01 smlambert