-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added readme. Refined build and updated version number
- Loading branch information
1 parent
903ecbc
commit 024911a
Showing
3 changed files
with
54 additions
and
3 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,38 @@ | ||
#!/bin/bash | ||
|
||
echo "" | ||
echo "-----------------------------------------------------" | ||
echo "Building Probo GitLab Handler Image" | ||
echo "-----------------------------------------------------" | ||
|
||
help() { | ||
echo "build.sh - script to build the container manager/github handler image" | ||
echo "" | ||
echo "Usage:" | ||
echo "./build.sh <repository_name> <tag>" | ||
echo "" | ||
echo "Example: To build an image tagged 'dev' for DockerHub on my account:" | ||
echo "./build.sh mbagnall dev\n" | ||
echo "" | ||
echo "Example: To build an image tagged 'dev' on a private registry with" | ||
echo "the 'probo' namespace:" | ||
echo "./build.sh docker.example.com/probo dev" | ||
echo "" | ||
exit 1; | ||
} | ||
|
||
if [ -n "$2" ]; then | ||
export tag=$2 | ||
else | ||
help | ||
fi | ||
|
||
if [ -z "$1" ]; then | ||
help | ||
fi | ||
|
||
echo -n "Hash: " | ||
docker build . -q -t $1/gitlab-handler:$tag | ||
echo -n "Repo: " | ||
docker push -q $1/gitlab-handler:$tag | ||
echo "" |
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