GitLab CI: Copy the dist (tarball) build.

Copy it to an S3 bucket if the appropriate environment variables are set
and add it as an artifact.
This commit is contained in:
Gerald Combs 2020-12-21 12:09:55 -08:00
parent e2593e2022
commit c971d7f10c
1 changed files with 11 additions and 14 deletions

View File

@ -50,6 +50,8 @@
# setcap restricts our library paths # setcap restricts our library paths
- CFLAGS=-Wl,-rpath=$(pwd)/run CXXFLAGS=-Wl,-rpath=$(pwd)/run cmake -GNinja $CMAKE_ARGS .. - CFLAGS=-Wl,-rpath=$(pwd)/run CXXFLAGS=-Wl,-rpath=$(pwd)/run cmake -GNinja $CMAKE_ARGS ..
- ninja - ninja
- ninja install
- ninja shellcheck
- ninja test-programs - ninja test-programs
- chown -R user . - chown -R user .
- if [ -f run/dumpcap ]; then setcap cap_net_raw,cap_net_admin+eip run/dumpcap; fi - if [ -f run/dumpcap ]; then setcap cap_net_raw,cap_net_admin+eip run/dumpcap; fi
@ -75,21 +77,16 @@ build:ubuntu-dist:
script: script:
- perl ../tools/make-version.pl --set-release || ../perl make-version.pl --set-release - perl ../tools/make-version.pl --set-release || ../perl make-version.pl --set-release
- cmake -G Ninja $CMAKE_ARGS -DENABLE_CCACHE=ON .. - cmake -G Ninja $CMAKE_ARGS -DENABLE_CCACHE=ON ..
- ninja install
# - XXX The master Buildbot config built and copied the API reference
- packaging/source/git-export-release.sh -d . - packaging/source/git-export-release.sh -d .
- for digest in sha256 rmd160 sha1 ; do openssl $digest wireshark-*.tar.xz ; done - mv -v wireshark-*.tar.* "$CI_PROJECT_DIR"/
# XXX Should these be in test:ubuntu? after_script:
# - ninja test-programs - ccache --max-size $( du --summarize --block-size=1M "$CI_PROJECT_DIR/build" | awk '{printf ("%dM", $1 * 1.5)}' )
# - chown -R user . - for digest in sha256 rmd160 sha1 ; do openssl $digest wireshark-*.tar.* ; done
# - if [ -f run/dumpcap ]; then setcap cap_net_raw,cap_net_admin+eip run/dumpcap; fi # This will break if we produce multiple tarballs, which is arguably a good thing.
# - su user -c pytest-3 - if [ -n "$AWS_ACCESS_KEY_ID" ] && [ -n "$AWS_SECRET_ACCESS_KEY" ] && [ -n "$S3_DESTINATION_DIST" ] ; then aws s3 cp wireshark-*.tar.* "$S3_DESTINATION_DIST/" ; fi
- ninja shellcheck artifacts:
# We're still building tarballs on Buildbot. Leave this disabled for now paths:
# in order to avoid confusion. - wireshark-*.tar.*
# artifacts:
# paths:
# - wireshark-*.tar.xz
# The custom CentOS 7 image pre-installs dependencies and compilers to speed up the build: # The custom CentOS 7 image pre-installs dependencies and compilers to speed up the build:
# https://hub.docker.com/r/wireshark/wireshark-centos-7-dev # https://hub.docker.com/r/wireshark/wireshark-centos-7-dev