fix docker hub build path
add debian build add AWS upload
This commit is contained in:
parent
0970eba150
commit
0d1c365834
|
@ -52,7 +52,7 @@ linux-nigthly-test:
|
|||
- triggers
|
||||
- master
|
||||
script:
|
||||
- rustup default beta
|
||||
- rustup default nigthly
|
||||
- echo 'Running check'
|
||||
- cargo check -j $(nproc)
|
||||
- echo 'End check'
|
||||
|
@ -82,12 +82,25 @@ linux-stable:
|
|||
- echo 'Running bench from /benhcer' && echo -en 'gitlab_fold:start:bench'
|
||||
- ./tools/bench.sh
|
||||
- echo -en 'gitlab_fold:end:bench'
|
||||
- sh tools/deb_build.sh amd64
|
||||
- cp target/release/pbtc deb/usr/bin/pbtc
|
||||
- export VER=$(grep -m 1 version Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n")
|
||||
- dpkg-deb -b deb "pbtc_"$VER"_amd64.deb"
|
||||
- md5sum "pbtc_"$VER"_amd64.deb" > "pbtc_"$VER"_amd64.deb.md5"
|
||||
- aws configure set aws_access_key_id $s3_key
|
||||
- aws configure set aws_secret_access_key $s3_secret
|
||||
- if [[ $CI_BUILD_REF_NAME =~ ^(master|beta|stable|nightly)$ ]]; then export S3_BUCKET=parity-bitcoin-published; else export S3_BUCKET=parity-bitcoin-builds; fi
|
||||
- aws s3 rm --recursive s3://$S3_BUCKET/$CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu
|
||||
- aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/pbtc --body target/release/pbtc
|
||||
- aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/pbtc.md5 --body pbtc.md5
|
||||
- aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/"pbtc_"$VER"_amd64.deb" --body "pbtc_"$VER"_amd64.deb"
|
||||
- aws s3api put-object --bucket $S3_BUCKET --key $CI_BUILD_REF_NAME/x86_64-unknown-linux-gnu/"pbtc_"$VER"_amd64.deb.md5" --body "pbtc_"$VER"_amd64.deb.md5"
|
||||
tags:
|
||||
- rust
|
||||
artifacts:
|
||||
paths:
|
||||
- target/release/pbtc
|
||||
- target/release/pbtc.md5
|
||||
- pbtc.md5
|
||||
name: "stable-x86_64-unknown-linux-gnu_parity_bitcoin"
|
||||
docker-build:
|
||||
stage: build
|
||||
|
@ -100,7 +113,7 @@ docker-build:
|
|||
script:
|
||||
- if [ "$CI_BUILD_REF_NAME" == "beta-release" ]; then DOCKER_TAG="latest"; else DOCKER_TAG=$CI_BUILD_REF_NAME; fi
|
||||
- docker login -u $Docker_Hub_User_Parity -p $Docker_Hub_Pass_Parity
|
||||
- sh tools/docker-build.sh $DOCKER_TAG parity
|
||||
- sh tools/docker_build.sh $DOCKER_TAG parity
|
||||
- docker logout
|
||||
tags:
|
||||
- docker
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
rm -rf deb
|
||||
#create DEBIAN files
|
||||
mkdir -p deb/usr/bin/
|
||||
mkdir -p deb/DEBIAN
|
||||
#create copyright, docs, compat
|
||||
cp LICENSE deb/DEBIAN/copyright
|
||||
echo "https://github.com/paritytech/parity-bitcoin/" >> deb/DEBIAN/docs
|
||||
echo "8" >> deb/DEBIAN/compat
|
||||
#create control file
|
||||
control=deb/DEBIAN/control
|
||||
echo "Package: pbtc" >> $control
|
||||
version=`grep -m 1 version Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n"`
|
||||
echo "Version: $version" >> $control
|
||||
echo "Source: pbtc" >> $control
|
||||
echo "Section: science" >> $control
|
||||
echo "Priority: extra" >> $control
|
||||
echo "Maintainer: Parity Technologies <devops@parity.io>" >> $control
|
||||
echo "Build-Depends: debhelper (>=9)" >> $control
|
||||
echo "Standards-Version: 3.9.5" >> $control
|
||||
echo "Homepage: https://parity.io" >> $control
|
||||
echo "Vcs-Git: git://github.com/paritytech/parity-bitcoin.git" >> $control
|
||||
echo "Vcs-Browser: https://github.com/paritytech/parity-bitcoin" >> $control
|
||||
echo "Architecture: $1" >> $control
|
||||
echo "Depends: libssl1.0.0 (>=1.0.0)" >> $control
|
||||
echo "Description: Bitcoin network client by Parity Technologies" >> $control
|
||||
#build .deb package
|
||||
|
||||
exit
|
|
@ -0,0 +1,32 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e # fail on any error
|
||||
set -u # treat unset variables as error
|
||||
rm -rf deb
|
||||
#create DEBIAN files
|
||||
mkdir -p deb/usr/bin/
|
||||
mkdir -p deb/DEBIAN
|
||||
#create copyright, docs, compat
|
||||
cp LICENSE deb/DEBIAN/copyright
|
||||
echo "https://github.com/paritytech/parity-bitcoin/" >> deb/DEBIAN/docs
|
||||
echo "8" >> deb/DEBIAN/compat
|
||||
#create control file
|
||||
control=deb/DEBIAN/control
|
||||
echo "Package: pbtc" >> $control
|
||||
version=`grep -m 1 version Cargo.toml | awk '{print $3}' | tr -d '"' | tr -d "\n"`
|
||||
echo "Version: $version" >> $control
|
||||
echo "Source: pbtc" >> $control
|
||||
echo "Section: science" >> $control
|
||||
echo "Priority: extra" >> $control
|
||||
echo "Maintainer: Parity Technologies <devops@parity.io>" >> $control
|
||||
echo "Build-Depends: debhelper (>=9)" >> $control
|
||||
echo "Standards-Version: 3.9.5" >> $control
|
||||
echo "Homepage: https://parity.io" >> $control
|
||||
echo "Vcs-Git: git://github.com/paritytech/parity-bitcoin.git" >> $control
|
||||
echo "Vcs-Browser: https://github.com/paritytech/parity-bitcoin" >> $control
|
||||
echo "Architecture: $1" >> $control
|
||||
echo "Depends: libssl1.0.0 (>=1.0.0)" >> $control
|
||||
echo "Description: Bitcoin network client by Parity Technologies" >> $control
|
||||
#build .deb package
|
||||
|
||||
exit
|
Loading…
Reference in New Issue