TT#15305 build: support trunk-weekly release

* trunk-weekly as a normal release, with its own
  config file. The idea is to convert eventually
  trunk-* too
* match for relase-trunk-* doesn't work anymore

Change-Id: I4967ccc3b5ac47dbebdf6da16d404710fc72da49
pull/7/head
Victor Seva 3 years ago
parent da38972015
commit 9159fbae1d

@ -0,0 +1,314 @@
distris:
- release-trunk-weekly
- bullseye
debian_release: bullseye
release-trunk-weekly: &packages
# TT#44190 needed by ngcp-panel
- grafana: 7.3.1
# MT#13097 + TT#11775 + TT#44117 needed by libinewrate
- libactivemq-cpp: 3.9.4-0.1~bpo11+1sipwise1
# TT#69950 needed by bulk-processor, not available in Debian (project abandoned upstream)
- libexcel-reader-xlsx-perl: 0.00~git20161017.3b576a55-0.1sipwise1~bpo11+1
# TT#73105 system testing
- goss: 0.3.14-0.1~bpo11+1sipwise1
# TT#44918 Needed for PRO/Carrier
- ngcp-pxe-boot: 0.7.1.1+0~sipwise20210719
# TT#126500: Fix race in reboot uptime timestamp computation and comparison
- monit: 5.27.2-1sipwise1~bpo11+1
# TT#59330 rebuild of package pulled from non-free, required for snmp-agent
- snmp-mibs-downloader: 1.5~bpo11+1
# MT#19499, TT#126650: local robustness patches
- net-snmp: 5.9+dfsg-3sipwise1~bpo11+2
# TT#149552 needed by lua-sql-kamailio
- lua-sql: 2.6.0-1~bpo11+1
# TT#154255 replacement of redis, not in debian
- keydb: 6.2.3~git20220223.d591df1-1~bpo11+1
# TT#140500 needed by prometheus stack
- dh-golang: 1.53~bpo11+1
- golang-1.17: 1.17.8-1~bpo11+1
- golang-defaults: 1.17~1~bpo11+2
- golang-github-alecthomas-units: 0.0~git20211218.b94a6e3-1~bpo11+1
- golang-github-allegro-bigcache: 2.2.5-5~bpo11+1
- golang-github-andybalholm-brotli: 1.0.4-3~bpo11+1
- golang-github-beevik-ntp: 0.3.0-4~bpo11+1
- golang-github-cheggaaa-pb.v3: 3.0.5-2~bpo11+1
- golang-github-dennwc-varint: 1.0.0-2~bpo11+1
- golang-github-ema-qdisc: 0.0~git20200603.62d0308-2~bpo11+1
- golang-github-go-kit-log: 0.2.0-3~bpo11+1
- golang-github-go-openapi-analysis: 0.21.2-1~bpo11+1
- golang-github-go-openapi-errors: 0.20.2-1~bpo11+1
- golang-github-go-openapi-jsonpointer: 0.19.5-3~bpo11+1
- golang-github-go-openapi-jsonreference: 0.19.6-2~bpo11+1
- golang-github-go-openapi-loads: 0.21.1-2~bpo11+1
- golang-github-go-openapi-runtime: 0.23.3-1~bpo11+1
- golang-github-go-openapi-spec: 0.20.4-1~bpo11+1
- golang-github-go-openapi-strfmt: 0.21.2-1~bpo11+1
- golang-github-go-openapi-swag: 0.21.1-1~bpo11+1
- golang-github-go-openapi-validate: 0.21.0-1~bpo11+1
- golang-github-hashicorp-go-envparse: 0.0~git20200406.d9cfd74-3~bpo11+1
- golang-github-hodgesds-perf-utils: 0.5.1-2~bpo11+1
- golang-github-josharian-native: 1.0.0-1~bpo11+1
- golang-github-jsimonetti-rtnetlink: 1.1.0-1~bpo11+1
- golang-github-mattn-go-xmlrpc: 0.0.3-2~bpo11+1
- golang-github-mdlayher-genetlink: 1.1.0-3~bpo11+1
- golang-github-mdlayher-netlink: 1.6.0-2~bpo11+1
- golang-github-mdlayher-socket: 0.1.1-2~bpo11+1
- golang-github-mdlayher-wifi: 0.0~git20200527.84f0b94-4~bpo11+1
- golang-github-mna-redisc: 1.1.7-3~bpo11+1
- golang-github-ncabatoff-go-seq: 0.0~git20180805.b08ef85-4~bpo11+1
- golang-github-nginxinc-nginx-plus-go-client: 0.9.0-2~bpo11+1
- golang-github-prometheus-client-golang: 1.11.1-1~bpo11+1
- golang-github-prometheus-client-model: 0.2.0-3~bpo11+1
- golang-github-prometheus-common: 0.32.1-6~bpo11+1
- golang-github-prometheus-exporter-toolkit: 0.7.1-1~bpo11+1
- golang-github-prometheus-procfs: 0.7.3-2~bpo11+1
- golang-github-soundcloud-go-runit: 0.0~git20150630.06ad41a-3~bpo11+1
- golang-github-valyala-fasthttp: 1.31.0-3~bpo11+1
- golang-github-valyala-fastjson: 1.6.3-4~bpo11+1
- golang-github-valyala-fastrand: 1.1.0-2~bpo11+1
- golang-github-valyala-fasttemplate: 1.2.1+ds1-1~bpo11+1
- golang-github-valyala-gozstd: 1.16.0+ds1-1~bpo11+1
- golang-github-valyala-histogram: 1.2.0+ds-2~bpo11+1
- golang-github-valyala-quicktemplate: 1.7.0+ds1-1~bpo11+1
- golang-github-victoriametrics-fastcache: 1.9.0+ds1-1~bpo11+1
- golang-github-victoriametrics-metrics: 1.18.1+ds-2~bpo11+1
- golang-github-victoriametrics-metricsql: 0.40.0+ds1-1~bpo11+1
- golang-github-xdg-go-pbkdf2: 1.0.0-2~bpo11+1
- golang-github-xdg-go-scram: 1.1.1-1~bpo11+1
- golang-github-xdg-go-stringprep: 1.0.3-1~bpo11+1
- golang-go-flags: 1.4.0-5~bpo11+1
- golang-mongodb-mongo-driver: 1.8.4+ds1-1~bpo11+1
- prometheus-alertmanager: 0.23.0-5~bpo11+1
- prometheus-haproxy-exporter: 0.13.0+ds1-2~bpo11+1
- prometheus-mysqld-exporter: 0.14.0-1~bpo11+1
- prometheus-nginx-exporter: 0.10.0-2~bpo11+1
- prometheus-node-exporter: 1.3.1-1~bpo11+1
- prometheus-process-exporter: 0.7.10-2~bpo11+1
- prometheus-redis-exporter: 1.37.0-2~bpo11+1
- prometheus-snmp-exporter: 0.20.0-1~bpo11+1
- victoriametrics: 1.75.0+ds1-1~bpo11+1
bullseye: *packages
repository-verify:
white-list: []
jenkins-jobs:
build_deps:
system-tools:
- check-tools # libngcp-log-perl libngcp-service-perl
data-hal:
- ngcp-panel
ngcp-schema:
- ngcp-panel
libinewrate:
- sems-pbx
libswrate:
- kamailio
- sems-pbx
libtcap:
- kamailio
- lnpd
sipwise-base:
- ngcp-panel
- ngcp-schema
check-tools:
- snmp-agent
ngcpcfg:
- bootenv # libngcp-template-perl needed on Dockerfile
ngcp-panel:
- csta-testsuite # ngcp-api-testframework needed on Dockerfile
projects:
- asterisk-voicemail
- backup-tools
- bulk-processor
- bulk-processor-projects
- bootenv
- cdr-exporter
- cfg-schema
- check-tools
- cleanup-tools
- cloudpbx-sources
- csta-testsuite
- data-hal
- db-schema
- deployment-iso
- dhtest
- documentation
- faxserver
- installer
- kamailio
- kamailio-config-tests
- keyring
- klish
- libinewrate
- libswrate
- libtcap
- license-client
- lnpd
- lua-ngcp-kamailio
- mediator
- megacli
- metapackages
- monitoring-tools
- ngcp-admin-ui
- ngcp-api-tools
- ngcp-csc-ui
- ngcp-exporter
- ngcp-fauditd
- ngcp-inventory
- ngcp-js-api-client
- ngcp-logfs
- ngcp-klish-config
- ngcp-panel
- ngcp-prompts
- ngcp-rest-api
- ngcp-schema
- ngcp-status
- ngcp-sudo-plugin
- ngcp-support
- ngcp-user-framework
- ngcp-web-tests-e2e
- ngcpcfg
- ngcpcfg-api
- ngcpcfg-ha
- ngrep-sip
- prosody
- pushd
- py-ngcp-kamailio
- rate-o-mat
- reminder
- rtpengine
- sems
- sems-pbx
- sipwise-base
- snmp-agent
- system-tests
- system-tools
- templates
- upgrade
- vmnotify
- voisniff-ng
- websocket
release_mirror:
common:
copysrc:
- kamailio-config-tests
- klish
- libdata-hal-perl
- libsipwise-base-perl
- lua-ngcp-kamailio
- ngcp-admin-ui
- ngcp-api-tools
- ngcp-asterisk-voicemail
- ngcp-bulk-processor
- ngcp-cdr-exporter
- ngcp-cfg-schema
- ngcp-check-tools
- ngcp-cleanup-tools
- ngcp-csc-ui
- ngcp-db-schema
- ngcp-deployment-iso
- ngcp-dhtest
- ngcp-handbook
- ngcp-installer
- ngcp-js-api-client
- ngcp-kamailio
- ngcp-keyring
- ngcp-klish-config
- ngcp-libswrate
- ngcp-libtcap
- ngcp-license-client
- ngcp-mediator
- ngcp-metapackages
- ngcp-ngcpcfg
- ngcp-panel
- ngcp-prompts
- ngcp-prosody-modules
- ngcp-rate-o-mat
- ngcp-reminder
- ngcp-rest-api
- ngcp-rtpengine
- ngcp-schema
- ngcp-status
- ngcp-support
- ngcp-system-tests
- ngcp-system-tools
- ngcp-templates
- ngcp-upgrade
- ngcp-vmnotify
- ngcp-web-tests-e2e
- ngrep-sip
- py-ngcp-kamailio
remove:
source:
- ngcp-handbook
- ngcp-installer
- ngcp-libswrate
- ngcp-license-client
- ngcp-prompts
- ngcp-templates
- ngcp-upgrade
binary:
- ngcp-handbook-internal
- ngcp-handbook-pdf-internal
matched: []
ce:
copysrc:
- ngcp-sems
remove:
source: []
binary:
- ngcp-ngcpcfg-testsuite
matched:
- '*-carrier'
- '*-pro'
- '*-pro-dbgsym'
- 'ngcp-prompts-pro*'
pro:
backports: []
copysrc:
- megacli
- ngcp-backup-tools
- ngcp-bootenv
- ngcp-bulk-processor-projects
- ngcp-cloudpbx-devices
- ngcp-csta-testsuite
- ngcp-exporter
- ngcp-fauditd
- ngcp-faxserver
- ngcp-inventory
- ngcp-libinewrate
- ngcp-lnpd
- ngcp-logfs
- ngcp-monitoring-tools
- ngcp-ngcpcfg-ha
- ngcp-pushd
- ngcp-sems-pbx
- ngcp-snmp
- ngcp-sudo-plugin
- ngcp-user-framework
- ngcp-voisniff
- ngcp-websocket
- ngcpcfg-api
remove:
binary: []
source:
- ngcp-cloudpbx-devices
- ngcp-csta-testsuite
- ngcp-fauditd
- ngcp-logfs
- ngcp-monitoring-tools
- ngcp-ngcpcfg-ha
- ngcp-pushd
- ngcp-sems-pbx
- ngcp-sudo-plugin
- ngcp-user-framework
- ngcp-voisniff
- ngcpcfg-api
matched:
- '*ngcp*-ce'
- '*ngcp*-ce-*'

