Skip to content

Commit a0695f0

Browse files
committed
Fixes on migration_test.sh
1 parent b29a5af commit a0695f0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

tools/tuf/test/migration/migration_test.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ rm -rf "$OLD_TUF_PATH"
6767
rm -rf "$NEW_TUF_PATH"
6868
pkill file-server || true
6969

70-
echo "Restoring update_channels for \"No team\" to 'sstable' defaults..."
70+
echo "Restoring update_channels for \"No team\" to 'stable' defaults..."
7171
cat << EOF > upgrade.yml
7272
---
7373
apiVersion: v1
@@ -371,7 +371,7 @@ echo "Installing fleetd package on macOS..."
371371
sudo installer -pkg fleet-osquery.pkg -verbose -target /
372372

373373
CURRENT_DIR=$(pwd)
374-
prompt "Please install $CURRENT_DIR/fleet-osquery.msi and $CURRENT_DIR/fleet-osquery_${OLD_FULL_VERSION}_amd64.deb."
374+
prompt "Please install $CURRENT_DIR/fleet-osquery.msi and $CURRENT_DIR/fleet-osquery_${NEW_FULL_VERSION}_amd64.deb."
375375

376376
echo "Waiting until installation and auto-update to new repository happens..."
377377
for host_hostname in "${hostnames[@]}"; do
@@ -456,6 +456,13 @@ done
456456

457457

458458
echo "Building fleetd packages using new repository and new fleetctl version..."
459+
460+
CGO_ENABLED=0 go build \
461+
-o ./build/fleetctl \
462+
-ldflags="-X github.com/fleetdm/fleet/v4/orbit/pkg/update.defaultRootMetadata=$ROOT_KEYS2 \
463+
-X github.com/fleetdm/fleet/v4/orbit/pkg/update.DefaultURL=$NEW_TUF_URL" \
464+
./cmd/fleetctl
465+
459466
for pkgType in "${pkgTypes[@]}"; do
460467
./build/fleetctl package --type="$pkgType" \
461468
--enable-scripts \
@@ -464,8 +471,6 @@ for pkgType in "${pkgTypes[@]}"; do
464471
--enroll-secret="$NO_TEAM_ENROLL_SECRET" \
465472
--fleet-certificate=./tools/osquery/fleet.crt \
466473
--debug \
467-
--update-roots="$ROOT_KEYS2" \
468-
--update-url=$NEW_TUF_URL \
469474
--disable-open-folder \
470475
--disable-keystore \
471476
--update-interval=30s

0 commit comments

Comments
 (0)