4567 Commits

Author SHA1 Message Date
Thilo Fromm
012001ec3c checkout: fix typo in update strategy detection
Co-authored-by: Kai Lüke <pothos@users.noreply.github.com>
2022-01-07 16:10:44 +01:00
Thilo Fromm
d60a003702 checkout: helper script for checking out branches and tags
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-01-07 16:10:44 +01:00
Thilo Fromm
0d361563bf Merge pull request #205 from flatcar-linux/scripts
fix sdk_entry.sh setup_board fallout
2022-01-07 13:27:36 +01:00
Thilo Fromm
b9e9b8f050 sdk_lib/sdk_entry.sh: only call setup_board if /build/... exists
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-01-07 13:27:36 +01:00
Thilo Fromm
6aa5174bec sdk_lib/Dockerfile.sdk-import: use root user by default
sdk_entry.sh is expected to be called by the root user, so we set USER
root:root. Also we add a "root" entry to passwd and group since it does
not exist in the SDK tarball.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-01-07 13:27:36 +01:00
Thilo Fromm
f3f45d6b11 Merge pull request #207 from flatcar-linux/scripts
sdk_container: better docker / podman detection
2022-01-07 12:20:38 +01:00
Thilo Fromm
0ace755cb8 sdk_container: better docker / podman detection
In bce3bd9031fa78c79173f29bcac5bc49c81a03b4, we added support for podman
for building and running the SDK container. The presence of podman is
auto-detected in sdk_container_common.sh. However, podman is preverred
over docker, requiring users to use *sudo* (which podman requires and
docker does not).

This change uses docker when present, podman otherwise. It also improves
podman detection - 'podman' uses argv[0] in its version string, so if
'docker' is a symlink to 'podman', 'podman --version' output uses
'docker'. This broke the SDK container on hosts which have a 'docker'
symlink to 'podman' since 'podman' is then run w/o 'sudo'.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-01-07 12:20:38 +01:00
Kai Lueke
026a5274a8 Merge pull request #206 from flatcar-linux/scripts
build_sdk_container_image: force removal of running container
2022-01-07 11:51:39 +01:00
Kai Lueke
b0e098a464 build_sdk_container_image: force removal of running container
At least with Podman it's not possible to call "container rm" on a
running container without the force flag.
Add the force flag which is also used elsewhere already.
2022-01-07 11:51:39 +01:00
Kai Lueke
e7dfd931eb Merge pull request #199 from flatcar-linux/scripts
run/build_sdk_container: support Podman
2022-01-07 11:51:24 +01:00
Kai Lueke
a0ddca9e2f run/build_sdk_container: support Podman
When the docker wrapper script for Podman is used, we need to
explicitly create a root user container with "sudo podman".
Podman also has its own bridge for root user containers which we need
to detect, and it requires to explicitly say to use the Docker Hub
Caddy image.
Add a "$docker" variable that uses sudo podman as needed, and also
check which bridge interface to use. The filter had to be changed
because it didn't work with Podman. Use the Docker Hub Caddy image
explicitly.
2022-01-07 11:51:24 +01:00
Kai Lueke
c8b1909e8e Merge pull request #203 from flatcar-linux/scripts
sdk_lib/sdk_entry: handle permission error for target version file
2022-01-06 19:01:49 +01:00
Kai Lueke
f8d5685389 sdk_lib/sdk_entry: handle permission error for target version file
The creation of the target version file failed:
/home/sdk/sdk_entry.sh: line 32: /build/amd64-usr/etc/target-version.txt: Permission denied
Use root permissions to create the file.
2022-01-06 19:01:49 +01:00
Thilo Fromm
a501865e3b Merge pull request #201 from flatcar-linux/scripts
sdk_entry.sh: ensure currect binpkg host
2022-01-06 17:13:57 +01:00
Thilo Fromm
56e5fc8a29 sdk_entry.sh: ensure currect binpkg host
This change ensures the binpkg host is updated if the board (OS) version
differs from the SDK version.

This is to ensure /build/[arch] uses the correct binary package cache.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-01-06 17:13:57 +01:00
flatcar-ci
291bc51a2b Merge pull request #200 from flatcar-linux/scripts
sdk_lib/sdk_entry.sh: use a login shell to source /etc/profile
2022-01-05 18:15:09 +01:00
flatcar-ci
867c162ad1 sdk_lib/sdk_entry.sh: use a login shell to source /etc/profile
For execution of the compiled binaries in /build/arm64-usr we rely on
qemu-user binfmt emulation and have to tell it where the root is with
QEMU_LD_PREFIX because build systems don't chroot into /build/arm64-usr
themselves (which also works just by chance on amd64 because we have
similar glibc versions and so on). The env var setup was done in
/etc/profile.d/qemu-aarch64.sh but is now not read anymore since the
container runs the shell not as login shell.