@ -1,4 +1,4 @@
# Copyright (C) 2017 The Sipwise Team - http://sipwise.com
# Copyright (C) 2017-2022 The Sipwise Team - http://sipwise.com
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
@ -61,6 +61,21 @@ class TestRest(APIAuthenticatedTestCase):
projects = response.data["projects"].split(",")
self.assertEqual(len(projects), 73)
def test_trunk_weekly(self):
data = {
"uuid": "fake_uuid",
"release": "trunk-weekly",
}
response = self.client.post(self.url, data, format="json")
self.assertEqual(response.status_code, status.HTTP_201_CREATED)
self.assertEqual(response.data["uuid"], data["uuid"])
self.assertEqual(response.data["release"], "release-trunk-weekly")
self.assertIsNone(response.data["tag"])
self.assertEqual(response.data["branch"], "master")
self.assertEqual(response.data["distribution"], "bullseye")
projects = response.data["projects"].split(",")
self.assertEqual(len(projects), 71)
def test_mrXX(self):
data = {
"uuid": "fake_uuid",

@ -1,4 +1,4 @@
# Copyright (C) 2017-2020 The Sipwise Team - http://sipwise.com
# Copyright (C) 2017-2022 The Sipwise Team - http://sipwise.com
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
@ -103,6 +103,7 @@ class ReleaseConfigTestCase(SimpleTestCase):
@override_settings(BUILD_RELEASES_SKIP=["mr0.1"])
def test_supported_releases(self):
supported = [
"trunk-weekly",
"release-trunk-buster",
"release-trunk-bullseye",
"mr8.1.2",
@ -156,6 +157,10 @@ class ReleaseConfigTestCase(SimpleTestCase):
rc = ReleaseConfig("trunk", "bullseye")
self.assertEqual(rc.debian_release, "bullseye")
rc = ReleaseConfig("trunk-weekly")
self.assertEqual(rc.debian_release, "bullseye")
# distribution parameter is only used with trunk
rc = ReleaseConfig("release-mr8.1-update", "bullseye")
self.assertEqual(rc.debian_release, "buster")
@ -164,11 +169,18 @@ class ReleaseConfigTestCase(SimpleTestCase):
rc = ReleaseConfig("trunk")
self.assertEqual(rc.release, "trunk")
rc = ReleaseConfig("trunk-weekly")
self.assertEqual(rc.release, "release-trunk-weekly")
def test_branch_tag_value_trunk(self):
rc = ReleaseConfig("trunk")
self.assertEqual(rc.branch, "master")
self.assertIsNone(rc.tag)
rc = ReleaseConfig("trunk-weekly")
self.assertEqual(rc.branch, "master")
self.assertIsNone(rc.tag)
def test_branch_tag_value_mrXX(self):
rc = ReleaseConfig("mr8.1")
self.assertEqual(rc.branch, "mr8.1")

@ -46,16 +46,19 @@ re_release_trunk = re.compile(r"^release-trunk-(\w+)$")
def is_release_trunk(version):
match = re_release_trunk.search(version)
if match:
return (True, match.group(1))
else:
return (False, None)
value = match.group(1)
if value != "weekly":
return (True, value)
return (False, None)
def get_simple_release(version):
match = re_release.search(version.replace("-update", ""))
if match:
return match.group(1)
if version.startswith("release-trunk-"):
if version == "release-trunk-weekly":
return "trunk-weekly"
elif version.startswith("release-trunk-"):
return "trunk"
@ -239,7 +242,7 @@ class ReleaseConfig(object):
@property
def branch(self):
release = self.release
if release == "trunk":
if release in ("trunk", "release-trunk-weekly"):
return "master"
release_count = release.count(".")
if release_count in [1, 2]:
@ -255,9 +258,11 @@ class ReleaseConfig(object):
@property
def release(self):
for dist in self.config["distris"]:
if dist == "release-trunk-weekly":
return dist
if dist.startswith("release-trunk-"):
return "trunk"
if dist.startswith("release-"):
elif dist.startswith("release-"):
return dist
@property

Loading…
Cancel
Save