Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use "ensure" step to release locks of 2 pool resource? #212

Open
lxiaopei opened this issue Nov 27, 2019 · 0 comments
Open

How to use "ensure" step to release locks of 2 pool resource? #212

lxiaopei opened this issue Nov 27, 2019 · 0 comments
Labels

Comments

@lxiaopei
Copy link

Hi,

I have the below sample pipeline. in the pipeline , I used 2 pool resource, after the task , I want to make sure that the locks are both got released to the pool. how can I do that? seems I cannot use 2 "ensure" steps.

- name: pool1
  type: pool
  source:
    uri: ((pool1_repo))
    branch: master
    pool: pool1
    private_key: ((private-key))
- name: pool2
  type: pool
  source:
    uri: ((pool2_repo))
    branch: master
    pool: pool2
    private_key: ((private-key))
jobs:
- name: deploy
  serial: true
  plan:
  - aggregate:
    - get: test
    - put: pool1-lock
      resource: pool1
      params: { acquire: true}
 - put: pool2-lock
      resource: pool2
      params: { acquire: true}

  - do:
    - task: deploy-task
      file: test/tasks/task.yml

    ensure:
      put: pool1-lock
      resource: pool1
      params: { release: pool1-lock }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants