Commit Graph

11 Commits

Author SHA1 Message Date
Krzesimir Nowak
527bd2237b ci-automation: Sign artifacts and upload the signatures
It uses the SIGNER environment variable to decide whether the
signatures should be created or not. It expect the key of the SIGNER
to exist in GPGHOME, and that's what gpg_setup.sh is already doing.

In some places we need to recursively change the owner of the
directory that contains artifacts to be signed, otherwise we won't be
able to create new files with signatures there. This is because some
of the artifacts are either created inside the SDK container (so the
created files belong to root outside the container) or are created
with `sudo`.
2022-06-03 14:59:38 +02:00
Krzesimir Nowak
0e0eb67ca2 ci-automation: Set up keys for signing
Not used for anything yet. This sets up a temporary GPGHOME directory
and a trap that will remove it after we are done.
2022-06-03 14:59:26 +02:00
Krzesimir Nowak
090d7ec176 ci-automation: Run functions in subshells
The functions are sourcing other files that define global variables,
so they will spill into the callers shell unnecessarily. We will also
add some functionality that uses traps in follow-up commits, so it's
good to limit the scope of traps too.
2022-06-03 14:58:29 +02:00
Kai Lueke
cee8a6aadf ci-automation: Push version file early
When a nightly build is started that pushes the version file to the
branch it was doing so only at the end of the build, causing the push
to fail if something else got merged in between.
Push the version file early by generating it the same way it would be
generated by the run_sdk_container/bootstrap_sdk_container scripts.
In the case of the SDK the version file gets the same version for the
OS and the SDK. Add some explanations about the version formats. Note
that the scripts will still rewrite the file but it should be a no-op.
2022-05-23 22:40:02 +09:00
Kai Lueke
95367851fa ci-automation/sdk_bootstrap.sh: Allow omitting the optional parameters
The coreos/portage refs were allowed to be empty strings but the way
the function was run from Groovy the lack of quoting caused the empty
strings to be missing parameters.
Since the two parameters are meant to be optional, support omitting
them.
2022-05-23 19:29:39 +09:00
Kai Lueke
bd970357c8 ci-automation: use a single git tag and skip nightlies with no changes
The pipeline created two tags if an SDK was built, one for the SDK and
one for the OS build (which was a free-standing tag or a local state
that was equivalent to the existing tag of the same name). The
nightlies created update commits on the main branch, even if no change
was done, and on the release branches we lacked these commits.

Create the release tag in the nightly SDK bootstrap already and reuse
it for the nightly OS build. Instead of local state, checkout the
existing tags explicitly. Extend the nightly update commit logic to
cover release branches and detect if we can skip building because no
changes were done.
2022-04-01 17:18:51 +02:00
Thilo Fromm
308a2a2ab6 ci-automation/sdk_bootstrap: check submodules for nightly branch push
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-24 12:06:28 +01:00
Thilo Fromm
82da911c27 ci-automation/sdk_bootstrap: Only push to main in nightlies
Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2022-02-24 11:02:34 +01:00
Thilo Fromm
7cadae957a ci-automation: SDK build updates version.txt in main branch
This change has sdk_bootstrap update the origin branch when run from the
main branch, updating the SDK and OS version in 'main' for each SDK
bootstrap build.

Release / maintenance branches have the SDK version set in the
versionfile at release time. But main is never updated.

Updating the versionfile in main when a new SDK is built ensures that
dev branches based on main will also use the correct SDK version (e.g.
in subsequent CI builds).
2022-02-23 20:41:57 +01:00
Thilo Fromm
1d1c6048d4 sdk-container: add @krnowak's suggestions from code review
Co-authored-by: Krzesimir Nowak <knowak@microsoft.com>
2021-11-26 17:54:43 +01:00
Thilo Fromm
9fba5789f9 ci-automation: simplified CI automation unsing containers
ci-automation builds on the SDK container and simplifies CI automation
build tasks (SDK bootstrap, SDK container, packages, image, VMs).

See ci-automation/README.md for a brief introduction.

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
2021-11-26 17:54:43 +01:00