-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
33 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
steps: | ||
- label: publish docker | ||
command: ./scripts/docker-release.sh | ||
branches: "master | mhala-docker" |
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,26 @@ | ||
#!/bin/bash | ||
set -eo pipefail | ||
|
||
branch=${BUILDKITE_BRANCH//:/_} | ||
branch=${branch//\//_} | ||
commit=${BUILDKITE_COMMIT} | ||
|
||
if [[ ${commit} == "HEAD" ]]; then | ||
commit=$(git rev-parse HEAD) | ||
fi | ||
|
||
image_name="linkdrop" | ||
|
||
docker build -t $image_name . | ||
|
||
docker tag $image_name nearprotocol/${image_name}:${branch}-${commit} | ||
docker tag $image_name nearprotocol/${image_name}:${branch} | ||
|
||
set -x | ||
docker push nearprotocol/${image_name}:${branch}-${commit} | ||
docker push nearprotocol/${image_name}:${branch} | ||
if [[ ${branch} == "master" ]]; | ||
then | ||
docker tag $image_name nearprotocol/${image_name}:latest | ||
docker push nearprotocol/${image_name}:latest | ||
fi |