mirror of
https://github.com/jlengrand/sample-node-api.git
synced 2026-03-10 08:41:23 +00:00
Merge pull request #14 from JadinLuong/manifest
Created manifest file for sample-node-api
This commit is contained in:
@@ -34,6 +34,10 @@ echo "[${SCRIPT_NAME}] cleaning PAX workspace ..."
|
|||||||
rm -fr "${PAX_WORKSPACE_DIR}/content"
|
rm -fr "${PAX_WORKSPACE_DIR}/content"
|
||||||
mkdir -p "${PAX_WORKSPACE_DIR}/content"
|
mkdir -p "${PAX_WORKSPACE_DIR}/content"
|
||||||
|
|
||||||
|
cp manifest.yaml "${PAX_WORKSPACE_DIR}/content"
|
||||||
|
cp README.md "${PAX_WORKSPACE_DIR}/content"
|
||||||
|
cp LICENSE "${PAX_WORKSPACE_DIR}/content"
|
||||||
|
|
||||||
# build client
|
# build client
|
||||||
echo "[${SCRIPT_NAME}] building client ..."
|
echo "[${SCRIPT_NAME}] building client ..."
|
||||||
cd "dist"
|
cd "dist"
|
||||||
@@ -50,6 +54,21 @@ cp -r dist/. "${PAX_WORKSPACE_DIR}/content"
|
|||||||
# move content to another folder
|
# move content to another folder
|
||||||
rm -fr "${PAX_WORKSPACE_DIR}/ascii"
|
rm -fr "${PAX_WORKSPACE_DIR}/ascii"
|
||||||
mkdir -p "${PAX_WORKSPACE_DIR}/ascii"
|
mkdir -p "${PAX_WORKSPACE_DIR}/ascii"
|
||||||
|
|
||||||
|
# update build information
|
||||||
|
# BRANCH_NAME and BUILD_NUMBER is Jenkins environment variable
|
||||||
|
commit_hash=$(git rev-parse --verify HEAD)
|
||||||
|
current_timestamp=$(date +%s%3N)
|
||||||
|
sed -e "s|{{build\.branch}}|${BRANCH_NAME}|g" \
|
||||||
|
-e "s|{{build\.number}}|${BUILD_NUMBER}|g" \
|
||||||
|
-e "s|{{build\.commitHash}}|${commit_hash}|g" \
|
||||||
|
-e "s|{{build\.timestamp}}|${current_timestamp}|g" \
|
||||||
|
"${PAX_WORKSPACE_DIR}/content/manifest.yaml" > "${PAX_WORKSPACE_DIR}/content/manifest.yaml.tmp"
|
||||||
|
mv "${PAX_WORKSPACE_DIR}/content/manifest.yaml.tmp" "${PAX_WORKSPACE_DIR}/content/manifest.yaml"
|
||||||
|
echo "[${SCRIPT_NAME}] manifest:"
|
||||||
|
cat "${PAX_WORKSPACE_DIR}/content/manifest.yaml"
|
||||||
|
echo
|
||||||
|
|
||||||
rsync -rv \
|
rsync -rv \
|
||||||
--include '*.json' --include '*.html' --include '*.jcl' --include '*.template' \
|
--include '*.json' --include '*.html' --include '*.jcl' --include '*.template' \
|
||||||
--exclude '*.zip' --exclude '*.png' --exclude '*.tgz' --exclude '*.tar.gz' --exclude '*.pax' \
|
--exclude '*.zip' --exclude '*.png' --exclude '*.tgz' --exclude '*.tar.gz' --exclude '*.pax' \
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ In our sample it is:
|
|||||||
EXTERNAL_COMPONENTS=</usr/lpp/extender>/sample-node-api/bin
|
EXTERNAL_COMPONENTS=</usr/lpp/extender>/sample-node-api/bin
|
||||||
```
|
```
|
||||||
|
|
||||||
We expect following in service folder `start.sh`, `configure.sh` and `validate.sh`.
|
We expect following in service folder `start.sh` and `configure.sh`.
|
||||||
In our case its bin folder with relevant scripts.
|
In our case its bin folder with relevant scripts.
|
||||||
|
|
||||||
`configure.sh` it adds static definition for sample-node-api to folder ${INSTANCE_DIR}/workspace/api-mediation/api-defs in IBM-850 encoding
|
`configure.sh` it adds static definition for sample-node-api to folder ${INSTANCE_DIR}/workspace/api-mediation/api-defs in IBM-850 encoding
|
||||||
|
|||||||
0
bin/configure-2.sh
Normal file → Executable file
0
bin/configure-2.sh
Normal file → Executable file
0
bin/configure.sh
Normal file → Executable file
0
bin/configure.sh
Normal file → Executable file
0
bin/env.sh
Normal file → Executable file
0
bin/env.sh
Normal file → Executable file
0
bin/start.sh
Normal file → Executable file
0
bin/start.sh
Normal file → Executable file
19
manifest.yaml
Normal file
19
manifest.yaml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
name: sample-node-api
|
||||||
|
id: org.zowe.sample-node-api
|
||||||
|
title: Sample Node API
|
||||||
|
description: A Sample Node API extension for Zowe
|
||||||
|
license: EPL-2.0
|
||||||
|
repository:
|
||||||
|
type: git
|
||||||
|
url: https://github.com/zowe/sample-node-api.git
|
||||||
|
build:
|
||||||
|
branch: "{{build.branch}}"
|
||||||
|
number: "{{build.number}}"
|
||||||
|
commitHash: "{{build.commitHash}}"
|
||||||
|
timestamp: "{{build.timestamp}}"
|
||||||
|
commands:
|
||||||
|
start: bin/start.sh
|
||||||
|
configure: bin/configure.sh
|
||||||
|
apimlServices:
|
||||||
|
static:
|
||||||
|
- file: sample-node-api.yml
|
||||||
Reference in New Issue
Block a user