Skip to content

Instantly share code, notes, and snippets.

@takahi-i
Last active August 29, 2015 14:16
Show Gist options
  • Save takahi-i/f7b75bcd8c02f9ed2ae7 to your computer and use it in GitHub Desktop.
Save takahi-i/f7b75bcd8c02f9ed2ae7 to your computer and use it in GitHub Desktop.
image of cleanup configuraiton of walter

Possible Solutions

Add cleanup steps in pipeline target.

Configuration Image 1

Add cleanup as a element of a array in pipeline.

Sample

pipeline:
     -  name: start pipeline
         type: command
         command: echo ‘first step'
     -  name: start pipeline
         command: echo ’second step'
     - cleanup: 
         -  name:
            command:  rm log/*

Drawbacks

  • cleanup and each step exist in the same array.

Configuration Image 2

Add cleanup as a member of pipeline block (NOTE: need add steps member).

pipeline:
    steps:
         -  name: start pipeline
            type: command
            command: echo ‘first step'
         -  name: start pipeline
            command: echo ’second step'
    cleanup: 
         -  name: cleanup
            command:  rm log/*

Drawbacks

  • lost backward compatibility

Configuration Image 3

Add cleanup as the top element in the configuration file.

Sample

pipeline:
     -  name: start pipeline
         type: command
         command: |
         echo ‘first step'
     -  name: start pipeline
         command: echo ’second step'
cleanup: 
     -  name: cleanup
        command:  rm log/*

Drawbacks

  • this format cannot add another pipeline...

Possible problem

  • fail in a stage in cleanup pipeline
    • add stage property force(default=false)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment