devuan-releasebot

devuan's releasebot reimplemented (scorsh version)
git clone git://parazyd.org/devuan-releasebot.git
Log | Files | Refs | LICENSE

commit da9199f7da3062c3f41f9b18733a76beacadb37a
parent 4a8d40ab337c448837df6c5ed6b72a38e402a504
Author: parazyd <parazyd@dyne.org>
Date:   Mon, 24 Jul 2017 18:32:13 +0200

safer template variables

Diffstat:
Mfuncs.py | 16++++++++--------
Mtemplates/binaries-config.xml | 14+++++++-------
Mtemplates/repos-config.xml | 6+++---
Mtemplates/source-config.xml | 8++++----
4 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/funcs.py b/funcs.py @@ -41,14 +41,14 @@ def fill_template(pkgname, jobtype, arches=None, desc=None, for lab in jlabels: jlablist += ' <string>%s</string>\n' % lab - tmpl = tmpl.replace('[PKGNAME]', pkgname) - tmpl = tmpl.replace('[GIT_URI]', git_uri) - tmpl = tmpl.replace('[GIT_CREDENTIALS]', vcs_credentials) - tmpl = tmpl.replace('[DESCRIPTION]', desc) - tmpl = tmpl.replace('[ARCHITECTURES]', archlist) - tmpl = tmpl.replace('[LABELS]', jlablist) - tmpl = tmpl.replace('[BUILD_ADDVAR]', buildvar) - tmpl = tmpl.replace('[RUNSEQUENTIAL]', sequential) + tmpl = tmpl.replace('{{{PKGNAME}}}', pkgname) + tmpl = tmpl.replace('{{{GIT_URI}}}', git_uri) + tmpl = tmpl.replace('{{{GIT_CREDENTIALS}}}', vcs_credentials) + tmpl = tmpl.replace('{{{DESCRIPTION}}}', desc) + tmpl = tmpl.replace('{{{ARCHITECTURES}}}', archlist) + tmpl = tmpl.replace('{{{LABELS}}}', jlablist) + tmpl = tmpl.replace('{{{BUILD_ADDVAR}}}', buildvar) + tmpl = tmpl.replace('{{{RUNSEQUENTIAL}}}', sequential) return tmpl return None diff --git a/templates/binaries-config.xml b/templates/binaries-config.xml @@ -1,7 +1,7 @@ <?xml version='1.0' encoding='UTF-8'?> <matrix-project plugin="matrix-project@1.4"> <actions/> - <description>[DESCRIPTION]</description> + <description>{{{DESCRIPTION}}}</description> <logRotator class="hudson.tasks.LogRotator"> <daysToKeep>-1</daysToKeep> <numToKeep>5</numToKeep> @@ -36,20 +36,20 @@ <hudson.matrix.TextAxis> <name>architecture</name> <values> -[ARCHITECTURES] +{{{ARCHITECTURES}}} </values> </hudson.matrix.TextAxis> <hudson.matrix.LabelAxis> <name>label</name> <values> -[LABELS] +{{{LABELS}}} </values> </hudson.matrix.LabelAxis> </axes> <combinationFilter>(label=="all").implies(architecture=="all") &amp;&amp; (label=="amd64").implies(architecture=="amd64") &amp;&amp; (label=="i386").implies(architecture=="i386") &amp;&amp; (label=="armel").implies(architecture=="armel") &amp;&amp; (label=="armhf").implies(architecture=="armhf") &amp;&amp; (label=="sparc64").implies(architecture=="sparc64") &amp;&amp; (label=="s390x").implies(architecture=="s390x") &amp;&amp; (label=="ppc64el").implies(architecture=="ppc64el") &amp;&amp; (label=="powerpc").implies(architecture=="powerpc") &amp;&amp; (label=="or1k").implies(architecture=="or1k") &amp;&amp; (label=="mipsel").implies(architecture=="mipsel") &amp;&amp; (label=="mips").implies(architecture=="mips") &amp;&amp; (label=="m68k").implies(architecture=="m68k") &amp;&amp; (label=="m32").implies(architecture=="m32") &amp;&amp; (label=="ia64").implies(architecture=="ia64") &amp;&amp; (label=="hppa").implies(architecture=="hppa") &amp;&amp; (label=="alpha").implies(architecture=="alpha") &amp;&amp; (label=="arm64").implies(architecture=="arm64") &amp;&amp; (label=="sparc").implies(architecture=="sparc") &amp;&amp; (label=="armhf_qemusys").implies(architecture=="armhf") &amp;&amp; (label=="arm64_qemusys").implies(architecture=="arm64") &amp;&amp; (label=="armel_qemusys").implies(architecture=="armel")</combinationFilter> <builders> <hudson.plugins.copyartifact.CopyArtifact plugin="copyartifact@1.34"> - <project>[PKGNAME]-source</project> + <project>{{{PKGNAME}}}-source</project> <parameters>codename=$codename</parameters> <filter>*</filter> <target></target> @@ -72,7 +72,7 @@ if [ &quot;$codename&quot; = &quot;experimental&quot; ] ; then else export distribution=$codename fi -[BUILD_ADDVAR] +{{{BUILD_ADDVAR}}} export FORCE_BINARY_ONLY=$label /usr/bin/build-and-provide-package # when using subversion: @@ -113,7 +113,7 @@ env</command> <configs> <hudson.plugins.parameterizedtrigger.CurrentBuildParameters/> </configs> - <projects>[PKGNAME]-repos</projects> + <projects>{{{PKGNAME}}}-repos</projects> <condition>ALWAYS</condition> <triggerWithNoParameters>false</triggerWithNoParameters> </hudson.plugins.parameterizedtrigger.BuildTriggerConfig> @@ -129,6 +129,6 @@ env</command> <hudson.plugins.timestamper.TimestamperBuildWrapper plugin="timestamper@1.5.15"/> </buildWrappers> <executionStrategy class="hudson.matrix.DefaultMatrixExecutionStrategyImpl"> - <runSequentially>[RUNSEQUENTIAL]</runSequentially> + <runSequentially>{{{RUNSEQUENTIAL}}}</runSequentially> </executionStrategy> </matrix-project> diff --git a/templates/repos-config.xml b/templates/repos-config.xml @@ -1,7 +1,7 @@ <?xml version='1.0' encoding='UTF-8'?> <project> <actions/> - <description>[DESCRIPTION]</description> + <description>{{{DESCRIPTION}}}</description> <logRotator class="hudson.tasks.LogRotator"> <daysToKeep>-1</daysToKeep> <numToKeep>3</numToKeep> @@ -35,7 +35,7 @@ <concurrentBuild>false</concurrentBuild> <builders> <hudson.plugins.copyartifact.CopyArtifact plugin="copyartifact@1.34"> - <project>[PKGNAME]-binaries</project> + <project>{{{PKGNAME}}}-binaries</project> <parameters>codename=$codename</parameters> <filter>*</filter> <target></target> @@ -47,7 +47,7 @@ <doNotFingerprintArtifacts>false</doNotFingerprintArtifacts> </hudson.plugins.copyartifact.CopyArtifact> <hudson.plugins.copyartifact.CopyArtifact plugin="copyartifact@1.34"> - <project>[PKGNAME]-source</project> + <project>{{{PKGNAME}}}-source</project> <parameters>codename=$codename</parameters> <filter>*</filter> <target>architecture=source,label=source</target> diff --git a/templates/source-config.xml b/templates/source-config.xml @@ -1,7 +1,7 @@ <?xml version='1.0' encoding='UTF-8'?> <project> <actions/> - <description>[DESCRIPTION]</description> + <description>{{{DESCRIPTION}}}</description> <logRotator class="hudson.tasks.LogRotator"> <daysToKeep>-1</daysToKeep> <numToKeep>5</numToKeep> @@ -29,8 +29,8 @@ <configVersion>2</configVersion> <userRemoteConfigs> <hudson.plugins.git.UserRemoteConfig> - <url>[GIT_URI]</url> - <credentialsId>[GIT_CREDENTIALS]</credentialsId> + <url>{{{GIT_URI}}}</url> + <credentialsId>{{{GIT_CREDENTIALS}}}</credentialsId> </hudson.plugins.git.UserRemoteConfig> </userRemoteConfigs> <branches> @@ -101,7 +101,7 @@ env</command> <configs> <hudson.plugins.parameterizedtrigger.CurrentBuildParameters/> </configs> - <projects>[PKGNAME]-binaries</projects> + <projects>{{{PKGNAME}}}-binaries</projects> <condition>SUCCESS</condition> <triggerWithNoParameters>false</triggerWithNoParameters> </hudson.plugins.parameterizedtrigger.BuildTriggerConfig>