3 ms·
Is it possible to write the pipeline code in another language with better formatting, e.g. Python or Jython, instead of having 15 lines with nothing but '}' on
by vorg 8y ago
Is it possible to write the pipeline code in another language with better formatting, e.g. Python or Jython, instead of having 15 lines with nothing but '}' on it? Here's a possible rewrite of the sample from the posting:
#!/usr/bin/env someotherlanguage
pipeline:
agent any
stages:
stage('Build') :
steps:
sh './build.sh'
stage('Test') :
steps :
sh './test.sh'
stage('Deploy') :
steps :
sh './deploy.sh'
stage('Deploy - Staging') :
steps :
sh './deploy.sh staging'
sh './run-smoke-tests.sh'
stage('Sanity check') :
steps :
input "Does the staging environment look ok?"
stage('Deploy - Production') :
steps :
sh './deploy.sh production'
Now that can better fit on one page. Coming to think of it, are all those 'steps:', 'stages:', and 'pipeline:' clauses really necessary?