- Apr 13, 2022
-
-
Kevin Daudt authored
As a security fix, git no longer allows executing in repositories owned by a different user. gitlab-runner clones the repositories as root, while the build script runs as a non-root user, resulting git in erroring out. As a simple fix, chown all files in the repository as the current user.
-
- Mar 02, 2022
-
-
Kevin Daudt authored
`changed_aports` uses `--diff-filter=ACMR` so that it only get aports with relevant changes. Removed aports for example do not need to be built. But `changed_repos` omitted this filter. This lead to discrepancies between these two functions. This specifically resulted into issues when packages were moved. `changed_repos` would for example return 'main', when a package would be moved from main to community. `changed_aports` then would not report any package to be changed. But the way the amount of changed packages are counted, it would report '1', even though no packages have been built for this repo. This in turn results `build_start` going negative, which is used as a start range for `sed`, which then tries to interpret it as an argument which fails. Fix this by applying the same filter to `changed_repos` as `changed_aports` uses. See: alpine/infra/docker/alpine-gitlab-ci!11
-
Kevin Daudt authored
`changed_aports` uses `--diff-filter=ACMR` so that it only get aports with relevant changes. Removed aports for example do not need to be built. But `changed_repos` omitted this filter. This lead to discrepancies between these two functions. This specifically resulted into issues when packages were moved. `changed_repos` would for example return 'main', when a package would be moved from main to community. `changed_aports` then would not report any package to be changed. But the way the amount of changed packages are counted, it would report '1', even though no packages have been built for this repo. This in turn results `build_start` going negative, which is used as a start range for `sed`, which then tries to interpret it as an argument which fails. Fix this by applying the same filter to `changed_repos` as `changed_aports` uses.
-
- Jan 16, 2022
-
-
Kevin Daudt authored
It is still used.
-
Kevin Daudt authored
See merge request alpine/infra/docker/alpine-gitlab-ci!10
-
Kevin Daudt authored
gitlab supports section markers which can be used specify collapsible sections to make the build log better readable.
-
Kevin Daudt authored
`REPODEST` was declared read-only in build.sh. Later, 'abuild.conf', which also defines `REPODEST`, is being sourced in a subshell. This resulted in a warning about `REPODEST` being read-only. Fix this by defining REPODEST as a normal variable, not a read-only variable.
-
Kevin Daudt authored
changed_aports pipes the result to `xargs` to make it space delimited like the output of `ap builddirs`, for the consumer to pipe it to `xargs -n1 echo` to make it line delimited again for sed. Remove these redundant steps.
-
Kevin Daudt authored
This suppresses the hint that happens in every CI build.
-
Kevin Daudt authored
This way the functionality can be reused
-
Kevin Daudt authored
This has been fixed in abuild-keygen, so we no longer need to work around it.
-
Kevin Daudt authored
See merge request alpine/infra/docker/alpine-gitlab-ci!9
-
Kevin Daudt authored
The `changed_repos` function determines what repos have changes so that it only builds repos that actually have changes. But this function just does a plain diff against the target branch. This means if the target branch has any changes compared to the source branch, it would consider that branch as well. This was never a real issue, because the `changed_aports` function correctly returns the changed aports for a give repo, which would be empty in case there are no changed aports for that repo. This is also no a problem in general, because the other repositories always have aports. This would break when a repository does not have any aports, because `ap builddirs` would throw an error. New functionality has been added that determines how many aports have changed and tries to select only a subset. To do that, it needs to convert a space delimited list into a new-line delimited list. It uses `xargs -n1 echo` for that. The problem is that by default, `xargs` runs echo as well even if there are no items passed, resulting in a single newline being returned. Passing that to `wc -l` returns '1' while no aport was changed. This throws off the accounting for limiting the packages being built. Fix this by both properly doing an asymmetric diff against the target branch in `changed_repos` and by adding `-r` to `xargs` so that it returns nothing when there are no changed aports.
-
- Jan 15, 2022
-
-
Kevin Daudt authored
See merge request alpine/infra/docker/alpine-gitlab-ci!8
-
- Jan 13, 2022
-
-
Kevin Daudt authored
This adds 2 environment variable to control what subset of the changed packages to build. The offset determines where to start in the list of changed packages, and the limit determines how many to build.
-
- Dec 06, 2021
-
-
Kevin Daudt authored
Since sudo is no longer available, we need to tell abuild-keygen to use doas instead.
-
- Nov 28, 2021
-
-
Kevin Daudt authored
Closes build-base#1 See merge request alpine/infra/docker/alpine-gitlab-ci!7
-
Kevin Daudt authored
It has already been removed from the base image (build-base). Closes alpine/infra/docker/build-base#1
-
- Oct 19, 2021
-
-
Kevin Daudt authored
This is to prevent warnings about a default branch name missing from git.
-
- Jun 17, 2021
-
-
Kevin Daudt authored
For riscv64, we temporarily need to be able to use a custom mirror. The mirror is already a variable, but make sure we can override it with an environment variable.
-
- Jun 14, 2021
-
-
Kevin Daudt authored
`abuild-keygen -i` uses `cp -i` to copy the public key to prevent it from being unexpectedly being overwritten. This either causes the test to hang, because it waits for stdin, or to fail, when no stdin is available, which happened occasionally. Patch abuild-keygen to ommit '-i' to prevent this issue.
-
Kevin Daudt authored
With the change of pipestatus to pipefail, we forgot to capture stderr as well, which was captured with pipestatus.
-
Kevin Daudt authored
Even though POSIX sh does not have pipefail, busybox ash does have it. This lets us remove the pipestatus library, which, even though it works, causes flaky behavior in our test-suite in CI.
-
- May 19, 2021
-
-
Kevin Daudt authored
The search pattern was pretty lax, resulting in unintended changes. New settings have been added to abuild.conf that were mangled: > export CARGO_BUILD_JOBS=$JOBS became > export CARGO_BUILD_JOBS=$(nproc)$JOBS This in turn results in CI jobs for rust packages timing out on dowloading crates. Fix this by being more strict in what is matched. Fixes alpine/infra/infra#10721
-
- Mar 07, 2021
-
-
Kevin Daudt authored
When no packages are built, `~/packages/` is empty, resulting into an error when referring to `~/packages/*`. Just ignore any errors for now.
-
- Feb 27, 2021
-
-
Kevin Daudt authored
See merge request alpine/infra/docker/alpine-gitlab-ci!6
-
Kevin Daudt authored
With `set -u`, the shell will return an error. Use `${-}` to provide an empty default value.
-
Kevin Daudt authored
-
Kevin Daudt authored
When piping commands, the exit code of all commands except the last one is swallowed. This is problematic, because it prevents us properly detecting the if the build is successful, because we want to be able to pipe the output of commands to capture the output. POSIX sh however has no way to determine the exit status of earlier commands in the pipe. [pipestatus][0] is a small single-file library that has some functions that emulate a pipeline, and provide the exit status of each command. There is also a convenient function `runpipe0`, that will return only 0 if all the commands in the pipeline ran successful. [0]:https://github.com/cheusov/pipestatus/
-
Kevin Daudt authored
In order to make it easier to extract information from the buildlogs, write certain parts of the buildlogs to dedicated report logs. These logs can then be expose through artifacts.
-
Kevin Daudt authored
-
- Feb 26, 2021
-
-
Kevin Daudt authored
-
- Feb 22, 2021
-
-
Kevin Daudt authored
-
- Feb 21, 2021
-
-
Kevin Daudt authored
The maximum size of artifacts that can be uploaded to gitlab is limited to reduce the storage requirements. When packags are built successfully, but the combined package size is too large, the CI job will still fail, because it failed to upload the artifacts. To prevent this from happening, only offer the packages for upload as artifacts when the combined size is lower than a set limit. This will allow the CI job to succeed at the cost of not being able to download the built packages as artifacts. This also introduces a test suite to test the the build script.
-
- Feb 20, 2021
-
-
Kevin Daudt authored
To allow them to be uploaded as artifacts, they need to be available in the project directory. The files are now copied in the CI script, but the issue is that when the files are too large, the CI job fails. This is solved by copying these files only when they are smaller than the limit.
-
Kevin Daudt authored
This adds a basic test based on bats to verify that the build script works. This can be expanded with more tests to cover all functionality and edge cases.
-
Kevin Daudt authored
This makes it easier to test the script by allowing to specify a REPODEST in a temporary location. This variable is however not used consistently, so adjust the places that refer directly to `$HOME/packages` to use `$REPODEST`.
-
- Feb 10, 2020
-
-
Kevin Daudt authored
-
Kevin Daudt authored
If the tag already exists (because the repo is reused), then git will fail to create the tag by default.
-
- Feb 09, 2020
-
-
Kevin Daudt authored
-