Add the login options to the bash and su calls when starting the
container.
2022-01-05 18:15:09 +01:00
flatcar-ci
f28cecc3d8 Merge pull request #198 from flatcar-linux/scripts
ci-automation: allow to optionally push and sign the commit
2022-01-05 18:14:31 +01:00
Kai Lueke
f91119a9c7 ci-automation: allow to optionally push and sign the commit
For test builds the commit that updates the submodules can be free-
standing but for releases we need to push it to the branch and also
sign the tag.
Add optional arguments that are used by the tag-release script in
flatcar-build-scripts.
2022-01-05 18:14:31 +01:00
Thilo Fromm
f0feddcbc4 Merge pull request #196 from flatcar-linux/scripts
run_sdk_container: use exact match for existing containers
2022-01-05 15:00:20 +01:00
Thilo Fromm
54f2e647be run_sdk_container: use exact match for existing containers
run_sdk_container uses the sourcetree version to decide whether to
re-use existing containers or create new ones. However, containers were
not matched by exact name - instead, plain --filter name="..." was used,
leading to prefix matching. This change updates name="..." to use
regular expressions for exact matching.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-01-05 15:00:20 +01:00
Thilo Fromm
2a69559976 Merge pull request #197 from flatcar-linux/scripts
build_packages: fix default torcx output root
2022-01-05 14:32:30 +01:00
Thilo Fromm
a015658d65 build_packages: fix default torcx output root
In 9fba5789f95bf79a393c5e35cb2346d3900e29ba we introduced
--torcx_output_root as an optional command line parameter
and had it default to "${DEFAULT_BUILD_ROOT}", inadvertently
diverging from the previous default, which was
"${DEFAULT_BUILD_ROOT}/torcx".

This change sets the correct default root "${DEFAULT_BUILD_ROOT}/torcx" to bring
build_packages back into alignment with build_image.
2022-01-05 14:32:30 +01:00
Krzesimir Nowak
3717d1742d changelog: Add bugfix entry 2021-12-22 17:39:14 +01:00
Krzesimir Nowak
e3d9488b58 *: Replace kinvolk github org with flatcar-linux
Stop relying on github redirects, they are a mixed blessing and using
them broke emerge-gitclone inside dev-container in silent way. The
script could not find a desired revision of portage-stable or
coreos-overlay, because it tried to pull from kinvolk instead of
flatcar-linux github org. The redirects seem to hinder fetching a
specific commit, so the script pulled something else (HEAD or main?).
2021-12-22 17:39:10 +01:00
Thilo Fromm
9c260cfba0 coreos-overlay + portage-stable: bump to latest 3066
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-12-16 19:01:07 +01:00
Thilo Fromm
3c2a160770
Merge pull request #191 from flatcar-linux/t-lo/sdk-container-release-3066.1.0
New release: beta-3066.1.0
beta-3066.1.0
2021-12-15 10:18:14 +01:00
Thilo Fromm
3a893d5924 New release: beta-3066.1.0 2021-12-15 09:50:13 +01:00
Dongsu Park
9a5418f105 changelog: add bugfix for publishing arm64 Stable images 2021-12-10 14:31:49 +01:00
Dongsu Park
e15ccf6123 jenkins: make release.sh publish arm64 for Stable
From flatcar-3033 on, arm64 images are available for Stable channel, we
need to also add arm64 to Stable boards.
2021-12-10 14:31:47 +01:00
Dongsu Park
cf4ff44a9c changelog: add bugfix for publishing arm64 Beta images 2021-12-10 09:52:39 +01:00
Dongsu Park
b7b0aec162 jenkins: make release.sh publish arm64 for Beta
Now that arm64 images are available for Beta channel, we need to also
add arm64 to Beta boards.
2021-12-10 09:52:37 +01:00
Thilo Fromm
944bea6095
Merge pull request #187 from flatcar-linux/t-lo/sdk-container-for-3066
sdk-container: add scripts for containerised SDK (3066 backport)
2021-12-08 14:00:42 +01:00
Thilo Fromm
4bb6b29076 sdk-container: add scripts for containerised SDK
Back-port for flatcar-3066 branch.

This change introduces a containerised SDK as a replacement for cork SDK
operations. It also simplifies versioning by removing the need for
manifest repos as well as usage of the "repo" tool by use of git
submodules for coreos-overlay and portage-stable.

The following feature scripts are added:
- run_sdk_container: Run a command in an SDK container, using the
        current scripts repo + ebuild submodules.
        current scripts repo + ebuild submodules.
- bootstrap_sdk_container / build_sdk_container_image: Bootstrap a new
        SDK and create an SDK container from the resulting SDK tarball.

