-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a script to build CDAP sandbox and reverted the changes from run_e2e_test.py #237
Added a script to build CDAP sandbox and reverted the changes from run_e2e_test.py #237
Conversation
648a596
to
3333bfe
Compare
run_shell_command('mvn clean package -pl cdap-standalone,cdap-app-templates/cdap-etl -am -amd -DskipTests -P ' | ||
f'templates,dist,release,unit-tests -Dadditional.artifacts.dir=../../hydrator-plugins/') | ||
os.chdir("./cdap-standalone/target") | ||
sandbox_zip = "cdap-sandbox-6.11.0-SNAPSHOT.zip" |
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.
Do not hardcode sandbox version, you can simply find it in the target folder.
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.
Added a method to find the version of the sandbox. (ad2e033)
my_env["_JAVA_OPTIONS"] = "-Xmx32G" | ||
# Building the plugins | ||
os.chdir("..") | ||
hydrator_repository_url = "https://github.com/cdapio/hydrator-plugins.git" |
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.
If we want to use the same script for release branches, we will need to compute hydrator-plugins
branch as well from cdap-build
repo based on cdap branch: https://github.com/cdapio/cdap-build/blob/f785173eb3274b4b9d06e162ce09b9671b2eb091/.gitmodules#L8
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.
Added a logic to get the base branch (ex: develop) from e2e.yaml and then based on it we clone cdap-build repo and the look for hydrator-plugins branch in gitmodules. (0bed67d)
e2e.yaml workflow
- name: Run all e2e tests
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' || steps.filter.outputs.e2e-test == 'true'
run: python3 e2e/src/main/scripts/run_cdap_e2e_test.py --testRunner TestRunnerRequired.java --cdapBranch "${{ github.event.pull_request.base.ref }}"
Testing output :
f3924ff
to
0bed67d
Compare
os.chdir("..") | ||
# Extracting hydrator-plugins branch from cdap-build gitmodules. | ||
cdap_branch = "" | ||
if args.cdapBranch: |
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.
if cdapBranch
is not present should we fail the workflow?
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.
Yes, that makes sense. Added a check to fail the workflow in case the cdapBranch is empty (fdbc415)
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.
one comment, otherwise LGTM
fdbc415
to
366d622
Compare
Squashed the commits, merging the PR. |
Script Testing : Tested the scripts on a self hosted runner to make sure changes are working.