ci: test L2TPNS version (Ref #11)
This commit is contained in:
parent
ab58da4056
commit
48e7ef75b7
2 changed files with 35 additions and 3 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
---
|
||||||
# You can override the included template(s) by including variable overrides
|
# You can override the included template(s) by including variable overrides
|
||||||
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
|
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
|
||||||
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
|
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
|
||||||
|
|
@ -5,10 +6,22 @@
|
||||||
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
|
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
|
||||||
# Note that environment variables can be set in several places
|
# Note that environment variables can be set in several places
|
||||||
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
|
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
|
- build
|
||||||
|
|
||||||
sast:
|
sast:
|
||||||
stage: test
|
stage: test
|
||||||
include:
|
include:
|
||||||
- template: Security/SAST.gitlab-ci.yml
|
- template: Security/SAST.gitlab-ci.yml
|
||||||
- template: Security/Secret-Detection.gitlab-ci.yml
|
- template: Security/Secret-Detection.gitlab-ci.yml
|
||||||
|
|
||||||
|
cibuild:
|
||||||
|
stage: build
|
||||||
|
image: debian:stable
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- master
|
||||||
|
script:
|
||||||
|
bash scripts/ci-test.sh
|
||||||
|
|
|
||||||
19
scripts/ci-test.sh
Normal file
19
scripts/ci-test.sh
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
# https://code.ffdn.org/l2tpns/l2tpns/-/issues/11
|
||||||
|
|
||||||
|
set -x
|
||||||
|
env
|
||||||
|
pwd
|
||||||
|
|
||||||
|
apt update -qqy
|
||||||
|
apt install -qqy build-essential libcli-dev git
|
||||||
|
|
||||||
|
make install
|
||||||
|
/usr/sbin/l2tpns -v || true
|
||||||
|
|
||||||
|
curr_version=$(grep -oP 'L2TPNS version *\K\S+' /var/log/l2tpns)
|
||||||
|
git_version=$(git describe --abbrev=0)
|
||||||
|
if [ "$curr_version" != "$git_version" ]; then
|
||||||
|
echo "ERROR: L2TPNS version ($curr_version) is different than latest GIT version ($git_version)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue