Skip to content

Commit

Permalink
fix sample-node-api version used in v3 pipelines
Browse files Browse the repository at this point in the history
Signed-off-by: MarkAckert <[email protected]>
  • Loading branch information
MarkAckert committed Oct 4, 2024
1 parent f2c9ca7 commit e129bf1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
fi
2 changes: 1 addition & 1 deletion .github/workflows/cicd-test-readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cicd-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion playbooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ ansible-playbook -l <server> install-kubernetes.yml -e kubeconfig=<location_of_t

You can install an extension by providing it's full url to the extension using the `zowe_ext_url` variable. This will download and install the extension onto the specified running Zowe instance:
```
$ ansible-playbook -l <server> 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 <server> 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:
Expand Down

0 comments on commit e129bf1

Please sign in to comment.