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

CI feature: integrate pull request preview environments #676

Open
waveywaves opened this issue Jan 24, 2023 · 1 comment
Open

CI feature: integrate pull request preview environments #676

waveywaves opened this issue Jan 24, 2023 · 1 comment

Comments

@waveywaves
Copy link

I would like to support Portier by implementing Uffizzi preview environments.
Disclaimer: I work on Uffizzi.

Uffizzi is a Open Source full stack previews engine and our platform is available completely free for Portier (and all open source projects). This will provide maintainers with preview environments of every PR in the cloud, which enables faster iterations and reduces time to merge. You can see the open source repos which are currently using Uffizzi over here

Uffizzi is purpose-built for the task of previewing PRs and it integrates with your workflow to deploy preview environments in the background without any manual steps for maintainers or contributors.

We can go ahead and create an Initial PoC for you right away if you think there is value in this proposal.

@stephank
Copy link
Member

Hi! Uffizzi looks like a great service, and thanks for the offer!

I was looking through the documentation and examples, and had the following thoughts:

  • A challenge with previewing the broker is that it's not really a useful web app by itself. We'd also have to deploy, for example, demo-rp as a client application. Getting an image of demo-rp in the same docker-compose config is fairly straight forward, but the two of them have to be on separate hosts. Is it possible to preview two vhosts in Uffizzi?

  • We do have a Dockerfile, but for CI we build in the preconfigured virtual environments provided by GitHub Actions, simply because it's quicker. But we have a mechanism in place to reuse the Dockerfile base stage and inject any binary, which is also what we use in our release workflow (to publish to Docker Hub):

    # Reuse the Dockerfile base system, but copy in the release instead
    # of rebuilding. This ensures we use the same binaries everywhere.
    cp Dockerfile Dockerfile-release
    echo "FROM base AS release" >> Dockerfile-release
    echo "COPY ./$basename /opt/portier-broker" >> Dockerfile-release

    Maybe something similar is possible in the regular build workflow to reuse the same binary. There's a chance this will fail because of incompatibilities between Ubuntu 22.04 (GitHub) and Debian 11 (Dockerfile). We dynamic link glibc and openssl.
    (The only reason I'm thinking along these lines is to save on having to do a separate build just for Docker. It seemed wasteful.)

  • I'm open to adding this to Portier, but would also recommend we only go ahead with this if it has value to you as well. Portier is not a super active project, and we generally don't get a lot of PRs from outside contributors.
    On that note, we do have a bot in place that auto-updates Cargo.lock via PRs. So there is an almost daily churn of PRs that are also auto-merged when CI is green. If you think that's trouble, we could try make an exception for it in the workflow.

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

No branches or pull requests

2 participants