docker-compose sample task

Tome Petros January 8, 2018

Hello,

 

I just downloaded bamboo-6.3.0. This newer release comes with support for yaml or docker compose.

I have no idea where and how to use this capability, but I need to.

Is there a clear explanation on how to use yaml in a build task anywhere?

 

thank you

2 answers

1 vote
Kira Resari
Contributor
May 3, 2020

So, here's how I got it to work:

  1. Create a new Script Task
  2. Set the Script Body to `docker-compose up -d`
  3. Set the Working Subdirectory to wherever the docker-compose.yml is located

And then, don't forget to set the following final task, which is pretty much identical, only with the following script body instead:

  • `docker-compose down`
0 votes
rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 9, 2018

Hello @Tome Petros,

Please, refer to Bamboo YAML Specs for further information.

Kind regards,

Rafael

Kira Resari
Contributor
January 22, 2020

I've looked at the link, and this does not help me. In essence, the contents of the linked site tells me how to do something that is different than what I want to do.

 

Basically, I have a working docker-compose.yml in the repository at a location where on my local machine, I just need to run `docker-compose up` and it works.

 

The questions I seek answers to are:

  1. Is it possible to tell the docker runner something like "perform `docker-compose up` in this and that directory in the project?
  2. If not, why?
  3. What is the best alternative to doing it this way?
Like Jamie C likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events