Skip to content

Commit 39aecf9

Browse files
committed
Update build script
1 parent ec3470c commit 39aecf9

4 files changed

Lines changed: 11 additions & 13 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN apt-get install -y lua5.3 luarocks liblua5.3-dev build-essential libssl-dev
99
COPY ./src /opt/executor
1010

1111
# Build the sdk and save it in luarocks default folder
12-
WORKDIR /opt/executor/pm4-sdk-lua
12+
WORKDIR /opt/executor/sdk-lua
1313
RUN luarocks make --local
1414

1515
# Set working directory to our /opt/executor location

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# executor-lua
22
Script Task Executor Engine with LUA Runtime
33

4-
This docker image provides a sandboxed protected environment to run custom LUA scripts that are written in ProcessMaker Spark.
4+
This docker image provides a sandboxed protected environment to run custom LUA scripts that are written in ProcessMaker 4.
55
User created script tasks should be isolated however have utilities available to them in order to get most common tasks done. This
66
LUA environment has modules available so Script Tasks can take advantage of the following libraries:
77

@@ -20,7 +20,7 @@ When writing a Script Task, three global variables are available. They are:
2020

2121
- data - A record that represents the data loaded from data.json
2222
- config - A record that represents the config loaded from config.json
23-
- client - The ProcessMaker Spark LUA SDK Client preconfigured to access the API via OAuth authentication
23+
- client - The ProcessMaker 4 LUA SDK Client preconfigured to access the API via OAuth authentication
2424

2525
Your script should execute quickly. Once the script is complete, your return statement will be used and converted to JSON which
2626
will be stored in the output.json file. Once the docker execution is complete, you should the return code of the docker execution.

build.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ BRANCH=${BRANCH:=master}
55
TAG=${TAG:=dev-${BRANCH//[\/]/-}}
66

77
pushd src
8-
if [[ ! -d "pm4-sdk-lua" ]]; then
9-
git clone --branch ${BRANCH} --depth 1 https://github.com/ProcessMaker/pm4-sdk-lua.git
8+
if [[ ! -d "sdk-lua" ]]; then
9+
git clone --branch ${BRANCH} --depth 1 https://github.com/ProcessMaker/sdk-lua.git
1010
fi
1111
popd
1212

13-
docker build -t processmaker/pm4-docker-executor-lua:${TAG} .
14-
rm -rf src/pm4-sdk-lua
15-
16-
# Push to dockerhub here
13+
docker build -t processmaker4/executor-lua:${TAG} .
14+
rm -rf src/sdk-lua

test.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
set -e
22
set -x
33

4-
API_TOKEN=bearer-token-here
5-
API_HOST=http://bpm4.local.processmaker.com/api/1.0
4+
API_TOKEN=token
5+
API_HOST=http://pm.local.processmaker.com/api/1.0
66

7-
EXECUTOR_IMAGE="processmaker/pm4-docker-executor-lua:dev-master"
7+
EXECUTOR_IMAGE="processmaker4/executor-lua:dev-master"
88
EXECUTOR_DIR=${PWD}/tests/sdk
99

1010
docker run --rm \
@@ -17,4 +17,4 @@ docker run --rm \
1717
$EXECUTOR_IMAGE lua5.3 bootstrap.lua
1818

1919
cat $EXECUTOR_DIR/output.json
20-
echo '' > $EXECUTOR_DIR/output.json
20+
echo '' > $EXECUTOR_DIR/output.json

0 commit comments

Comments
 (0)