-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #373 from freedomofpress/bookworm-or-bust
Remove buster, add failing bookworm jobs
- Loading branch information
Showing
14 changed files
with
166 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ common-steps: | |
run: | ||
name: Build debian package | ||
command: | | ||
source /etc/os-release | ||
export VERSION_CODENAME=$(~/project/scripts/codename) | ||
export PKG_PATH=~/packaging/$PKG_NAME/ | ||
export PKG_VERSION=$VERSION_TO_BUILD | ||
make $PKG_NAME | ||
|
@@ -91,7 +91,7 @@ common-steps: | |
run: | ||
name: Get metapackage version via changelog for the current platform | ||
command: | | ||
source /etc/os-release | ||
export VERSION_CODENAME=$(~/project/scripts/codename) | ||
CURRENT_VERSION=$(grep -oP "\d+\.\d+\.\d+" ${PKG_NAME}/debian/changelog-${VERSION_CODENAME} | head -n1) | ||
export VERSION_TO_BUILD="$CURRENT_VERSION" | ||
# Enable access to this env var in subsequent run steps | ||
|
@@ -104,22 +104,25 @@ common-steps: | |
name: Commit workstation debs for deployment to apt-test.freedom.press | ||
command: | | ||
apt-get update | ||
apt-get install -y ca-certificates git git-lfs openssh-client | ||
apt-get install -y ca-certificates git git-lfs openssh-client python3 | ||
git clone [email protected]:freedomofpress/securedrop-dev-packages-lfs.git | ||
cd securedrop-dev-packages-lfs | ||
git config user.email "[email protected]" | ||
git config user.name "sdcibot" | ||
for codename in buster bullseye | ||
do | ||
# Copy built debian packages to the relevant workstation repo and git push. | ||
mkdir -p ./workstation/${codename}-nightlies/ | ||
cp /tmp/workspace/${codename}/*.deb ./workstation/${codename}-nightlies/ | ||
git add workstation/${codename}-nightlies/*.deb | ||
git commit -m "Automated SecureDrop workstation build (${codename})" | ||
done | ||
# Copy built debian packages to the relevant workstation repo and git push. | ||
mkdir -p ./workstation/${CODENAME}-nightlies/ | ||
cp /tmp/workspace/${CODENAME}/*.deb ./workstation/${CODENAME}-nightlies/ ||: | ||
git add workstation/${CODENAME}-nightlies/*.deb ||: | ||
# Clean up old nightlies too | ||
~/project/scripts/clean-old-nightlies.py workstation/${CODENAME}-nightlies | ||
# If there are changes, diff-index will fail, so we commit and push | ||
git diff-index --quiet HEAD || git commit -m "Automated SecureDrop workstation build (${CODENAME})" | ||
git push origin main | ||
version: 2.1 | ||
|
@@ -205,38 +208,8 @@ jobs: | |
# If there are changes, diff-index will fail, so we commit and push | ||
git diff-index --quiet HEAD || git commit -m "Automatically updating Tor packages" && git push origin main | ||
clean-old-nightlies: | ||
docker: | ||
- image: debian:bullseye | ||
steps: | ||
- checkout | ||
- *addsshkeys | ||
- run: | ||
name: clone and delete old nightlies | ||
command: | | ||
apt-get update | ||
apt-get install -y python3 ca-certificates git git-lfs openssh-client | ||
# Clone the dev repo and configure it | ||
ssh-keyscan github.com >> ~/.ssh/known_hosts | ||
git clone [email protected]:freedomofpress/securedrop-dev-packages-lfs.git | ||
cd securedrop-dev-packages-lfs | ||
git lfs install | ||
git config user.email "[email protected]" | ||
git config user.name "sdcibot" | ||
# Run the clean script and `git add` any deletions | ||
cd .. | ||
./scripts/clean-old-nightlies.py securedrop-dev-packages-lfs/workstation/buster-nightlies | ||
./scripts/clean-old-nightlies.py securedrop-dev-packages-lfs/workstation/bullseye-nightlies | ||
cd securedrop-dev-packages-lfs | ||
git add . | ||
# If there are changes, diff-index will fail, so we commit and push | ||
git diff-index --quiet HEAD || git commit -m "Deleting old nightlies" && git push origin main | ||
build: | ||
build: &build | ||
parameters: | ||
package: | ||
type: string | ||
|
@@ -260,7 +233,9 @@ jobs: | |
- *builddebianpackage | ||
- *persist | ||
|
||
build-metapackage: | ||
build2: *build | ||
|
||
build-metapackage: &build-metapackage | ||
parameters: | ||
package: | ||
type: string | ||
|
@@ -282,9 +257,11 @@ jobs: | |
- *builddebianpackage | ||
- *persist | ||
|
||
build-buster-securedrop-workstation-grsec: | ||
build2-metapackage: *build-metapackage | ||
|
||
build-bookworm-securedrop-workstation-grsec: | ||
docker: | ||
- image: debian:buster | ||
- image: debian:bookworm | ||
environment: | ||
PKG_NAME: securedrop-workstation-grsec | ||
steps: | ||
|
@@ -304,16 +281,22 @@ jobs: | |
- *setmetapackageversionplatform | ||
- *builddebianpackage | ||
|
||
push-packages: | ||
push-bullseye: &push | ||
docker: | ||
- image: debian:bullseye | ||
environment: | ||
CODENAME: bullseye | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: /tmp/workspace | ||
- *addsshkeys | ||
- *commitworkstationdebs | ||
|
||
push-bookworm: | ||
<<: *push | ||
environment: | ||
CODENAME: bookworm | ||
|
||
workflows: | ||
build-packages: | ||
|
@@ -324,26 +307,26 @@ workflows: | |
- build: | ||
matrix: | ||
parameters: | ||
package: | ||
package: &packages | ||
- securedrop-client | ||
- securedrop-export | ||
- securedrop-log | ||
- securedrop-proxy | ||
image: | ||
- "buster" | ||
- "bullseye" | ||
- bullseye | ||
- bookworm | ||
- build-metapackage: | ||
matrix: | ||
parameters: | ||
package: | ||
package: &metapackages | ||
- securedrop-keyring | ||
- securedrop-workstation-config | ||
- securedrop-workstation-viewer | ||
image: | ||
- "buster" | ||
- "bullseye" | ||
- build-buster-securedrop-workstation-grsec | ||
- bullseye | ||
- bookworm | ||
- build-bullseye-securedrop-workstation-grsec | ||
- build-bookworm-securedrop-workstation-grsec | ||
|
||
nightly: | ||
triggers: | ||
|
@@ -354,38 +337,47 @@ workflows: | |
only: | ||
- main | ||
jobs: | ||
# We need bullseye packages to be pushed if bookworm jobs fail. | ||
# So bookworm jobs run in a separate track ("build2") that is identical, | ||
# except the push-bullseye job only depends on the bullseye jobs and the | ||
# final step is push-bookworm, which might fail. | ||
- reprepro-update-tor | ||
- build: | ||
matrix: | ||
parameters: | ||
package: | ||
- securedrop-client | ||
- securedrop-export | ||
- securedrop-log | ||
- securedrop-proxy | ||
package: *packages | ||
image: | ||
- bullseye | ||
nightly: ["nightly"] | ||
- build2: | ||
matrix: | ||
parameters: | ||
package: *packages | ||
image: | ||
- "buster" | ||
- "bullseye" | ||
- bookworm | ||
nightly: ["nightly"] | ||
- build-metapackage: | ||
matrix: | ||
parameters: | ||
package: | ||
- securedrop-keyring | ||
- securedrop-workstation-config | ||
- securedrop-workstation-viewer | ||
package: *metapackages | ||
image: | ||
- "buster" | ||
- "bullseye" | ||
- bullseye | ||
nightly: ["nightly"] | ||
- push-packages: | ||
- build2-metapackage: | ||
matrix: | ||
parameters: | ||
package: *metapackages | ||
image: | ||
- bookworm | ||
nightly: ["nightly"] | ||
- push-bullseye: | ||
requires: | ||
- reprepro-update-tor | ||
- build | ||
- build-metapackage | ||
- reprepro-update-tor: | ||
# This should be last as we do expect it to fail occasionally. | ||
- push-bookworm: | ||
requires: | ||
# Wait for push to finish | ||
- push-packages | ||
- clean-old-nightlies: | ||
requires: | ||
# Wait for tor update to finish | ||
- reprepro-update-tor | ||
- push-bullseye | ||
- build2 | ||
- build2-metapackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## Checklist | ||
|
||
* [ ] `bullseye` builds and jobs are passing | ||
* [ ] This PR does not introduce any new `bookworm` test failures | ||
* [ ] If there are `bookworm` test failures, an issue has been filed for them |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
-----BEGIN PGP SIGNATURE----- | ||
|
||
iQI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BYkkDDebkq | ||
3drWksitMYct0k9m5Uq2XEWQIh2w56F7+9Fu5InD9UFtNAGBij4cJ+bEXtQLC97F | ||
9in/rhtAGgdvv19gV91obOeCjBDEeriUJAuekFs06gQoXN1RLmMoDc+yIoxpJwbH | ||
QYDzMFTCQpDxDgvnZotYHyMWIea05xKLKIsetq/GLvai4/ez3TKY/OvFEQ02gjEd | ||
aUksq7qSao4c08aNV5zJJRYtO1ttw0xYqEzXTL/ZzTWQexocXC7dUIDiwmz7/yh4 | ||
ktWyMWWdBq5euPVKMvMVo4Z9GXQv8P9Sw5QYRBFuxt+H1+yGTvSGp5BsXJhSPExq | ||
mPT82lZnJnb4LkdHgdUA0VzLAj7frKXbfXhn0ErQuBFj64865a0u4gD33qpAM7Pr | ||
j7RzMwsSexC47SfqCnU5eFegaFYOpHVr9Q99gkwLfqmPWMZ7LX4P7hIfQBSpuJ2g | ||
5iBJBuKpkYUIMMOo+IyclT/UP/h/bNuWZXklr7GWLZ59pky12w== | ||
=H9G5 | ||
-----END PGP SIGNATURE----- |
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
# Returns the Debian version's codename (e.g. "bullseye") in a way that should | ||
# work across both released versions and unreleased ones. | ||
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1008735 | ||
|
||
source /etc/os-release | ||
|
||
if [[ "$VERSION_CODENAME" != "" ]]; then | ||
echo $VERSION_CODENAME | ||
else | ||
# PRETTY_NAME="Debian GNU/Linux bookworm/sid" | ||
# Use awk to split on spaces and / | ||
echo $PRETTY_NAME | awk '{split($0, a, "[ /]"); print a[4]}' | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.