1
0
Fork 0

Implements post_build_shell_command

This commit is contained in:
Chl 2020-03-15 18:51:00 +01:00
parent 319c3bfb1c
commit c930ae7d85
2 changed files with 6 additions and 1 deletions

View file

@ -5,7 +5,7 @@ all:
template-php-v1: # Job template (deactivated) which can be manually cloned.
foo:
repository_url: ssh://git@code.example.net:2020/foo
deploy_url: prod.example.net:/var/www/test1234 # TODO: not implemented yet
post_build_shell_command: ssh jenkins@demos.example.net sg www-data /var/www/foo/build/deploy-update.sh $GIT_COMMIT
bar:
repository_url: ssh://git@code.example.net:2020/bar
branch_spec: '*/develop'

View file

@ -37,6 +37,11 @@
<hudson.tasks.Ant plugin="ant@1.11">
<targets></targets>
</hudson.tasks.Ant>
{% if job.value.post_build_shell_command is defined %}
<hudson.tasks.Shell>
<command>{{ job.value.post_build_shell_command }}</command>
</hudson.tasks.Shell>
{% endif %}
</builders>
<publishers>
<hudson.plugins.warnings.WarningsPublisher plugin="warnings@5.0.1">