File tree Expand file tree Collapse file tree 4 files changed +15
-9
lines changed
Expand file tree Collapse file tree 4 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 1616 }
1717 stage("Run Examples") {
1818 withEnv(["API_KEY=${env.ROSETTE_API_KEY}", "ALT_URL=${env.BINDING_TEST_URL}"]) {
19- sh "docker run --rm -e API_KEY=${API_KEY} -e ALT_URL=${ALT_URL} -v ${SOURCEDIR}:/source ${TEST_CONTAINER}"
19+ def examplesDir = ${SOURCEDIR} + '/examples'
20+ sh "docker run --rm -e API_KEY=${API_KEY} -e ALT_URL=${ALT_URL} -v ${examplesDir}:/source ${TEST_CONTAINER}"
2021 }
2122 }
2223 slack(true)
Original file line number Diff line number Diff line change @@ -76,5 +76,8 @@ See [examples](examples).
7676## API Documentation
7777See [ documentation] ( http://rosette-api.github.io/nodejs )
7878
79+ ## Release Notes
80+ See [ wiki] ( https://github.com/rosette-api/nodejs/wiki/Release-Notes )
81+
7982## Additional Information
8083See [ Rosette API site] ( https://developer.rosette.com/ )
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ RUN apt-get -y update && apt-get install -y git && apt-get install -y vim && apt
77ENV API_KEY api_key
88
99# set the working directory
10- RUN mkdir /nodejs-dev
11- WORKDIR /nodejs-dev
10+ RUN mkdir -p /nodejs-dev/examples
11+ WORKDIR /nodejs-dev/examples
1212COPY runAll.sh runAll.sh
1313RUN chmod 0755 runAll.sh
1414
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ function checkAPI() {
2121 if [ ! -z $match ]; then
2222 echo -e " \nInvalid Rosette API Key"
2323 exit 1
24- fi
24+ fi
2525}
2626
2727# add the trailing slash of the alt_url if necessary
@@ -41,7 +41,7 @@ function validateURL() {
4141 if [ " ${match} " = " " ]; then
4242 echo -e " \n${ping_url} server not responding\n"
4343 exit 1
44- fi
44+ fi
4545}
4646
4747function runExample() {
@@ -93,19 +93,21 @@ cp -r -n /source/. .
9393# Run the examples
9494if [ ! -z ${API_KEY} ]; then
9595 checkAPI
96- # Prerequisite
97- cd ./examples
96+ npm install rosette-api
97+ cp -r node_modules/rosette-api/lib ../lib
98+ pushd ../lib
99+ npm install multipart-stream
100+ popd
98101 npm install argparse
99102 npm install temporary
100- npm install multipart-stream
101103 if [ ! -z ${FILENAME} ]; then
102104 runExample ${FILENAME}
103105 else
104106 for file in * .js; do
105107 runExample ${file}
106108 done
107109 fi
108- else
110+ else
109111 HELP
110112fi
111113
You can’t perform that action at this time.
0 commit comments