mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
build: relocate *net deployment logic to their own directories
This commit is contained in:
parent
06b595b6ee
commit
1c188bcd47
2
.github/workflows/release_docker_hub.yml
vendored
2
.github/workflows/release_docker_hub.yml
vendored
@ -52,7 +52,7 @@ jobs:
|
|||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: ./docker
|
context: ./docker
|
||||||
file: ./docker/Dockerfile.GitHubActions
|
file: ./contrib/containers/deploy/Dockerfile.GitHubActions
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.docker_meta.outputs.tags }}
|
tags: ${{ steps.docker_meta.outputs.tags }}
|
||||||
labels: ${{ steps.docker_meta.outputs.labels }}
|
labels: ${{ steps.docker_meta.outputs.labels }}
|
||||||
|
@ -52,7 +52,7 @@ builddocker: &builddocker
|
|||||||
stage: build docker
|
stage: build docker
|
||||||
script:
|
script:
|
||||||
# no need to run tests again here
|
# no need to run tests again here
|
||||||
- if [ "$DOCKER_BUILD" = "true" ]; then $DOCKER_RUN_IN_BUILDER ./ci/dash/build_depends.sh && $DOCKER_RUN_IN_BUILDER ./ci/dash/build_src.sh && BUILD_DIR=build-ci/dashcore-$BUILD_TARGET ./docker/build-docker.sh; fi
|
- if [ "$DOCKER_BUILD" = "true" ]; then $DOCKER_RUN_IN_BUILDER ./ci/dash/build_depends.sh && $DOCKER_RUN_IN_BUILDER ./ci/dash/build_src.sh && BUILD_DIR=build-ci/dashcore-$BUILD_TARGET ./ci/dash/build-docker.sh; fi
|
||||||
|
|
||||||
- MAKEJOBS=-j3
|
- MAKEJOBS=-j3
|
||||||
- RUN_UNIT_TESTS=true
|
- RUN_UNIT_TESTS=true
|
||||||
@ -190,7 +190,7 @@ after_script:
|
|||||||
- echo $TRAVIS_COMMIT_RANGE
|
- echo $TRAVIS_COMMIT_RANGE
|
||||||
- echo $TRAVIS_COMMIT_LOG
|
- echo $TRAVIS_COMMIT_LOG
|
||||||
after_success:
|
after_success:
|
||||||
- if [ "$DOCKER_BUILD" = "true" ]; then docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD && ./docker/push-docker.sh; fi
|
- if [ "$DOCKER_BUILD" = "true" ]; then docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD && ./ci/dash/push-docker.sh; fi
|
||||||
- stage: lint
|
- stage: lint
|
||||||
name: 'lint'
|
name: 'lint'
|
||||||
env:
|
env:
|
||||||
|
27
ci/dash/build-docker.sh
Executable file
27
ci/dash/build-docker.sh
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
export LC_ALL=C
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
cd "$DIR"/../.. || exit
|
||||||
|
|
||||||
|
DOCKER_IMAGE=${DOCKER_IMAGE:-dashpay/dashd-develop}
|
||||||
|
DOCKER_TAG=${DOCKER_TAG:-latest}
|
||||||
|
DOCKER_RELATIVE_PATH=contrib/containers/deploy
|
||||||
|
|
||||||
|
BUILD_DIR=${BUILD_DIR:-.}
|
||||||
|
|
||||||
|
|
||||||
|
if [ -d $DOCKER_RELATIVE_PATH/bin ]; then
|
||||||
|
rm $DOCKER_RELATIVE_PATH/bin/*
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir $DOCKER_RELATIVE_PATH/bin
|
||||||
|
cp "$BUILD_DIR"/src/dashd $DOCKER_RELATIVE_PATH/bin/
|
||||||
|
cp "$BUILD_DIR"/src/dash-cli $DOCKER_RELATIVE_PATH/bin/
|
||||||
|
cp "$BUILD_DIR"/src/dash-tx $DOCKER_RELATIVE_PATH/bin/
|
||||||
|
strip $DOCKER_RELATIVE_PATH/bin/dashd
|
||||||
|
strip $DOCKER_RELATIVE_PATH/bin/dash-cli
|
||||||
|
strip $DOCKER_RELATIVE_PATH/bin/dash-tx
|
||||||
|
|
||||||
|
docker build --pull -t "$DOCKER_IMAGE":"$DOCKER_TAG" -f $DOCKER_RELATIVE_PATH/Dockerfile docker
|
@ -3,7 +3,7 @@
|
|||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
cd $DIR/.. || exit
|
cd "$DIR"/../.. || exit
|
||||||
|
|
||||||
DOCKER_IMAGE=${DOCKER_IMAGE:-dashpay/dashd-develop}
|
DOCKER_IMAGE=${DOCKER_IMAGE:-dashpay/dashd-develop}
|
||||||
DOCKER_TAG=${DOCKER_TAG:-latest}
|
DOCKER_TAG=${DOCKER_TAG:-latest}
|
||||||
@ -14,6 +14,6 @@ else
|
|||||||
DOCKER_IMAGE_WITH_REPO=$DOCKER_IMAGE
|
DOCKER_IMAGE_WITH_REPO=$DOCKER_IMAGE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker tag $DOCKER_IMAGE:$DOCKER_TAG $DOCKER_IMAGE_WITH_REPO:$DOCKER_TAG
|
docker tag "$DOCKER_IMAGE":"$DOCKER_TAG" "$DOCKER_IMAGE_WITH_REPO":"$DOCKER_TAG"
|
||||||
docker push $DOCKER_IMAGE_WITH_REPO:$DOCKER_TAG
|
docker push "$DOCKER_IMAGE_WITH_REPO":"$DOCKER_TAG"
|
||||||
docker rmi $DOCKER_IMAGE_WITH_REPO:$DOCKER_TAG
|
docker rmi "$DOCKER_IMAGE_WITH_REPO":"$DOCKER_TAG"
|
@ -1,22 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
export LC_ALL=C
|
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
cd $DIR/.. || exit
|
|
||||||
|
|
||||||
DOCKER_IMAGE=${DOCKER_IMAGE:-dashpay/dashd-develop}
|
|
||||||
DOCKER_TAG=${DOCKER_TAG:-latest}
|
|
||||||
|
|
||||||
BUILD_DIR=${BUILD_DIR:-.}
|
|
||||||
|
|
||||||
rm docker/bin/*
|
|
||||||
mkdir docker/bin
|
|
||||||
cp $BUILD_DIR/src/dashd docker/bin/
|
|
||||||
cp $BUILD_DIR/src/dash-cli docker/bin/
|
|
||||||
cp $BUILD_DIR/src/dash-tx docker/bin/
|
|
||||||
strip docker/bin/dashd
|
|
||||||
strip docker/bin/dash-cli
|
|
||||||
strip docker/bin/dash-tx
|
|
||||||
|
|
||||||
docker build --pull -t $DOCKER_IMAGE:$DOCKER_TAG -f docker/Dockerfile docker
|
|
Loading…
Reference in New Issue
Block a user