Special param from git commit/PR merge message, to trans to the runs of agola

  • multi modules of java-micro project, with diff type of commands:<install, deploy, package>

  • config.jsonnet
{
  runs: [
   name: 'fk-onemall/order: [install]',//install deploy package
   tasks: [
	   task_build_java('8', 'amd64', module, cmd),
  • just want to trans module cmd these two params from commit/pr message, to let agola to run with.

For example: if commit message [package:/pay]

Then agola call cd ./pay && mvn pacage in agola that defined in task_build_java(version, arch, module, cmd)

This may need a rendor to set params to config.jsonnet to replace the ${el-value} symbol. After replace the symbol then start anaysis the config to golang.

For example the a object define in jsonnet to collect all symbol from agola for the config usage, just like:

agolaParams: {
    gitUrl: '${AGOLA_GIT_URL}',
    gitCommitMsg: '${AGOLA_GIT_COMMIT_MSG}',
  },

Ref:

@huapox IMHO having a build config that changes its behavior based on the commit message look like a bad idea for many reasons (and if you’re using pull requests it won’t work when merging the PR since the commit message is not the one you’re expecting but something like Merge pull request #xx ...)

But if you want to do this it will be possible with jsonnet: pass top level args providing build context · Issue #137 · agola-io/agola · GitHub by also the commit message to the provided parameter.

This issue is a different thing and it’s not related to your request.