gitlab-ci: replace old notation with extends.

This commit is contained in:
Dario Lombardo 2020-12-21 17:19:29 +01:00 committed by Wireshark GitLab Utility
parent 33ab986589
commit 55bcf95d52
1 changed files with 16 additions and 16 deletions

View File

@ -14,15 +14,15 @@
variables: variables:
CCACHE_DIR: "${CI_PROJECT_DIR}/ccache" CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
.build: &build .build:
stage: build stage: build
after_script: after_script:
- for builddir in build/packaging/rpm/BUILD/wireshark-*/build build/packaging/rpm/BUILD/wireshark-* build obj-*; do [ ! -d "$builddir/run" ] || break; done - for builddir in build/packaging/rpm/BUILD/wireshark-*/build build/packaging/rpm/BUILD/wireshark-* build obj-*; do [ ! -d "$builddir/run" ] || break; done
- if [[ "$CI_JOB_NAME" == "build:rpm-opensuse-"* ]]; then export LD_LIBRARY_PATH=$builddir/run; fi - if [[ "$CI_JOB_NAME" == "build:rpm-opensuse-"* ]]; then export LD_LIBRARY_PATH=$builddir/run; fi
- if [ -f $builddir/run/tshark ]; then $builddir/run/tshark --version; fi - if [ -f $builddir/run/tshark ]; then $builddir/run/tshark --version; fi
.build-ubuntu: &build-ubuntu .build-ubuntu:
<<: *build extends: .build
image: wireshark/wireshark-ubuntu-dev image: wireshark/wireshark-ubuntu-dev
retry: 1 retry: 1
# https://gould.cx/ted/blog/2017/06/10/ccache-for-Gitlab-CI/ # https://gould.cx/ted/blog/2017/06/10/ccache-for-Gitlab-CI/
@ -59,16 +59,16 @@ variables:
- if [ -f run/dumpcap ]; then su user -c "run/dumpcap -D" ; fi - if [ -f run/dumpcap ]; then su user -c "run/dumpcap -D" ; fi
- su user -c pytest-3 - su user -c pytest-3
.build-rpm: &build-rpm .build-rpm:
<<: *build extends: .build
artifacts: artifacts:
paths: paths:
- build/packaging/rpm/RPMS - build/packaging/rpm/RPMS
expire_in: 3 days expire_in: 3 days
# Rely on fedora:latest and debian-stable jobs for testing a recent GCC version. # Rely on fedora:latest and debian-stable jobs for testing a recent GCC version.
clang-11: &clang-11 clang-11:
<<: *build-ubuntu extends: .build-ubuntu
variables: variables:
CC: clang-11 CC: clang-11
CXX: clang++-11 CXX: clang++-11
@ -93,7 +93,7 @@ build:ubuntu-dist:
# https://hub.docker.com/r/wireshark/wireshark-centos-7-dev # https://hub.docker.com/r/wireshark/wireshark-centos-7-dev
# https://gitlab.com/wireshark/wireshark-containers/-/tree/master/dev/centos-7 # https://gitlab.com/wireshark/wireshark-containers/-/tree/master/dev/centos-7
build:rpm-centos-7: build:rpm-centos-7:
<<: *build-rpm extends: .build-rpm
image: wireshark/wireshark-centos-7-dev image: wireshark/wireshark-centos-7-dev
script: script:
- mkdir build - mkdir build
@ -112,7 +112,7 @@ test:rpm-centos-7:
GIT_STRATEGY: none GIT_STRATEGY: none
build:rpm-centos-8: build:rpm-centos-8:
<<: *build-rpm extends: .build-rpm
image: wireshark/wireshark-centos-8-dev image: wireshark/wireshark-centos-8-dev
script: script:
- mkdir build - mkdir build
@ -132,7 +132,7 @@ test:rpm-centos-8:
build:rpm-opensuse-15.1: build:rpm-opensuse-15.1:
image: wireshark/wireshark-opensuse-15.1-dev image: wireshark/wireshark-opensuse-15.1-dev
<<: *build-rpm extends: .build-rpm
script: script:
- mkdir build - mkdir build
- cd build - cd build
@ -151,7 +151,7 @@ test:rpm-opensuse-15.1:
build:rpm-opensuse-15.2: build:rpm-opensuse-15.2:
image: wireshark/wireshark-opensuse-15.2-dev image: wireshark/wireshark-opensuse-15.2-dev
<<: *build-rpm extends: .build-rpm
script: script:
- mkdir build - mkdir build
- cd build - cd build
@ -169,7 +169,7 @@ test:rpm-opensuse-15.2:
- build:rpm-opensuse-15.2 - build:rpm-opensuse-15.2
build:rpm-fedora: build:rpm-fedora:
<<: *build-rpm extends: .build-rpm
image: wireshark/wireshark-fedora-dev image: wireshark/wireshark-fedora-dev
script: script:
- mkdir build - mkdir build
@ -189,7 +189,7 @@ test:rpm-fedora:
# Job to generate packages for Debian stable # Job to generate packages for Debian stable
build:debian-stable: build:debian-stable:
<<: *build extends: .build
image: wireshark/wireshark-debian-stable-dev image: wireshark/wireshark-debian-stable-dev
script: script:
# Shared GitLab runners limit the log size to 4M, so reduce verbosity. See # Shared GitLab runners limit the log size to 4M, so reduce verbosity. See
@ -262,7 +262,7 @@ doxygen_all:
# https://docs.gitlab.com/ee/user/gitlab_com/index.html#linux-shared-runners # https://docs.gitlab.com/ee/user/gitlab_com/index.html#linux-shared-runners
merge-req:commit-checks: merge-req:commit-checks:
<<: *build-ubuntu extends: .build-ubuntu
tags: tags:
- docker - docker
rules: rules:
@ -276,7 +276,7 @@ merge-req:commit-checks:
- tools/validate-commit.py - tools/validate-commit.py
merge-req:ubuntu-dpkg: merge-req:ubuntu-dpkg:
<<: *build-ubuntu extends: .build-ubuntu
tags: tags:
- docker - docker
rules: rules:
@ -294,7 +294,7 @@ merge-req:ubuntu-dpkg:
- ccache --max-size $( du --summarize --block-size=1M --total "$CI_PROJECT_DIR"/obj-* | awk '/total$/ {printf ("%dM", $1 * 1.5)}' ) - ccache --max-size $( du --summarize --block-size=1M --total "$CI_PROJECT_DIR"/obj-* | awk '/total$/ {printf ("%dM", $1 * 1.5)}' )
merge-req:ubuntu-gcc-ctest: merge-req:ubuntu-gcc-ctest:
<<: *build-ubuntu extends: .build-ubuntu
tags: tags:
- docker - docker
rules: rules: