-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor docker yml and scripts * enable pr for test * fix path * fix path * rename img id * try simpler name * use -a * test tag * remove test steps * remove avalanchego from image id
- Loading branch information
Showing
5 changed files
with
60 additions
and
40 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,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
# If this is not a trusted build (Docker Credentials are not set) | ||
if [[ -z "$DOCKER_USERNAME" ]]; then | ||
exit 0; | ||
fi | ||
|
||
# Avalanche root directory | ||
SUBNET_EVM_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd ../.. && pwd ) | ||
|
||
# Load the versions | ||
source "$SUBNET_EVM_PATH"/scripts/versions.sh | ||
|
||
# Buld the docker image | ||
source "$SUBNET_EVM_PATH"/scripts/build_docker_image.sh | ||
|
||
if [[ $CURRENT_BRANCH == "master" ]]; then | ||
echo "Tagging current image as $DOCKERHUB_REPO:latest" | ||
docker tag "$DOCKERHUB_REPO:$BUILD_IMAGE_ID" "$DOCKERHUB_REPO:latest" | ||
fi | ||
|
||
echo "Pushing $DOCKERHUB_REPO:$BUILD_IMAGE_ID" | ||
|
||
echo "$DOCKER_PASS" | docker login --username "$DOCKER_USERNAME" --password-stdin | ||
|
||
docker push -a "$DOCKERHUB_REPO" |
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,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
# Directory above this script | ||
SUBNET_EVM_PATH=$( cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd ) | ||
|
||
# Load the constants | ||
source "$SUBNET_EVM_PATH"/scripts/constants.sh | ||
|
||
# Load the versions | ||
source "$SUBNET_EVM_PATH"/scripts/versions.sh | ||
|
||
# WARNING: this will use the most recent commit even if there are un-committed changes present | ||
BUILD_IMAGE_ID=${BUILD_IMAGE_ID:-"${CURRENT_BRANCH}"} | ||
|
||
echo "Building Docker Image: $DOCKERHUB_REPO:$BUILD_IMAGE_ID based of AvalancheGo@$AVALANCHE_VERSION" | ||
docker build -t "$DOCKERHUB_REPO:$BUILD_IMAGE_ID" "$SUBNET_EVM_PATH" -f "$SUBNET_EVM_PATH/Dockerfile" \ | ||
--build-arg AVALANCHE_VERSION="$AVALANCHE_VERSION" \ | ||
--build-arg SUBNET_EVM_COMMIT="$SUBNET_EVM_COMMIT" \ | ||
--build-arg CURRENT_BRANCH="$CURRENT_BRANCH" |
This file was deleted.
Oops, something went wrong.
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