# Update the Service with Deploy Pipe

When your pipeline has updated an image, you'll push it to your deployed service. DuploCloud's custom Bitbucket Pipe does this, updating any service with the latest image.

For example, to update a Service (`myservice`) for a Tenant (`sometenant`) when a new Git tag is published (`myimage:${BITBUCKET_TAG}`), use this code:

```yaml
pipelines:
  tags:
    '**': 
    - step: 
        name: Update Service
        script:
        - pipe: docker://duplocloud/bitbucket-deploy-pipe:0.1.0
          variables:
            DUPLO_TOKEN: $DUPLO_TOKEN
            DUPLO_HOST: https://example.duplocloud.net/
            TENANT: sometenant
            SERVICE: myservice
            IMAGE: myimage:${BITBUCKET_TAG}
```

Learn more about [BitBucket Deploy Pipe on GitHub](https://github.com/duplocloud/bitbucket-deploy-pipe).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.duplocloud.com/docs/automation-platform/introduction-to-ci-cd/bitbucket-pipelines/update-the-service-with-deploy-pipe.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
