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

Automatically deploy pull requests #472

Merged
merged 1 commit into from
May 31, 2024
Merged

Conversation

lkiesow
Copy link
Member

@lkiesow lkiesow commented May 28, 2024

This patch automatically deploys pull requests with static mock data to https://test.admin-interface.opencast.org similar to how the test deployment of the Opencast Editor works.

Unfortunately, we cannot set a path prefix for mock data which means that all deployments share the lattest set of mock data. But since they shouldn't change very often, that's probably okay for this to get started.

Copy link
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

This patch automatically deploys pull requests with static mock data to
https://test.admin-interface.opencast.org similar to how the test
deployment of the Opencast Editor works.

Unfortunately, we cannot set a path prefix for mock data which means
that all deployments share the lattest set of mock data. But since they
shouldn't change very often, that's probably okay for this to get
started.
Copy link
Contributor

Use docker or podman to test this pull request locally.

Local test with mock data

podman run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/opencast/opencast-admin-interface:pr-472

Proxy data from develop.opencast.org

podman run --rm -it -p 127.0.0.1:3000:3000 -e PROXY_TARGET=https://develop.opencast.org ghcr.io/opencast/opencast-admin-interface:pr-472

It may take a few seconds for the interface to spin up.
It will then be available at http://127.0.0.1:3000.
For more options you can pass on to the proxy, take a look at the README.md.

Copy link
Member

@Arnei Arnei left a comment

Choose a reason for hiding this comment

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

The workflow reads reasonably, mostly because it reads very similar to the respective editor workflow, so we should be good.

Seeing as how this would be quite difficult to test without access to the required github secrets, how about we go ahead and merge this? We can still hotfix it if anything breaks.

Also this is not necessarily a change request, but why do we not do a opencast developer/committer membership check like in the editor?

@lkiesow
Copy link
Member Author

lkiesow commented May 31, 2024

Also this is not necessarily a change request, but why do we not do a opencast developer/committer membership check like in the editor?

Because this cases the code from a pull request to be checked out and executedin an environment which has access to secrets like the private deployment key. A malicious actor can steal that. A malicious actor can aalso use this to publish any code, binary, … under an opencast.org domain. Again, not great.

GitHub has a limited built-in protection in that this will only run automatically for users which have an accepted contribution merged into the default branch. But that also means a contributtion from 10 years ago with no way for us to remove that user even if we know that their account has been compromised.

@lkiesow
Copy link
Member Author

lkiesow commented May 31, 2024

Seeing as how this would be quite difficult to test without access to the required github secrets, how about we go ahead and merge this? We can still hotfix it if anything breaks.

+1 from me. I justt verified tthat #471 did not break this. We already discussed this PR on Tuesday. If you waant to merge tthis, please go ahead.

@Arnei Arnei merged commit 7d84ae0 into opencast:main May 31, 2024
3 checks passed
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.

2 participants