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

Fix test containers #945

Merged
merged 2 commits into from
Nov 29, 2024
Merged

Fix test containers #945

merged 2 commits into from
Nov 29, 2024

Conversation

lkiesow
Copy link
Member

@lkiesow lkiesow commented Oct 10, 2024

This patch fixes the test containers, which were failing since git is now required for building/running the admin interface.

@lkiesow lkiesow added the type:tests Unit and integration tests label Oct 10, 2024
Copy link
Contributor

Use docker or podman to test this pull request locally.

Run test server using develop.opencast.org as backend:

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

Specify a different backend like stable.opencast.org:

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

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
Contributor

github-actions bot commented Oct 10, 2024

This pull request is deployed at test.admin-interface.opencast.org/945/2024-10-17_21-14-35/ .
It might take a few minutes for it to become available.

@marcusm7
Copy link

Tested the docker image with:
docker run --rm -it -p 127.0.0.1:3000:3000 ghcr.io/opencast/opencast-admin-interface:pr-945

The git dependency is found now, but it can't find the git repo, it seems.

fatal: not a git repository (or any of the parent directories): .git
failed to load config from /admin-interface/vite.config.ts
error when starting dev server:
Error: Command failed: git rev-parse HEAD
fatal: not a git repository (or any of the parent directories): .git

    at genericNodeError (node:internal/errors:984:15)
...

This patch fixes the test containers, which were failing since `git` is
now required for building/running the admin interface.

If `git` is not installed, the tooling will now read the `commit` file if
present (we create one during the container build on GitHub Actions). If
the file also does not exists, the build continues with an empty commit
string.
@lkiesow
Copy link
Member Author

lkiesow commented Oct 17, 2024

Should be fixed now

Copy link
Member

@mtneug mtneug left a comment

Choose a reason for hiding this comment

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

I would have used env variables with default values, but this also works. There is one outstanding typo and I would suggest having some default non-empty string.

vite.config.ts Outdated Show resolved Hide resolved
Co-authored-by: Matthias Neugebauer <mtneug@mailbox.org>
@lkiesow lkiesow requested a review from mtneug November 29, 2024 16:36
Copy link
Contributor

Use docker or podman to test this pull request locally.

Run test server using develop.opencast.org as backend:

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

Specify a different backend like stable.opencast.org:

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

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
Contributor

This pull request is deployed at test.admin-interface.opencast.org/945/2024-11-29_16-36-38/ .
It might take a few minutes for it to become available.

@JamesUoM
Copy link
Contributor

Though it works it's using the default:

/bin/sh: git: not found
cat: can't open 'commit': No such file or directory

@ziegenberg ziegenberg merged commit 4f2126e into opencast:main Nov 29, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:tests Unit and integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants