astarte-platform / astarte

Core Astarte Repository
https://docs.astarte-platform.org/
Apache License 2.0
236 stars 45 forks source link

Workflows: add build and push to Dockerhub workflow #960

Closed Annopaolo closed 6 days ago

Annopaolo commented 1 month ago

Since now we are using the new docker build infra, the old image building and publishing workflow, based on dockerhub runners, is broken. Replace it with a new one, this time fully based on Github, to standardize the image publishing process. DOCKER_USERNAME and DOCKER_PASSWORD of the registry must be added to repo secrets for this to work.

In order to separate the flow of tagged and untagged builds, workflows are splitted: one works only on tags, the other on everyday push events. Examples:

This PR is based, based on #956.

Since this is not a small change, discussion on how/where/why to publish images is welcome.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 67.99%. Comparing base (1a9c203) to head (54cd7c9). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #960 +/- ## ======================================= Coverage 67.99% 67.99% ======================================= Files 281 281 Lines 7420 7420 ======================================= Hits 5045 5045 Misses 2375 2375 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Annopaolo commented 1 month ago

I think that we should include also the astarte-tools to the publish to dockerhub workflow

@matt-mazzucato Not all tools are currently being built on all versions. For example, there exists only a snapshot version of astarte_import. We should decide what to do for those. It would make sense to version everything, imo

matt-mazzucato commented 1 month ago

It would make sense to version everything

@Annopaolo I agree with that!

Annopaolo commented 4 weeks ago

It would make sense to version everything

@Annopaolo I agree with that!

@matt-mazzucato I checked if everything could be done in a single file. I got crazy. So, we'll have 4 files: release/snapshot and apps/tools.