There is an issue that the Docker containers cannot modify the
files on KEYMAN_ROOT, since the user running build and tests on
Docker does not have the same gid and uid as the host user starting
the container.
The issue is solved by temporarily changing the uid and gid to
match the container user's uid and gid.
Test-bot: skip
Build-bot: skip
maint(linux): fix integration tests in Docker
This PR allows the integration tests to work when running them in a Docker container. Also fixes things when running on TC's Ubuntu 24.04 Noble build agent, and improves the behavior when running directly on a developer's machine (previously typing stopped working after the tests...).
Also fixes building mcompile in a Docker container.
Fixes: #13887
This change improves our `.shellcheckrc` file so that several directives
are no longer needed and source files are still found. Also remove some
directives that are no longer necessary, either because the changes to
`.shellcheckrc` makes them obsolete, or because the lines changed so
that they no longer contain the problem.
Also remove some shellcheck warnings.
Build-bot: skip
Test-bot: skip
This adds a `--remote-debug` option to `resources/docker-images/run.sh`.
If specified the container will expose `localhost:2345` for remote
debugging inside of the container.
This is useful for debugging integration tests in the container.
Build-bot: skip
Test-bot: skip
setting KEYMAN_ROOT
ignoring test:linux until #13887 is fixed
removing docker "-t" option, because there is no terminal to attach
while running on the GitHub server
Test-bot: skip
Build-bot: skip
It is now possible to keep the Docker images for building and testing
in a Docker container registry.
This is the first part of changes for #13954. The GitHub actions part is
missing.
Fixes: #13954
Test-bot: skip
Build-bot: skip
Fixed some errors found during tests for #13954 when running
resources/docker-images/run.sh with targets ":linux" and ":web".
Build-bot: skip
Test-bot: skip
Consolidates the node-related script functions into node.inc.sh, as part
of cleaning up the build scripts and making them easier to maintain into
the future. In the earlier commite some changes were missing.
Follows: #14540Fixes: #14447
Build-bot: skip
Test-bot: skip
This fixes a permission problem when we run docker from git bash.
On Windows we want to build as _root_ inside of the docker container.
This gives the necessary permissions due to the way the Windows user
is mapped to git bash/mingw and the docker container. On Linux
however we want to build as _build_ user inside the container so that
files we create are owned by the host user.
See https://github.com/keymanapp/keyman/pull/14154#issuecomment-2970577312
for further explanation.
By default Git Bash converts paths starting with `/`, so running the
docker image fails with errors or files mentioning `\Program Files\Git\`.
This change adds a wrapper function that prevents the conversion
and thus uses the paths in the correct form when calling docker.
Consolidates the node-related script functions into node.inc.sh, as part
of cleaning up the build scripts and making them easier to maintain into
the future. In the earlier commite some changes were missing.
Fixes: #14447
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.
Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh
Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
android/build.sh.
* Renames functions in builder-basic.inc.sh
More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.
Fixes: #14065
Build-bot: build all
Test-bot: skip
Adds documentation for various functions, removes unused functions (a
couple of simple, very lightly used functions were unDRYed; these could
go back the other way across all shell scripts if necessary). TODO items
noted for follow-up refactoring.
Fixes: #14275
Relates-to: #14269
Build-bot: build all
Test-bot: skip
- add `builder_is_windows`, `builder_is_macos` and `builder_is_linux`
functions
- add/move `BUILDER_OS` env variable to `resources/builder.inc.sh`
- use the new functions and env variable
Fixes: #14109
Test-bot: skip
This change verifies that `docker buildx` is available and then uses that
for building the images. For that we apparently need the magic line at
the top of the `Dockerfile`s and set the environment variable
`DOCKER_BUILDKIT`. This solves a problem building docker images on
Linux with an older Docker version where the heredocs didn't work.
This changes `convert_parameters_to_build_args` to set the variable to
the default values unless set already. Then we don't have to deal with
unset variables and setting default values when we use the variables.