Skip to content

ci: add freebsd target for releases #1660

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

Merged
merged 1 commit into from
Jul 31, 2023
Merged

Conversation

rchincha
Copy link
Contributor

What type of PR is this?

Which issue does this PR fix:

What does this PR do / Why do we need it:

If an issue # is not available please add repro steps and logs showing the issue:

Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rchincha
Copy link
Contributor Author

Related to #1659

@rchincha
Copy link
Contributor Author

Binary builds going through, checking if container images can be built.
https://github.com/rchincha/zot/actions/runs/5695451238/job/15438625904

@rchincha
Copy link
Contributor Author

https://github.com/rchincha/zot/actions/runs/5695684455

Container images also being built looks like. However, we need a way to validate them.

docker run -it ghcr.io/rchincha/zot-freebsd-amd64:latest
docker run -it ghcr.io/rchincha/zot-freebsd-arm64:latest

@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #1660 (27fc729) into main (20391a2) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 27fc729 differs from pull request most recent head 53668c1. Consider uploading reports for the commit 53668c1 to get more accurate results

@@            Coverage Diff             @@
##             main    #1660      +/-   ##
==========================================
- Coverage   91.37%   91.36%   -0.01%     
==========================================
  Files         121      121              
  Lines       26184    26174      -10     
==========================================
- Hits        23925    23915      -10     
  Misses       1686     1686              
  Partials      573      573              
Files Changed Coverage Δ
pkg/api/controller.go 95.27% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

rchamarthy
rchamarthy previously approved these changes Jul 28, 2023
@rchincha
Copy link
Contributor Author

Pls. don't merge this yet, would like to get some validation first.

@dfr
Copy link
Contributor

dfr commented Jul 29, 2023

I did look at the container image build yesterday and it should be possible. It would maybe need a freebsd version of ghcr.io/project-zot/golang:1.20 and definitely a freebsd version of gcr.io/distroless/base. Both are probably achievable - I guess project-zot/golang:1.20 is under your control and distroless is on my list (although somewhat low priority at the moment). With those images, the Dockerfile ought to work just fine as long as the resulting image is marked as os=freebsd rather than os=linux.

@dfr
Copy link
Contributor

dfr commented Jul 29, 2023

I looked at ghcr.io/rchincha/zot-freebsd-amd64:latest and it is correctly marked as os=freebsd but looking inside, its using a linux distroless base which will not work

@rchincha
Copy link
Contributor Author

rchincha commented Jul 29, 2023

I looked at ghcr.io/rchincha/zot-freebsd-amd64:latest and it is correctly marked as os=freebsd but looking inside, its using a linux distroless base which will not work

@dfr do you have a recommendation for a trusted/official minimal freebsd image we can package off of?
Did see this though - https://hub.docker.com/r/dougrabson/freebsd-minimal

@dfr
Copy link
Contributor

dfr commented Jul 30, 2023

I looked at ghcr.io/rchincha/zot-freebsd-amd64:latest and it is correctly marked as os=freebsd but looking inside, its using a linux distroless base which will not work

@dfr do you have a recommendation for a trusted/official minimal freebsd image we can package off of? Did see this though - https://hub.docker.com/r/dougrabson/freebsd-minimal

Unfortunately there isn't an official freebsd image yet - I have been advocating for this but it needs to be integrated into the official FreeBSD release engineering workflow which will take some time to get right. In the meantime, I am supplying smallish images which you can use, e.g. quay.io/dougrabson/freebsd-minimal:13.2 or docker.io/dougrabson/freebsd-minimal:13.2. These contain a basic set of core utilities as well as libs so are a bit bigger than distroless-base.

I am working on improving the build process for these images so that I can offer something similar to distroless-base but that needs a little more testing before I can push it publically.

@rchincha
Copy link
Contributor Author

Unfortunately there isn't an official freebsd image yet

@dfr let's do this in two steps, we will officially release freebsd binaries from our ci pipeline. Once we have an official freebsd minimal image, we can quickly incorporate that into our pipeline. I am going to try your minimal image in my fork though.

@dfr
Copy link
Contributor

dfr commented Jul 31, 2023

Unfortunately there isn't an official freebsd image yet

@dfr let's do this in two steps, we will officially release freebsd binaries from our ci pipeline. Once we have an official freebsd minimal image, we can quickly incorporate that into our pipeline. I am going to try your minimal image in my fork though.

That makes perfect sense - as far as I know, I am the only freebsd user at the moment and I'm comfortable building my own images. I will likely add this to the FreeBSD ports system to make it simple to install for folk who want a bare metal alternative to docker-registry.

Signed-off-by: Ramkumar Chinchani <[email protected]>
@rchincha rchincha merged commit 42f9f78 into project-zot:main Jul 31, 2023
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.

4 participants