Skip to content
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

Speedup pipelines on forms-shared with docker caching #1321

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

skifahrer
Copy link
Contributor

@skifahrer skifahrer commented Aug 21, 2024

This PR adds support for caching of docker layers. It is related to bratislava/github-actions#30

After merge there needs to be updated a stable an beta tags to make this change to take a effect.

@skifahrer skifahrer marked this pull request as ready for review August 21, 2024 15:36
@skifahrer
Copy link
Contributor Author

not yet ready

@@ -28,9 +28,23 @@ jobs:
run: |
echo "Pipelines version: 2.3.0"

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need qemu?

- name: Build Docker image on test target
run: |
docker build -t test .
docker buildx build --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache -t test .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why are we doing this through CLI run command? Because as I see it this basically just wraps the docker build command for which we use official docker build action.

Also, doing docker cache like this is a bit unfortunate as this has a lot of implications. Most important one is a security issue that you are using public GitHub action storage (warning is what you want to read) to cache layers which are basically plain text files.

A better way would be to use some other build cache backend like registry and point it to our harbor, or if that wouldn't work to use S3, through their official GitHub action.

@MarekBodingerBA MarekBodingerBA marked this pull request as draft August 27, 2024 13:46
@MarekBodingerBA
Copy link
Collaborator

Converted to draft.

@skifahrer
Copy link
Contributor Author

hanks for the feedback, everyone. It was still in draft/testing mode. I hadn’t finished it before I left for vacation and forgot to change this PR to draft. I’ll let you know when everything is implemented.

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

Successfully merging this pull request may close these issues.

3 participants