-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create and upload a deb repository to staging automatically #5240
Create and upload a deb repository to staging automatically #5240
Conversation
DES-360 Update artifact upload script to upload to apt update servers
With hand holding from infra (Victor), update the The steps to prepare and upload a release for APT supposedly goes something like this according to Victor:
Debian-howto from Victor:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r2.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @faern)
ci/buildserver-config.sh
line 6 at r2 (raw file):
# the scripts where they are used. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
This will override the SCRIPT_DIR
in buildserver-build.sh
since this is running in the same scope. They are running from the same location so it doesn't really make a difference though. Removing this line would make this script use the SCRIPT_DIR
from the script sourcing this one which is a bit cleaner IMO but it would still cause trouble if they were located in different directories.
ci/buildserver-config.sh
line 9 at r2 (raw file):
# Which gpg key to sign things with export CODE_SIGNING_KEY_FINGERPRINT="A1198702FC3E0A09A9AE5B75D5A1D4F266DE8DDF"
Is there a benefit of exporting these variables? Since this file is sourced it runs under the same scope and they would be available when not exported as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @raksooo)
ci/buildserver-config.sh
line 9 at r2 (raw file):
Previously, raksooo (Oskar Nyberg) wrote…
Is there a benefit of exporting these variables? Since this file is sourced it runs under the same scope and they would be available when not exported as well.
We do in env.sh
. I'm 100% sure I tried this and it did not export when sourcing and not using export
. Dammit. I do not want. :bash: 🔨
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @raksooo)
ci/buildserver-config.sh
line 6 at r2 (raw file):
Previously, raksooo (Oskar Nyberg) wrote…
This will override the
SCRIPT_DIR
inbuildserver-build.sh
since this is running in the same scope. They are running from the same location so it doesn't really make a difference though. Removing this line would make this script use theSCRIPT_DIR
from the script sourcing this one which is a bit cleaner IMO but it would still cause trouble if they were located in different directories.
I do not think this script should rely on someone else before it to set SCRIPT_DIR
. So how do I compute some intermediate variables I need here without exporting them?
c0cc078
to
0936bbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 3 of 4 files reviewed, 2 unresolved discussions (waiting on @raksooo)
ci/buildserver-config.sh
line 9 at r2 (raw file):
Previously, faern (Linus Färnstrand) wrote…
We do in
env.sh
. I'm 100% sure I tried this and it did not export when sourcing and not usingexport
. Dammit. I do not want. :bash: 🔨
I do think we need to export
them. Otherwise the values would not propagate to subshells. Something I think we might need even if I don't have a case in front of me right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion
ci/buildserver-config.sh
line 9 at r2 (raw file):
Previously, faern (Linus Färnstrand) wrote…
I do think we need to
export
them. Otherwise the values would not propagate to subshells. Something I think we might need even if I don't have a case in front of me right now.
You're right!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 3 of 4 files reviewed, 1 unresolved discussion (waiting on @faern)
ci/buildserver-config.sh
line 6 at r2 (raw file):
Previously, faern (Linus Färnstrand) wrote…
I do not think this script should rely on someone else before it to set
SCRIPT_DIR
. So how do I compute some intermediate variables I need here without exporting them?
Maybe we should just use SCRIPT_DIR
and let it override the parents SCRIPT_DIR
. As you said that's what we do in env.sh
and maybe it's not worth the time now to figure this out.
0936bbf
to
39c8076
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r4.
Reviewable status: complete! all files reviewed, all discussions resolved
0a7b665
to
63188f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @faern)
-- commits
line 4 at r5:
Should builds
be buildserver
or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @raksooo)
Previously, raksooo (Oskar Nyberg) wrote…
Should
builds
bebuildserver
or something?
It's a bit strangely formulated maybe, but it's not a typo. It means "build an apt repository when performing app builds and store locally on the build server.
"on builds" means "when performing app builds" in this case.
Suggestion for improvement? Also, just commit message, so not very important
ci/buildserver-config.sh
line 6 at r2 (raw file):
Previously, raksooo (Oskar Nyberg) wrote…
Maybe we should just use
SCRIPT_DIR
and let it override the parentsSCRIPT_DIR
. As you said that's what we do inenv.sh
and maybe it's not worth the time now to figure this out.
Fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
Previously, faern (Linus Färnstrand) wrote…
It's a bit strangely formulated maybe, but it's not a typo. It means "build an apt repository when performing app builds and store locally on the build server.
"on builds" means "when performing app builds" in this case.
Suggestion for improvement? Also, just commit message, so not very important
Ah okay, my brain had a difficult time parsing that. But not that important as you said 👍
Build an apt/deb repository on builds and store locally on the build server. Also push it to development infra instantly. Push to staging if it's a release. And store locally for manual push to production later
63188f5
to
32d182b
Compare
Add to
buildserver-build.sh
so that it upon finishing building a release (stable or beta) do the following:deb/$app_version
where the just built artifacts are added to/deb/beta
and if it's a stable release also to/deb/stable
.The prepared repo is kept locally. So once this has been tested to work the person doing the release can publish it to production with the help of
publish-linux-repositories.sh
.This change is