Add support and docs to release updates to swiftDialog (#32882)
For #32869.
This commit is contained in:
+15
-5
@@ -248,16 +248,26 @@ VERSION=5.19.0 \
|
||||
|
||||
#### Releasing `swiftDialog` to `stable`
|
||||
|
||||
> `releaser.sh` doesn't support `swiftDialog` yet.
|
||||
> macOS only component
|
||||
|
||||
The `swiftDialog` executable can be generated from a macOS host by running:
|
||||
1. Download `swiftDialog` from the desired run of https://github.com/fleetdm/fleet/actions/workflows/generate-swift-dialog-targets.yml.
|
||||
2. Extract the downloaded `.zip` to `/path/to/swiftDialog.app.tar.gz`
|
||||
3. Push to staging:
|
||||
```sh
|
||||
make swift-dialog-app-tar-gz version=2.2.1 build=4591 out-path=.
|
||||
TUF_DIRECTORY=/Users/foobar/updates-staging.fleetdm.com \
|
||||
ACTION=release-swiftDialog-to-stable \
|
||||
VERSION=2.5.6 \
|
||||
KEYS_SOURCE_DIRECTORY=/Volumes/FLEET-UPD/keys \
|
||||
TARGETS_PASSPHRASE_1PASSWORD_PATH="Private/UPDATES TARGETS/password" \
|
||||
SNAPSHOT_PASSPHRASE_1PASSWORD_PATH="Private/UPDATES SNAPSHOT/password" \
|
||||
TIMESTAMP_PASSPHRASE_1PASSWORD_PATH="Private/UPDATES TIMESTAMP/password" \
|
||||
SWIFT_DIALOG_PATH=/path/to/swiftDialog.app.tar.gz \
|
||||
./tools/tuf/releaser.sh
|
||||
```
|
||||
4. Push to production:
|
||||
```sh
|
||||
fleetctl updates add --target /path/to/macos/swiftDialog.app.tar.gz --platform macos --name swiftDialog --version 2.2.1 -t edge
|
||||
```
|
||||
ACTION=release-to-production ./tools/tuf/releaser.sh
|
||||
```
|
||||
|
||||
#### Releasing `nudge` to `stable`
|
||||
|
||||
|
||||
+26
-1
@@ -53,7 +53,7 @@ setup () {
|
||||
# Passphrases need to be exported for use by `fleetctl updates` commands.
|
||||
#
|
||||
|
||||
if [[ $ACTION == "release-to-edge" ]] || [[ $ACTION == "promote-edge-to-stable" ]]; then
|
||||
if [[ $ACTION == "release-to-edge" ]] || [[ $ACTION == "promote-edge-to-stable" ]] || [[ $ACTION == "release-swiftDialog-to-stable" ]]; then
|
||||
FLEET_TARGETS_PASSPHRASE=$(op read "op://$TARGETS_PASSPHRASE_1PASSWORD_PATH")
|
||||
export FLEET_TARGETS_PASSPHRASE
|
||||
FLEET_SNAPSHOT_PASSPHRASE=$(op read "op://$SNAPSHOT_PASSPHRASE_1PASSWORD_PATH")
|
||||
@@ -340,6 +340,8 @@ print_reminder () {
|
||||
:
|
||||
elif [[ $ACTION == "update-osquery-schema" ]]; then
|
||||
:
|
||||
elif [[ $ACTION == "release-swiftDialog-to-stable" ]]; then
|
||||
prompt "We don't have/use edge channel for swiftDialog, so (currently) we can only release to stable."
|
||||
else
|
||||
echo "Unsupported action: $ACTION"
|
||||
exit 1
|
||||
@@ -352,6 +354,12 @@ fleetctl_version_check () {
|
||||
prompt "Make sure the fleetctl executable and version are correct."
|
||||
}
|
||||
|
||||
release_swiftDialog_to_stable () {
|
||||
pushd "$TUF_DIRECTORY"
|
||||
"$GIT_REPOSITORY_DIRECTORY/build/fleetctl" updates add --target "$SWIFT_DIALOG_PATH" --platform macos --name swiftDialog --version "$VERSION" -t stable
|
||||
popd
|
||||
}
|
||||
|
||||
print_reminder
|
||||
|
||||
if [[ $ACTION == "release-to-edge" ]]; then
|
||||
@@ -368,6 +376,23 @@ elif [[ $ACTION == "promote-edge-to-stable" ]]; then
|
||||
pull_from_staging
|
||||
promote_edge_to_stable
|
||||
push_to_staging
|
||||
elif [[ $ACTION == "release-swiftDialog-to-stable" ]]; then
|
||||
if [[ -z $SWIFT_DIALOG_PATH ]]; then
|
||||
echo "Missing $SWIFT_DIALOG_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "$SWIFT_DIALOG_PATH" ]; then
|
||||
echo "Path SWIFT_DIALOG_PATH='$SWIFT_DIALOG_PATH' does not exist or is not accessible."
|
||||
fi
|
||||
prompt "Using $SWIFT_DIALOG_PATH"
|
||||
|
||||
trap clean_up EXIT
|
||||
setup
|
||||
fleetctl_version_check
|
||||
pull_from_staging
|
||||
release_swiftDialog_to_stable
|
||||
push_to_staging
|
||||
elif [[ $ACTION == "update-timestamp" ]]; then
|
||||
trap clean_up EXIT
|
||||
setup
|
||||
|
||||
Reference in New Issue
Block a user