Revert "Update .gitlab-ci.yml"

This reverts commit fb51f01e53
merge-requests/67/merge
chrbayer84 2021-03-09 04:49:44 +00:00 zatwierdzone przez Matthew Chambers
rodzic f11a3ea5cb
commit 781d3c0bc1
3 zmienionych plików z 38 dodań i 43 usunięć

Wyświetl plik

@ -61,7 +61,7 @@ packaging:
- if: '$CI_COMMIT_TAG =~ /^(v|test_).*/' - if: '$CI_COMMIT_TAG =~ /^(v|test_).*/'
artifacts: artifacts:
paths: paths:
- build/ - artifacts/
name: '$CI_COMMIT_REF_SLUG' name: '$CI_COMMIT_REF_SLUG'
cache: cache:
paths: paths:
@ -72,46 +72,40 @@ packaging:
- package.json - package.json
- package.nw/package.json - package.nw/package.json
script: script:
- mkdir -p $APT_CACHE_DIR $NPM_CONFIG_CACHE - |
- mkdir -p build/debian build/rpm mkdir -p $APT_CACHE_DIR $NPM_CONFIG_CACHE
- dpkg --add-architecture i386 mkdir -p artifacts/{debian,rpm}
- apt-get -qq update dpkg --add-architecture i386
- apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" install -y npm wine wine32 - |
- apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" install -y build-essential devscripts echo -e "\e[0Ksection_start:`date +%s`:apt_get[collapsed=true]\r\e[0KGetting Build Dependencies"
- apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" install -y rpm apt-get -qq update
- apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" build-dep . apt-get -qq -o dir::cache::archives="$APT_CACHE_DIR" install -y npm wine wine32
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" install -y rpm
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) - test `node version.js` = `dpkg-parsechangelog -S version` || (echo "package.nw/package.json and debian/changelog version mismatch"; exit 1)
- echo "Building native packages" - |
- npm install --prefer-offline echo -e "\e[0Ksection_start:`date +%s`:native_build\r\e[0KBuilding native packages"
- npm run dist npm install --prefer-offline
- for dir in dist/*-linux-* ; do if [ -d $dir ] ; then tar -C dist -cjf ${dir}.tar.bz `basename $dir` ; fi ; done npm run dist
- (cd dist ; mv *.exe *-mac-x64.zip *.tar.bz ../build) for dir in dist/*-linux-* ; do if [ -d $dir ] ; then tar -C dist -cjf ${dir}.tar.bz `basename $dir` ; fi ; done
- echo "Building Debian packages" echo `pwd`
- dpkg-buildpackage -uc -us (cd dist ; mv *.exe *-mac-x64.zip *.tar.bz ../artifacts)
- mv ../*.{deb,dsc,buildinfo,tar.xz,changes} build/debian/ echo -e "\e[0Ksection_end:`date +%s`:native_build\e[0K"
- echo "Building RPM packages" - |
- rpmbuild -D "version `node ./version.js`" --build-in-place -bb gridtracker.spec echo -e "\e[0Ksection_start:`date +%s`:debian_build\r\e[0KBuilding Debian packages"
- mv $HOME/rpmbuild/RPMS/noarch/gridtracker-*.noarch.rpm build/rpm echo `pwd`
dpkg-buildpackage -uc -us
# copy the assets over to our distribution storage (testing, tag = test_.*) echo `pwd`
gs_upload_testing: mv ../*.{deb,dsc,buildinfo,tar.xz,changes} artifacts/debian/
stage: deploy echo -e "\e[0Ksection_end:`date +%s`:debian_build\r\e[0K"
image: google/cloud-sdk:alpine - |
rules: echo -e "\e[0Ksection_start:`date +%s`:rpm_build\r\e[0KBuilding RPM packages"
- if: '$CI_COMMIT_TAG =~ /^(test_).*/ && $GCLOUD_SERVICE_ACCOUNT != "/dev/null"' rpmbuild -D "version `node ./version.js`" --build-in-place -bb gridtracker.spec
script: mv $HOME/rpmbuild/RPMS/noarch/gridtracker-*.noarch.rpm artifacts/rpm
- gcloud auth activate-service-account --key-file $GCLOUD_SERVICE_ACCOUNT ls -laR artifacts
- cd build; gsutil -m rsync -r . $GCLOUD_TESTING_DEPLOY_PATH echo -e "\e[0Ksection_end:`date +%s`:rpm_build\r\e[0K"
# copy the assets over to our distribution storage (full release, tag = v.*)
gs_upload_release:
stage: deploy
image: google/cloud-sdk:alpine
rules:
- if: '$CI_COMMIT_TAG =~ /^(v).*/ && $GCLOUD_SERVICE_ACCOUNT != "/dev/null"'
script:
- gcloud auth activate-service-account --key-file $GCLOUD_SERVICE_ACCOUNT
- cd build; gsutil -m rsync -r . $GCLOUD_RELEASE_DEPLOY_PATH
# copy the assets over to our distribution storage (testing, tag = test_.*) # copy the assets over to our distribution storage (testing, tag = test_.*)
s3_upload_testing: s3_upload_testing:
@ -120,7 +114,7 @@ s3_upload_testing:
rules: rules:
- if: '$CI_COMMIT_TAG =~ /^(test_).*/ && $AWS_ACCESS_KEY_ID != ""' - if: '$CI_COMMIT_TAG =~ /^(test_).*/ && $AWS_ACCESS_KEY_ID != ""'
script: 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.*) # copy the assets over to our distribution storage (full release, tag = v.*)
s3_upload_release: s3_upload_release:
@ -129,7 +123,7 @@ s3_upload_release:
rules: rules:
- if: '$CI_COMMIT_TAG =~ /^(v).*/ && $AWS_ACCESS_KEY_ID != ""' - if: '$CI_COMMIT_TAG =~ /^(v).*/ && $AWS_ACCESS_KEY_ID != ""'
script: 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 # this only creates a "source code release" -- gitlab doesn't specify binaries
# except as links to external storage, which is suboptimal for now # except as links to external storage, which is suboptimal for now

Wyświetl plik

@ -2,6 +2,7 @@ tar-ignore
tar-ignore=.DS_Store tar-ignore=.DS_Store
tar-ignore=.cache tar-ignore=.cache
tar-ignore=build tar-ignore=build
tar-ignore=artifacts
tar-ignore=dist tar-ignore=dist
tar-ignore=node_modules tar-ignore=node_modules
tar-ignore=package-lock.json tar-ignore=package-lock.json

Wyświetl plik

@ -13,7 +13,7 @@
"test": "eslint package.nw", "test": "eslint package.nw",
"lint-check": "eslint package.nw", "lint-check": "eslint package.nw",
"lint-fix": "eslint --fix package.nw", "lint-fix": "eslint --fix package.nw",
"dist": "build --concurrent --tasks win-x86,win-x64,linux-x86,linux-x64,mac-x64 package.nw", "dist": "build --concurrent --tasks win-x86,linux-x86,linux-x64,mac-x64 package.nw",
"distsome": "build --debug --tasks linux-x64,mac-x64 package.nw", "distsome": "build --debug --tasks linux-x64,mac-x64 package.nw",
"start": "run package.nw" "start": "run package.nw"
} }