summaryrefslogtreecommitdiff
path: root/pipelines/persist_workspace.ick
blob: 3f9a903dfc234e830d4cee31368a4eccb0faadbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Lars Wirzenius.
# 
# Feel free to use this as you wish. It is simple enough that it is
# probably not even copyrightable.

pipelines:

  # Save the current contents of the whole workspace, into an artifact
  # named in the workspace_name parameter.

  - pipeline: ick/save_workspace
    parameters:
      - workspace_name
    actions:
      - archive: workspace
        where: host
        name_from: workspace_name

  # Restore a previously saved workspace from the artifact named in
  # the workspace_name parameter. If no such artifact exists, do
  # nothing. If the workspace already has content, it will not be
  # touched, except that files that also exist in the artifact will be
  # overwritten.

  - pipeline: ick/restore_workspace
    parameters:
      - workspace_name
    actions:
      - action: populate_workspace
        name_from: workspace_name
        where: host