Complete the code to define a Jenkins stage named 'Integration Test'.
stage('[1]') { steps { echo 'Running integration tests' } }
The stage name should be 'Integration Test' to clearly indicate the integration testing phase.
Complete the code to run the integration test script using a shell command.
stage('Integration Test') { steps { sh '[1]' } }
The shell command should execute the integration test script with the correct relative path './run_integration_tests.sh'.
Fix the error in the Jenkins pipeline snippet to correctly archive the test results.
stage('Integration Test') { steps { archiveArtifacts [1] } }
The pattern must be a quoted string with the correct glob pattern '**/test-results/*.xml' to archive all XML test result files recursively.
Fill both blanks to define a post action that always runs to clean the workspace after integration tests.
stage('Integration Test') { steps { sh './run_integration_tests.sh' } post { [1] { [2] { cleanWs() } } } }
The 'always' block ensures the cleanup runs regardless of test success or failure, and 'script' allows running the Groovy script 'cleanWs()'.
Fill all three blanks to define a Jenkins pipeline stage that runs integration tests, archives results, and cleans workspace on failure.
stage('[1]') { steps { sh '[2]' } post { failure { [3] { cleanWs() } } success { archiveArtifacts '**/test-results/*.xml' } } }
The stage name is 'Integration Test', the shell command runs the integration test script, and 'script' is used to run the Groovy cleanup command on failure.