debian: define extra env vars for docker apps

Define additional environment variables required by docker image build
scripts:

- DEBIAN_SECURITY_SNAPSHOT: stable snapshot URL for the security repo
- DEBIAN_DISTRIBUTION: repo distribution ID (bullseye)

TESTS
===================

- Restart pods using stx-init-env, make sure the new env vars are
  defined in builder pod

Story: 2009897
Task: 45180

Change-Id: Ifbbb3f82983d3bb1cd8747f1cf117e2f9214e871
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
This commit is contained in:
Davlet Panech 2022-04-25 15:30:52 -04:00
parent 0ed3e55da6
commit 1aab873f29
3 changed files with 11 additions and 1 deletions

View File

@ -8,7 +8,9 @@ proxyport = 8080
buildbranch = master
manifest = default.xml
ostree_osname = debian
debian_distribution = bullseye
debian_snapshot = http://snapshot.debian.org/archive/debian/20220331T000000Z
debian_security_snapshot = http://snapshot.debian.org/archive/debian-security/20220331T000000Z
[builder]
uid = 1000

View File

@ -88,6 +88,8 @@ class HandleControlTask:
dsclist = self.config.get('repomgr', 'dsclist')
ostree_osname = self.config.get('project', 'ostree_osname')
debian_snapshot = self.config.get('project', 'debian_snapshot')
debian_security_snapshot = self.config.get('project', 'debian_security_snapshot')
debian_distribution = self.config.get('project', 'debian_distribution')
if sourceslist:
if not (deblist or dsclist):
self.logger.warning('*************************************\
@ -161,6 +163,8 @@ stx-pkgbuilder/configmap/')
line = line.replace("@CENGNSTRATEGY@", cengnstrategy)
line = line.replace("@OSTREE_OSNAME@", ostree_osname)
line = line.replace("@DEBIAN_SNAPSHOT@", debian_snapshot)
line = line.replace("@DEBIAN_SECURITY_SNAPSHOT@", debian_security_snapshot)
line = line.replace("@DEBIAN_DISTRIBUTION@", debian_distribution)
line = line.replace("@MAX_CPUS@", max_cpus)
if sourceslist:
line = line.replace("@fetch@", "true")

View File

@ -55,6 +55,10 @@ export BUILDER_URL=http://@PROJECT@-stx-pkgbuilder:8080/pkgbuilder/
export OSTREE_OSNAME=@OSTREE_OSNAME@
export DEBIAN_SNAPSHOT=@DEBIAN_SNAPSHOT@
export DEBIAN_SNAPSHOT="@DEBIAN_SNAPSHOT@"
export DEBIAN_SECURITY_SNAPSHOT="@DEBIAN_SECURITY_SNAPSHOT@"
export DEBIAN_DISTRIBUTION="@DEBIAN_DISTRIBUTION@"
export MAX_CPUS=@MAX_CPUS@