-
Notifications
You must be signed in to change notification settings - Fork 25
Build containers in CI/CD #250
Build containers in CI/CD #250
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.github/workflows/ci.yaml
Outdated
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needed to add the capability to use an external cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dude are you really commenting your own PR? 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aha yes i thought it would help reviewing since it is a magic yaml
.github/workflows/ci.yaml
Outdated
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uses GitHub Action cache
Since #248 is causing a conflict on the workflow file name here, I also realized that this workflow doesn't actually depend on the |
@stefanotorresi we choose to depend on the We could also create a composite action for test/vet check and execute it again in the docker workflow |
Hmm, you make a good point, but the discussion then gets tricky: by the same logic, we shouldn't build broken code in OBS either. |
@stefanotorresi I think this is an option. if we want to keep separate workflows we will need to move the test steps in composite action, and repeat the step in every workflow that is needed, this way we repeat the step,yes, but the workflow will work in a parallel fashion. EDIT: I'm leaning more toward the first option you proposed tho, it's easier to add a test step and let the other jobs depend on it, also they will work in parallel also this way. |
All right then; unless the rest of the team has objections, go for it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's consolidate all the CI jobs into a single workflow, with all the CD jobs depending on the test one.
I'm on it already |
Co-authored-by: Fabrizio Sestito <fabrizio.sestito@suse.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good. As discussed in Slack, I'll leave a follow-up to fork https://github.com/arbulu89/continuous-delivery in the trento-project org.
Uses github actions to build containers on every merge on main.
If a release event is detected a container with the release
tag
is built and pushed, otherwise the container therolling
tag container gets updated.It also supports cache + manual dispatch.