-
Notifications
You must be signed in to change notification settings - Fork 7
Integration Test Procedure
- Log on to opera-pge-ci or opera-dev-pge.
- Use the 'docker images' command to see if there is an existing image you can use.
- If no images exists follow the steps in the Building PGE Container Images to add an image.
-
When the test_int_<pge>.sh script calls the test_int_setup_test_data() function, aws s3 cp commands are used to setup the following test directories and files (this example happens to be for 'cslc_s1'):
drwxr-xr-x 3 <user> cloud-user 24 Sep 12 21:41 delivery_cslc_s1_final_0.5.1_expected_input_data drwxr-xr-x 4 <user> cloud-user 75 Sep 12 21:46 delivery_cslc_s1_final_0.5.1_expected_output drwxrwxr-x 12 <user> cloud-user 4096 Feb 27 04:06 output_cslc_s1 drwxrwxr-x 12 <user> cloud-user 4096 Feb 27 04:59 output_cslc_s1_static drwxrwxr-x 2 <user> cloud-user 131 Feb 27 03:47 runconfig drwxrwxrwx 2 <user> cloud-user 6 Feb 27 03:47 scratch_cslc_s1 -rw-rw-r-- 1 <user> cloud-user 11814 Sep 12 21:59 validate_product.py
- If it does not already exist; use the mkdir <temp dir name> command to create a temporary directory within the directory containing the test_int_<pge>.sh script
- Below are the arguments to the script, controlled by the following switches:
- -h or --help : (optional) for usage summary.
- -t or --tag : (optional) user enters docker tag to select a docker image (default is '<user>-dev')
- -i or --input-data : (optional) user enters path to custom input data
- -e or --expected-data : (optional) user enters path to custom expected data
- --runconfig : (optional) user enters path to custom runconfig file
- --temp-root : (required) path to temporary directory created by user (directory name is up to the user (see above))
- --no-cleanup : (optional) suspends the deletion of the temporary directory (Note: user is now responsible for cleanup)
- --no-metrics : (optional) suspends the generation for runtime metrics
- Sample commands
- bash test_int_cslc_s1.sh --temp-root tmp/
- bash test_int_disp_s1.sh --temp-root temp/ --tag jehofman-dev --no-metrics --no-cleanup
- bash test_int_dswx_hls.sh --temp-root temp_dir/ -i <path to input data> -e <path expected data> --runconfig <path to runconfig file>
The Jenkins CI/CD pipelines can be found at https://opera-pge-ci.jpl.nasa.gov. Note that accessing this page requires JPL firewall access, as well as a set of JPL credentials to log in with.
Click the OPERA PGE Build/Integration Pipeline from the main dashboard.
From here you should see a list of the available release branches found in the last repository scan made by Jenkins. If your branch has not shown up yet, click the Scan Repository Now option from the left-hand menu, and the branch should show up shortly after.
Once you've selected the pipeline for the appropriate release branch, the next step is click the Build Now option from the left-hand menu to initialize the pipeline.
Because a Jenkins pipeline must be run at least once to pull in the corresponding Jenkinsfile from the github repository, the first build attempt for any release pipeline is expected to fail.
Also take note that the Build Now option has become Build With Parameters (if not try reloading the page), this indicates that Jenkins has now initialize the pipeline according to the Jenkinsfile, so we can now kick off the full pipeline.
For a typical integration test, the only parameters that should need modification are DOCKER_IMAGE_SUFFIXES.
By default, DOCKER_IMAGE_SUFFIXES is populated with suffix identifiers for all available PGE's, meaning all PGE's would be built, released to Artifactory, and tagged with the identifier used for the branch name. This field should be modified to include only those PGE's which are being tested.
If all parameters look correct, click the Build button at the bottom of the Parameters menu to kick off the pipeline. The release build and tests usually will a 1/2 hour or so for each configured PGE. Wait for the pipeline to complete. If there are errors click on the build number under Build History in the lower left quadrant. When the page refreshes look at Console Output to check the errors.
Related documentation (with images): (https://github.com/nasa/opera-sds-pge/wiki/Creating-a-Release)