kopia lustrzana https://gitlab.com/gridtracker.org/gridtracker
split build native and build deb into separate processes
rodzic
35c7e91fd2
commit
02c21e79d8
|
@ -54,7 +54,7 @@ npm_test:
|
|||
|
||||
# package binaries and create build artifacts that may be used in later stages
|
||||
|
||||
packaging:
|
||||
npm-packaging:
|
||||
stage: package
|
||||
rules:
|
||||
# only do this with a manual tag starting with v or test_
|
||||
|
@ -93,15 +93,6 @@ packaging:
|
|||
echo `pwd`
|
||||
(cd dist ; mv *.exe *-mac-x64.zip *.tar.gz ../artifacts)
|
||||
echo -e "\e[0Ksection_end:`date +%s`:native_build\e[0K"
|
||||
# Commenting out the debian build to see if it's overall file size kicking artifact uploads or an individual file.
|
||||
# If it's overall, maybe have to split the package process into phases and upload each phase's artifacts individually.
|
||||
#- |
|
||||
# echo -e "\e[0Ksection_start:`date +%s`:debian_build\r\e[0KBuilding Debian packages"
|
||||
# echo `pwd`
|
||||
# dpkg-buildpackage -uc -us
|
||||
# echo `pwd`
|
||||
# mv ../*.{deb,dsc,buildinfo,tar.xz,changes} artifacts/debian/
|
||||
# echo -e "\e[0Ksection_end:`date +%s`:debian_build\r\e[0K"
|
||||
- |
|
||||
echo -e "\e[0Ksection_start:`date +%s`:rpm_build\r\e[0KBuilding RPM packages"
|
||||
mkdir -p $HOME/rpmbuild/SOURCES
|
||||
|
@ -113,6 +104,45 @@ packaging:
|
|||
ls -laR artifacts
|
||||
echo -e "\e[0Ksection_end:`date +%s`:rpm_build\r\e[0K"
|
||||
echo "we made packages!"
|
||||
deb-packaging:
|
||||
stage: package
|
||||
rules:
|
||||
# only do this with a manual tag starting with v or test_
|
||||
- if: '$CI_COMMIT_TAG =~ /^(v|test_).*/'
|
||||
artifacts:
|
||||
paths:
|
||||
- artifacts/
|
||||
name: '$CI_COMMIT_REF_SLUG'
|
||||
cache:
|
||||
paths:
|
||||
- .cache/
|
||||
- node_modules/
|
||||
key:
|
||||
files:
|
||||
- package.json
|
||||
- package.nw/package.json
|
||||
script:
|
||||
- |
|
||||
mkdir -p $APT_CACHE_DIR $NPM_CONFIG_CACHE
|
||||
mkdir -p artifacts/{debian,rpm}
|
||||
dpkg --add-architecture i386
|
||||
- |
|
||||
echo -e "\e[0Ksection_start:`date +%s`:apt_get[collapsed=true]\r\e[0KGetting Build Dependencies"
|
||||
apt-get -qq update
|
||||
apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" install -y npm
|
||||
apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" install -y build-essential devscripts
|
||||
apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" build-dep .
|
||||
echo -e "\e[0Ksection_end:`date +%s`:apt_get\r\e[0K"
|
||||
- test `node version.js` = `dpkg-parsechangelog -S version` || (echo "package.nw/package.json and debian/changelog version mismatch"; exit 1)
|
||||
Commenting out the debian build to see if it's overall file size kicking artifact uploads or an individual file.
|
||||
If it's overall, maybe have to split the package process into phases and upload each phase's artifacts individually.
|
||||
- |
|
||||
echo -e "\e[0Ksection_start:`date +%s`:debian_build\r\e[0KBuilding Debian packages"
|
||||
echo `pwd`
|
||||
dpkg-buildpackage -uc -us
|
||||
echo `pwd`
|
||||
mv ../*.{deb,dsc,buildinfo,tar.xz,changes} artifacts/debian/
|
||||
echo -e "\e[0Ksection_end:`date +%s`:debian_build\r\e[0K"
|
||||
|
||||
# copy the assets over to our distribution storage (testing, tag = test_.*)
|
||||
s3_upload_testing:
|
||||
|
@ -121,7 +151,7 @@ s3_upload_testing:
|
|||
rules:
|
||||
- if: '$CI_COMMIT_TAG =~ /^(test_).*/ && $AWS_ACCESS_KEY_ID != ""'
|
||||
script:
|
||||
- cd build; aws s3 sync . $AWS_TESTING_DEPLOY_PATH
|
||||
- cd artifacts; aws s3 sync . $AWS_TESTING_DEPLOY_PATH
|
||||
|
||||
# copy the assets over to our distribution storage (full release, tag = v.*)
|
||||
s3_upload_release:
|
||||
|
@ -130,7 +160,7 @@ s3_upload_release:
|
|||
rules:
|
||||
- if: '$CI_COMMIT_TAG =~ /^(v).*/ && $AWS_ACCESS_KEY_ID != ""'
|
||||
script:
|
||||
- cd build; aws s3 sync . $AWS_RELEASE_DEPLOY_PATH
|
||||
- cd artifacts; aws s3 sync . $AWS_RELEASE_DEPLOY_PATH
|
||||
|
||||
# this only creates a "source code release" -- gitlab doesn't specify binaries
|
||||
# except as links to external storage, which is suboptimal for now
|
||||
|
|
Ładowanie…
Reference in New Issue