Automated Docker build #948

Closed
opened 2021-09-07 05:53:13 +00:00 by KitaitiMakoto · 3 comments

I have not received any reply to #837. We need build environment to build Docker image and push it to registry automatically by ourselves.

I have not received any reply to #837. We need build environment to build Docker image and push it to registry automatically by ourselves.
Author
Owner

Is Drone or GitHub Actions good?

Is Drone or GitHub Actions good?

According to some discussions on the matrix room :

there is a drone-ci, but it's running ci in (non privileged) dockers, so I doubt it'll do. I can maybe setup a VM based runner in the future

The self-hosted Drone is currently unadapted to do that.

If we choose to use a non self-hosted CI we have choice between:

However, once we have choosen a CI, it seems that we just have to add to our config something like (inspired from some CI / Docker courses i got):

build:
  - docker pull Plume/image:latest
  - docker build --cache-from=Plume/image:latest . -t Plume/image:latest
  - docker run Plume/image:latest
  - launch_test
if_build_and_test_success:
  - docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_MDP }}
  - docker push Plume/image:latest

By using the right tags and structure, this yaml is just pseudo-code for thinking.

So the step would be :

  • Choose a CI (either self-hosted or not)
  • Create a free account
  • Add the build/test/push config to our CI config
According to some discussions on the matrix room : > there is a drone-ci, but it's running ci in (non privileged) dockers, so I doubt it'll do. I can maybe setup a VM based runner in the future The self-hosted Drone is currently unadapted to do that. If we choose to use a non self-hosted CI we have choice between: * ~~CircleCI~~ (seems to not support gitea : [https://ideas.circleci.com/cloud-feature-requests/p/add-gitea-and-giteacom-support](https://ideas.circleci.com/cloud-feature-requests/p/add-gitea-and-giteacom-support) * TravisCI (seems to have no information between gitea and travis, so must work) * Github Actions (oblige us to build using github, so dependant to non FLOSS software) * GitlabCI (can be integrated within gitea ?) However, once we have choosen a CI, it seems that we just have to add to our config something like *(inspired from some CI / Docker courses i got)*: ```yaml build: - docker pull Plume/image:latest - docker build --cache-from=Plume/image:latest . -t Plume/image:latest - docker run Plume/image:latest - launch_test if_build_and_test_success: - docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_MDP }} - docker push Plume/image:latest ``` By using the right tags and structure, this yaml is just pseudo-code for thinking. So the step would be : - [ ] Choose a CI (either self-hosted or not) - [ ] Create a free account - [ ] Add the build/test/push config to our CI config
Author
Owner

Thank you for detailed investigation! Finally I decided to use GitHub Actions and set up.

Thank you for detailed investigation! Finally I decided to use GitHub Actions and set up.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#948
No description provided.