I’m trying to learn and figure out if it’s possible to create a Gitlab project, while having multiple subfolders under the project build independently. Under the example folder structure below, basically what I want to do is commit code under the addon01 folder, and only have GitLab CI build the container for addon01, while not rebuilding addon02. Here is an example folder structure of my project:
project
├─ README.md
├─ .gitignore
│
└──addon01
│ ├─ Dockerfile
│ └─ app.py
│
└──addon02
│ ├─ Dockerfile
│ └─ another_app.py
│
└──addon...
├─ Dockerfile
└─ another_app.py
Is this possible? If so, where would I put my gitlab-ci.yml
file(s)?
Thank you for any help!
Hi @flyingmoose
You may put the “.gitlab-ci.yml” file in the “addon01” folder. because Dockerfile is always keep with “.gitlab-ci.yml” file.
project
├─ README.md
├─ .gitignore
│
└──addon01
│ ├─ Dockerfile
│ └─ app.py
│ └─ .gitlab-ci.yml
Thanks,
Kiran
Hi, thank you @kirangavali! I think I may have not provided enough info in my first post. I would like to build the docker container under the addon01 folder when code only changes in the addon01 folder, and build the docker container under the addon02 folder when code only changes in the addon02 folder, and so on. Will what I am trying to do work with what you suggested?
Thanks again!
-Jason
Hi @flyingmoose
You may need to create the seperate project file with the seperate ".gitlab-ci.yml " file because
Dockerfile is always keep with “.gitlab-ci.yml” file.
addon01
| ├─ Dockerfile
| └─ app.py
| └─ .gitlab-ci.yml
addon02
| ├─ Dockerfile
| └─ another_app.py
| └─ .gitlab-ci.yml
addon…
| ├─ Dockerfile
| └─ another_app.py
| └─ .gitlab-ci.yml
Thanks
Kiran