Skip to content

Configure a Docker Automated build #644

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

Closed
ferrarimarco opened this issue Apr 17, 2018 · 12 comments
Closed

Configure a Docker Automated build #644

ferrarimarco opened this issue Apr 17, 2018 · 12 comments
Assignees

Comments

@ferrarimarco
Copy link
Contributor

ferrarimarco commented Apr 17, 2018

Hi all.

Let's track the requirements of this feature (now scattered across various PRs and issues).

Background

  1. I opened Dockerfile and Docker automated builds #591 (Dockerfile and Docker automated builds)
  2. Move repo to organisation #595 (Move repo to organization) was created but took a bit to complete
  3. In the meantime Dockerfile and Docker automated builds #591 was closed by Remove docker bits #634 (Remove Docker bits) because I (temporarily) moved the GHCG Docker image under the ferrarimarco Docker Hub namespace

Current Implementation

ferrarimarco/github-changelog-generator is backed by the corresponding GitHub repository.

Each commit and Git tag pushed to that repository triggers a build on Docker hub and, if successful, in a new Docker image.

I am currently handling GHCG updates with Dependabot. This service automatically creates PRs to update dependencies by looking at your Gemfile.

This is the reason why I'm using a separate Gemfile even if we could get rid of it and run commands directly in the Dockerfile.

Ideas for a more refined implementation

Instead of just installing the updated Gem when available we could provide two kinds of Docker images:

  1. One tagged with latest: by convention it could point to the latest (successful) build of the master branch. This image is overridden on each commit on master (if the build is ok)
  2. One tag for each GHCG release tagged using the same Git tag (i.e. when you release 1.15.0 there will be a corresponding 1.15.0 docker image). This is needed to make production deployment repeatable

Thoughts?

/cc @olleolleolle @skywinder

@olleolleolle
Copy link
Collaborator

Smart use of dependabot!

@ferrarimarco
Copy link
Contributor Author

ferrarimarco commented May 16, 2018

@skywinder @olleolleolle did you have the chance to think about this?

I suppose that if we want to build from master and publish under the latest tag, the Gemfile approach is not viable. I need to know more about your release process to propose something concrete.

@ferrarimarco
Copy link
Contributor Author

@olleolleolle @skywinder let's resume this work if you want since there are a couple of issues related to this. :)

What do you think?

This was referenced Feb 21, 2019
@thaJeztah
Copy link

Happy to assist as well if needed; one thing I noticed in the old Dockerfile, is that it was fetching the source from inside the Dockerfile; using a COPY instead would make sure that the Dockerfile can be built from any branch, and the code always matching the code in that branch

@ferrarimarco
Copy link
Contributor Author

Sounds like a good use case for a multi-staged build actually. So yes, good idea! I'll open a PR for this, since I don't yet have write access here :(

@ferrarimarco
Copy link
Contributor Author

@olleolleolle @skywinder I created an org in Docker Hub but you should approve the access request so I can eventually set up an automated build

@thaJeztah
Copy link

since I don't yet have write access here

It's generally good etiquette to use pull requests, even if you have write access 🤗

@ferrarimarco
Copy link
Contributor Author

@thaJeztah I'm a member of this org :)

@olleolleolle
Copy link
Collaborator

(I don't have admin rights on this repository.)

I also can't see a Docker Hub Organization - does it exist somewhere?

Looking around, I was able to find quite a few people who had set up builds: https://hub.docker.com/search?q=github-changelog-generator&type=image

@ferrarimarco
Copy link
Contributor Author

@olleolleolle I created an org here: https://cloud.docker.com/orgs/githubchangeloggenerator

but need approval to create an automated build...

@ferrarimarco
Copy link
Contributor Author

@olleolleolle @skywinder I need admin access to this repo to proceed further on this.

@ferrarimarco
Copy link
Contributor Author

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

No branches or pull requests

3 participants