Skip to content

Commit d8c3e08

Browse files
committed
Merge branch 'next' of https://github.com/HugoByte/aurras into next
2 parents e7a88c6 + 517e082 commit d8c3e08

File tree

13 files changed

+82
-47
lines changed

13 files changed

+82
-47
lines changed

actions/balance-filter/deploy.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,3 @@ build
2424

2525
$WSK_CLI -i --apihost "$openwhiskApiHost" action update ${ACTION} "$TEMP_DIR/main.zip" --docker "$DOCKER_IMAGE" \
2626
--auth "$openwhiskApiKey" --param push_notification_trigger "send-push-notification" --param db_url "http://admin:p@ssw0rd@172.17.0.1:5984" --param db_name "balance_filter_db" -a provide-api-key true
27-
28-
clear_temp

actions/balance-notification-registration/deploy.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,3 @@ build
2424

2525
$WSK_CLI -i --apihost "$openwhiskApiHost" action update ${ACTION} "$TEMP_DIR/main.zip" --docker "$DOCKER_IMAGE" \
2626
--auth "$openwhiskApiKey" --param event_registration_db "event_registration_db" --param balance_filter_db "balance_filter_db" --param db_name "balance_notification_registration_db" --param db_url "http://admin:p@ssw0rd@172.17.0.1:5984" --web true
27-
28-
clear_temp

actions/event-receiver/deploy.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,3 @@ build
2424

2525
$WSK_CLI -i --apihost "$openwhiskApiHost" action update ${ACTION} "$TEMP_DIR/main.zip" --docker "$DOCKER_IMAGE" \
2626
--auth "$openwhiskApiKey" -a provide-api-key true
27-
28-
clear_temp

actions/event-registration/deploy.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,3 @@ build
2424

2525
$WSK_CLI -i --apihost "$openwhiskApiHost" action update ${ACTION} "$TEMP_DIR/main.zip" --docker "$DOCKER_IMAGE" \
2626
--auth "$openwhiskApiKey" --param db_name "event_registration_db" --param db_url "http://admin:p@ssw0rd@172.17.0.1:5984" --param feed "kafka-provider-feed" --param brokers "[\"172.17.0.1:9092\"]" -a provide-api-key true
27-
28-
clear_temp

actions/kafka-provider-feed/deploy.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,3 @@ build
2424

2525
$WSK_CLI -i --apihost "$openwhiskApiHost" action update ${ACTION} "$TEMP_DIR/main.zip" --kind nodejs:default \
2626
--auth "$openwhiskApiKey" -a feed true --param endpoint "http://172.17.0.1:8888" --param web_action "kafka-provider-web" -a provide-api-key true
27-
28-
clear_temp

actions/kafka-provider-web/deploy.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,3 @@ build
2424

2525
$WSK_CLI -i --apihost "$openwhiskApiHost" action update ${ACTION} "$TEMP_DIR/main.zip" --kind nodejs:default \
2626
--auth "$openwhiskApiKey" --param endpoint "http://172.17.0.1:8888" --param db_url "http://admin:p@ssw0rd@172.17.0.1:5984" --param db_name "ow_kafka_triggers" -a provide-api-key true --web true
27-
28-
clear_temp

actions/push-notification/deploy.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,3 @@ $WSK_CLI -i --apihost "$openwhiskApiHost" action update ${ACTION} "$TEMP_DIR/mai
2828

2929
$WSK_CLI -i --apihost "$openwhiskApiHost" trigger update "send-${ACTION}" --auth "$openwhiskApiKey"
3030
$WSK_CLI -i --apihost "$openwhiskApiHost" rule update "${ACTION}-rule" "send-${ACTION}" ${ACTION} --auth "$openwhiskApiKey"
31-
32-
clear_temp

actions/substrate-event-processor/deploy.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,3 @@ $WSK_CLI -i --apihost "$openwhiskApiHost" action update ${ACTION} "$TEMP_DIR/mai
2727

2828
$WSK_CLI -i --apihost "$openwhiskApiHost" trigger update "produce-event" --auth "$openwhiskApiKey"
2929
$WSK_CLI -i --apihost "$openwhiskApiHost" rule update "produce-event-rule" "produce-event" "event-producer" --auth "$openwhiskApiKey"
30-
31-
clear_temp

deploy.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,22 @@
66
openwhiskApiHost=${openwhiskApiHost:-https://localhost:31001}
77
openwhiskApiKey=${openwhiskApiKey:-23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP}
88
openwhiskNamespace=${openwhiskNamespace:-guest}
9+
build=${build:-push-notification,balance-filter,event-receiver,event-registration,balance-notification-registration,event-producer,kafka-provider-feed,kafka-provider-web,substrate-event-processor}
10+
skip=${skip:-}
911

1012
actions=("actions/push-notification" "actions/balance-filter" "actions/event-receiver" "actions/event-registration" "actions/balance-notification-registration" "actions/event-producer" "actions/kafka-provider-feed" "actions/kafka-provider-web" "actions/substrate-event-processor")
1113

1214
source ./scripts/accept_params.sh
15+
source ./scripts/util.sh
16+
17+
build_array=(${build//,/ })
18+
skip_array=(${skip//,/ })
1319

1420
for index in ${!actions[@]};
1521
do
16-
chmod +x "$PWD/${actions[$index]}/deploy.sh"
17-
"$PWD/${actions[$index]}/deploy.sh" --openwhiskApiHost "$openwhiskApiHost" --openwhiskApiKey "$openwhiskApiKey" --openwhiskNamespace "$openwhiskNamespace"
22+
array_contains "${actions[$index]//actions\//}" "${skip_array[@]}" && true || {
23+
array_contains "${actions[$index]//actions\//}" "${build_array[@]}" && should_build=true || should_build=false
24+
chmod +x "$PWD/${actions[$index]}/deploy.sh"
25+
"$PWD/${actions[$index]}/deploy.sh" --openwhiskApiHost "$openwhiskApiHost" --openwhiskApiKey "$openwhiskApiKey" --openwhiskNamespace "$openwhiskNamespace" --build $should_build
26+
}
1827
done

docs/configuration.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,32 @@ Organization space where the actions to be deployed
4848
./deploy.sh --openwhiskNamespace guest
4949
```
5050

51+
###
52+
53+
### Build Action
54+
55+
Provide actions to be build, Accepts `none` or name of the actions separated by `,` to be build
56+
57+
| Parameter | Default Value |
58+
| :--- | :--- |
59+
| --build | push-notification,balance-filter,event-receiver,event-registration,balance-notification-registration,event-producer,kafka-provider-feed,kafka-provider-web,substrate-event-processor |
60+
61+
#### usage
62+
63+
```text
64+
./deploy.sh --build push-notification
65+
```
66+
67+
### Skip Build and Deploy Action
68+
69+
Provide actions to be skip, Accepts name of the available actions separated by `,`
70+
71+
| Parameter | Default Value |
72+
| :--- | :--- |
73+
| --skip | none |
74+
75+
#### usage
76+
77+
```text
78+
./deploy.sh --skip push-notification,balance-filter
79+
```

0 commit comments

Comments
 (0)