24 lines
461 B
Bash
Executable File
24 lines
461 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Build script for hello-world function
|
|
|
|
set -e
|
|
|
|
echo "Building hello-world function..."
|
|
|
|
# Build the Docker image
|
|
docker build -t hello-world-function .
|
|
|
|
echo "Testing the function locally..."
|
|
|
|
# Test without input
|
|
echo "Test 1: No input"
|
|
docker run --rm hello-world-function
|
|
|
|
echo ""
|
|
echo "Test 2: With name input"
|
|
docker run --rm -e FUNCTION_INPUT='{"name": "Alice"}' hello-world-function
|
|
|
|
echo ""
|
|
echo "Function built and tested successfully!"
|