The following additions have been made to SDK scripts:
- setup_board: add --pkgdir parameter to use a custom binary packge
  directory.
2021-12-07 19:46:30 +01:00
Dongsu Park
a6e9a72feb jenkins: override PARALLEL_TESTS for ARM servers in da11
We override `PARALLEL_TESTS`, because kola run with PARALLEL_TESTS >= 4
causes the tests to provision >= 12 ARM servers at the same time. As the
da11 region does not have that many free ARM servers, the whole tests
will fail. With PARALLEL_TESTS=2 the total number of servers stays < 10.
In addition, we override `timeout` to 10 hours, because it takes more
than 8 hours to run all tests only with 2 tests in parallel.
2021-11-26 15:52:05 +01:00
Mathieu Tortuyaux
1613f1f80a
kola/packet: override EM region for ARM64 server
Equinix Metal ARM server are not yet hourly available in the default `sv15` region
so we override the `PACKET_REGION` to `Dallas` since it's available in this region.
We do not override `PACKET_REGION` for both board on top level because we need to keep proximity
for PXE booting.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
alpha-3066.0.0
2021-11-22 20:00:59 +01:00
Kai Lüke
e5d3c03b00
Merge pull request #171 from flatcar-linux/kai/bucket-packages
set_version: Document the bucket cache for packages
alpha-3046.0.0
2021-10-28 18:07:19 +02:00
Kai Lueke
af8daf7dc8 set_version: Document the bucket cache for packages
Dev builds need to use the bucket cache instead of the release
binary package mirror.
Document how the user can select the bucket cache.
2021-10-28 17:45:48 +02:00
Jeremi Piotrowski
50ed7f3007
Merge pull request #178 from flatcar-linux/jepio/update-chroot-setuponly
update_chroot: introduce '--setuponly' flag
2021-10-26 13:53:41 +02:00
Jeremi Piotrowski
385f5779b7
Merge pull request #177 from flatcar-linux/jepio/github-status
jenkins: publish github status 'pending' at beginning of manifest job
2021-10-25 16:46:55 +02:00
Jeremi Piotrowski
2213e9beea update_chroot: introduce '--setuponly' flag
Currently the os/sdk and os/toolchains job perform a chroot update whose
results are immediately discarded because the rest of the build uses a fresh
chroot and catalyst. Towards the end of a release period this can extend the
build time by about an hour (longer if rust is involved).

Introduce a `--setuponly` flag that bails after the chroot configuration, and
the skips chroot update.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2021-10-25 14:14:26 +02:00
Jeremi Piotrowski
abf849ce57 jenkins: publish github status 'pending' at beginning of manifest job
and add script used for that purpose. This requires access to a github PAT
with 'repo.status' permissions.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
2021-10-25 13:44:15 +02:00
Sayan Chowdhury
9b5918f70f
Merge pull request #176 from flatcar-linux/sayan/remove-c3-small-packet
jenkins/kola/packet: Remove c3.small.x86 to try running cl.internet
2021-10-22 21:25:08 +05:30
Sayan Chowdhury
2fe1e979c0
jenkins/kola/packet: Remove c3.small.x86 to try running cl.internet
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
2021-10-22 21:21:39 +05:30
Kai Lüke
bf4e013ac7
Merge pull request #175 from flatcar-linux/kai/aws-arm
jenkins/kola/aws.sh: use larger arm64 instance type for kubeadm
2021-10-21 14:11:19 +02:00
Kai Lueke
0bd6d1aae5 jenkins/kola/aws.sh: use larger arm64 instance type for kubeadm
Currently the kubeadm tests fail on arm64 because the instance type
only offers 1 vCPU:
cluster.go:117: error execution phase preflight: [preflight] Some fatal errors occurred:
cluster.go:117: [ERROR NumCPU]: the number of available CPUs 1 is less than the required 2

Switch to the next larger instance type which has 2 vCPUS.
2021-10-21 14:03:39 +02:00
Sayan Chowdhury
f426fe1996
Merge pull request #174 from flatcar-linux/sayan/update-packet-base-url
packet: Update the base URL to point to bucket.release.f-ln
2021-10-21 17:25:59 +05:30
Sayan Chowdhury
0028f95a26
packet: Update the base URL to point to bucket.release.f-ln
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
2021-10-21 14:01:09 +05:30
Sayan Chowdhury
d8762c831f
Merge pull request #173 from flatcar-linux/sayan/update-do-base-url
do: Update the base URL to point to bucket.release.f-ln
2021-10-21 12:15:43 +05:30
Sayan Chowdhury
e04af554fa
do: Update the base URL to point to bucket.release.f-ln
Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
2021-10-21 12:03:54 +05:30