Skip to content

Commit b87f504

Browse files
committed
add docs for jenkins scripts integration
1 parent df5dc17 commit b87f504

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

scripts/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,24 @@ curl -L "https://raw.githubusercontent.com/ViderumGlobal/ckan-cloud-operator/${C
3131
| tee /dev/stderr \
3232
| if [ "${SCRIPT_EXT}" == "py" ]; then python3; else bash; fi
3333
```
34+
35+
## Jenkins integration
36+
37+
* Set job name the same as a script name
38+
* Define the args as parameters for the job
39+
40+
For .sh scripts:
41+
42+
```
43+
export CKAN_CLOUD_OPERATOR_VERSION="v0.2.2"
44+
curl -L "https://raw.githubusercontent.com/ViderumGlobal/ckan-cloud-operator/${CKAN_CLOUD_OPERATOR_VERSION}/scripts/$(echo "$JOB_NAME" | sed 's/ /%20/g').sh" \
45+
| tee /dev/stderr | bash
46+
```
47+
48+
For .py scripts:
49+
50+
```
51+
export CKAN_CLOUD_OPERATOR_VERSION="v0.2.2"
52+
curl -L "https://raw.githubusercontent.com/ViderumGlobal/ckan-cloud-operator/${CKAN_CLOUD_OPERATOR_VERSION}/scripts/$(echo "$JOB_NAME" | sed 's/ /%20/g').py" \
53+
| tee /dev/stderr | python3
54+
```

0 commit comments

Comments
 (0)