diff --git a/.github/scripts/cicd_test/prep7_more_test_prep/05_process_ext_list.sh b/.github/scripts/cicd_test/prep7_more_test_prep/05_process_ext_list.sh index 22027e3c93..806af8fee0 100644 --- a/.github/scripts/cicd_test/prep7_more_test_prep/05_process_ext_list.sh +++ b/.github/scripts/cicd_test/prep7_more_test_prep/05_process_ext_list.sh @@ -35,11 +35,12 @@ if [[ "$MATRIX_TEST" == *"install-ext"* ]]; then if [[ "$each_ext" == *"("* ]] && [[ "$each_ext" == *")"* ]] ; then # user provides custom artifactory pattern ext_name=$(echo "$each_ext" | cut -d "(" -f1) - ext_pattern=$(echo "$each_ext" | cut -d "(" -f2 | cut -d ")" -f1) + ext_version=$(echo "$each_ext" | cut -d "(" -f2 | cut -d ")" -f1) + ext_pattern=$(echo "$DEFAULT_ZOWE_EXT_ARTIFACTORY_PATTERN" | sed "s#{ext-name}#$ext_name#g" | sed "s#{ext-version}#$ext_version#g" ) else # use default ext_name="$each_ext" - ext_pattern=$(echo "$DEFAULT_ZOWE_EXT_ARTIFACTORY_PATTERN" | sed "s#{ext-name}#$ext_name#g") + ext_pattern=$(echo "$DEFAULT_ZOWE_EXT_ARTIFACTORY_PATTERN" | sed "s#{ext-name}#$ext_name#g" | sed "s#{ext-version}#*#g" ) fi echo "[Check 4 INFO] extension name is $ext_name" @@ -58,4 +59,4 @@ if [[ "$MATRIX_TEST" == *"install-ext"* ]]; then EXTENSION_LIST=$(echo $EXTENSION_LIST | sed 's/;$//g') assert_env_var EXTENSION_LIST printf "${GREEN}[Check 4/$TOTAL_CHECK] Zowe extension list processing complete!${NC}\n" -fi \ No newline at end of file +fi diff --git a/.github/workflows/cicd-test-readme.md b/.github/workflows/cicd-test-readme.md index 082639da7b..4cdd371dc2 100644 --- a/.github/workflows/cicd-test-readme.md +++ b/.github/workflows/cicd-test-readme.md @@ -91,7 +91,7 @@ Background: CICD testing relies on a `zowe.pax` or `zowe-smpe.zip` (for SMPE ins - This input is pre-filled with `sample-node-api;sample-trial-app` to test [sample-node-api](https://github.com/zowe/sample-node-api) and [sample-trial-app](https://github.com/zowe/sample-trial-app) projects. In normal circumstances, you probably don't need to modify the pre-filled value here. - By default, the extension artifact search pattern is using format `libs-snapshot-local/org/zowe/{ext-name}/*/{ext-name}-*.pax` where `{ext-name}` will be processed and substituted from this input (as an example above, `sample-node-api`). Then the latest uploaded artifact will be used. -- Optionally, you can customized your extension artifact path. Customized jfrog artifactory path should exist, be valid, and enclosed in brackets and put after the extension name, eg. `sample-node-api(my/new/path/sample-node-api-cus.pax)`. A pattern contains `*` is also supported, which the latest artifact will be picked up. If multiple extensions are included, make sure to separate them by semi-colon. In addition to the artifactory path/pattern, you can also put a full http URL to any other remote location that points to an extension pax here. +- Optionally, you can customized your extension artifact version. Customized jfrog artifactory version should exist, be valid, and enclosed in brackets and put after the extension name, eg. `sample-node-api(3.0.0-SNAPSHOT)`. This example will create a search pattern like the following, where the latest artifact in the folder is picked up: `libs-snapshot-local/org/zowe/sample-node-api/3.0.0-SNAPSHOT/sample-node-api-*.pax`. A pattern containing `*` is also supported, which will result in the latest artifact in the latest folder matching the pattern. For example: `sample-node-api(1.0.0-*)` will create this search pattern: `libs-snapshot-local/org/zowe/sample-node-api/1.0.0-*/sample-node-api-*.pax`, which could match folders `1.0.0-SNAPSHOT`, `1.0.0-MAIN`, `1.0.0-user-pr-build`, etc. - The following regular expression will be used to check against your input ``` diff --git a/.github/workflows/cicd-test.yml b/.github/workflows/cicd-test.yml index 2df637d7ec..7db7d17e7e 100644 --- a/.github/workflows/cicd-test.yml +++ b/.github/workflows/cicd-test.yml @@ -52,7 +52,7 @@ on: required: false # FIXME: too slow to test 2, temporarily only test 1 # default: 'sample-node-api;sample-trial-app' - default: 'sample-node-api' + default: 'sample-node-api(3.0.0-SNAPSHOT)' RANDOM_DISPATCH_EVENT_ID: description: 'random dispatch event id' required: false @@ -66,7 +66,7 @@ env: DEFAULT_ZOWE_PAX_ARTIFACTORY_PATTERN: libs-snapshot-local/org/zowe/*zowe*{branch-name}*.pax DEFAULT_ZOWE_SMPE_ARTIFACTORY_PATTERN: libs-snapshot-local/org/zowe/*zowe-smpe*{branch-name}*.zip DEFAULT_ZOWE_CLI_ARTIFACTORY_PATTERN: PLACE_HOLDER/org/zowe/cli/zowe-cli-package/*zowe-cli-package-2*.zip - DEFAULT_ZOWE_EXT_ARTIFACTORY_PATTERN: libs-snapshot-local/org/zowe/{ext-name}/*/{ext-name}-*.pax + DEFAULT_ZOWE_EXT_ARTIFACTORY_PATTERN: libs-snapshot-local/org/zowe/{ext-name}/{ext-version}/{ext-name}-*.pax # below block can be overwritten, adjusted by DevOps only # ZOS_NODE_VERSION more to choose from: v16.20.1, v18.16.0 diff --git a/playbooks/README.md b/playbooks/README.md index 4223f0c004..dbb118cf0b 100644 --- a/playbooks/README.md +++ b/playbooks/README.md @@ -176,7 +176,7 @@ ansible-playbook -l install-kubernetes.yml -e kubeconfig= install-ext.yml -v --extra-vars "zowe_ext_url=https://zowe.jfrog.io/artifactory/libs-snapshot-local/org/zowe/sample-node-api/1.0.0-SNAPSHOT/sample-node-api-1.0.0-snapshot-6-20210126212259.pax" +$ ansible-playbook -l install-ext.yml -v --extra-vars "zowe_ext_url=https://zowe.jfrog.io/artifactory/libs-snapshot-local/org/zowe/sample-node-api/3.0.0-SNAPSHOT/sample-node-api-3.0.0-snapshot-66-20241002205335.pax" ``` You can also install an extension that exists in your local directory by using the `zowe_ext_local` variable. This will transfer the file from your local to the remote server and install the extension: