-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the pipeline and create the deploy script
- Loading branch information
1 parent
6da4b97
commit 5a0cdf7
Showing
4 changed files
with
93 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/bin/bash | ||
|
||
# Accept the repo path as an argument | ||
repo_path=$1 | ||
|
||
# Run the metacall-deploy command and store the output | ||
output=$(metacall-deploy --inspect OpenAPIv3 --dev --workdir "$repo_path") | ||
|
||
# Parse the JSON output using jq to extract the server URL and paths | ||
server_url=$(echo "$output" | jq -r '.[0].servers[0].url') | ||
paths=$(echo "$output" | jq -r '.[0].paths | keys[]') | ||
|
||
# Output the server URL and paths | ||
echo "Server URL: $server_url" | ||
echo "Available Paths:" | ||
for path in $paths; do | ||
echo "$server_url$path" | ||
done | ||
|
||
# Set the server URL as an environment variable | ||
export SERVER_URL=$server_url | ||
|
||
|
||
# multi line comment | ||
: ' Exmaple output | ||
[ | ||
{ | ||
"openapi": "3.0.0", | ||
"info": { | ||
"title": "MetaCall Cloud FaaS deployment 'time-app-web'", | ||
"description": "", | ||
"version": "v1" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "http://localhost:9000/aa759149a70a/time-app-web/v1", | ||
"description": "MetaCall Cloud FaaS" | ||
} | ||
], | ||
"paths": { | ||
"/call/time": { | ||
"get": { | ||
"summary": "", | ||
"description": "", | ||
"responses": { | ||
"200": { | ||
"description": "", | ||
"content": { | ||
"application/json": { | ||
"schema": {} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/call/index": { | ||
"get": { | ||
"summary": "", | ||
"description": "", | ||
"responses": { | ||
"200": { | ||
"description": "", | ||
"content": { | ||
"application/json": { | ||
"schema": {} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] | ||
' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
config==0.5.1 | ||
metacall==0.5.0 | ||
PyYAML==6.0.1 | ||
PyYAML==6.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters