Skip to content
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

Removing the WS-GUI-app #3277

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .expeditor/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ subscriptions:
- workload: habitat-sh/habitat:main_completed:project_promoted:habitat-sh/habitat:main:current:*
actions:
- bash:.expeditor/update_habitat.sh
- workload: buildkite_build_passed:chef/chef-workstation-app:main:release:*
actions:
- bash:.expeditor/update_chef-workstation-app_to_latest.sh
- workload: chef/chef-analyze:main_completed:pull_request_merged:chef/chef-analyze:main:*
actions:
- bash:.expeditor/update_chef-analyze_to_latest.sh
Expand Down
42 changes: 0 additions & 42 deletions .expeditor/update_chef-workstation-app_to_latest.sh

This file was deleted.

1 change: 0 additions & 1 deletion RELEASE_PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ Examine the [open PRs](https://github.com/chef/chef-workstation/pulls) on the Ch

Dependabot and Expeditor are configured to create PRs when dependent packages are updated. Those processes can sometimes fail or there may be a pending PR in a dependent package that should be merged. Check the following repos and ensure they have the desired PRs merged, released, and updated in Chef Workstation:

* [Chef Workstation App](https://github.com/chef/chef-workstation-app)
* [Chef CLI](https://github.com/chef/chef-cli)
* [Chef Analyze](https://github.com/chef/chef-analyze/)
* [Chef Infra Client](https://github.com/chef/chef/)
Expand Down
1 change: 0 additions & 1 deletion omnibus/config/projects/chef-workstation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
dependency "ruby-windows-system-libraries"
end

dependency "chef-workstation-app"
dependency "uninstall-scripts"
dependency "ruby-env-script"
dependency "ruby-cleanup"
Expand Down
68 changes: 0 additions & 68 deletions omnibus/config/software/chef-workstation-app.rb

This file was deleted.

3 changes: 0 additions & 3 deletions omnibus/files/uninstall-scripts/uninstall_chef_workstation
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ if is_darwin; then
echo "This uninstaller will remove Chef Workstation."
sudo /bin/sh -s <<'EOF'
echo "Uninstalling Chef Workstation..."
echo " -> Removing Chef Workstation App..."
/opt/chef-workstation/bin/chef_workstation_app_launcher remove
echo " -> Removing files..."
sudo rm -rf '/opt/chef-workstation'
sudo rm -rf '/Applications/Chef Workstation App.app'
echo " -> Removing .plist for server"
sudo rm -rf '~/Library/LaunchAgents/io.chef.chef-workstation.plist'
echo " -> Removing binary links in /usr/local/bin..."
Expand Down
6 changes: 0 additions & 6 deletions omnibus/omnibus-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,5 @@ fi
# echo "--- Ensure that 'chef-automate-collect' cli is available"
# chef exec chef-automate-collect -h

# Verify that the chef-workstation-app was installed (MacOS only)
if is_darwin; then
echo "--- Verifying that chef-workstation-app exist in /Applications directory"
test -d "/Applications/Chef Workstation App.app"
fi

echo "--- Run Workstation verification suite"
/opt/chef-workstation/embedded/bin/ruby omnibus/verification/run.rb
65 changes: 0 additions & 65 deletions omnibus/package-scripts/chef-workstation/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -80,71 +80,6 @@ for binary in $binaries; do
ln -sf "$INSTALLER_DIR/bin/$binary" $PREFIX/bin || error_exit "Cannot link $binary to $PREFIX/bin"
done

if is_darwin; then

# this will be removed when we bring back the workstation-gui changes back
FILE="$HOME/Library/LaunchAgents/io.chef.chef-workstation.plist"
if [ -f "$FILE" ]; then
sudo -u $USER launchctl unload $HOME/Library/LaunchAgents/io.chef.chef-workstation.plist
sudo rm -rf $HOME/Library/LaunchAgents/io.chef.chef-workstation.plist
sudo rm -rf $INSTALLER_DIR/service.txt
sudo rm -rf $INSTALLER_DIR/embedded/service
fi

# the app launcher comes from the chef-workstation-app repo, here we are just using
# it to start the app as a service on MacOS systems, it will start at boot
app_launcher=chef_workstation_app_launcher

# Close the app if it is running.
if [ $(osascript -e 'application "Chef Workstation App" is running') = 'true' ]; then
echo "Closing Chef Workstation App..."
osascript -e 'quit app "Chef Workstation App"' > /dev/null 2>&1;
fi
# chef-workstation-app is configured to build Mac as a zip file instead
# of a directory. Otherwise, the mac pkgbuild command will find the Chef Workstation App
# within the larger Chef Workstation package, and will not include it in the Chef Workstation
# package directly.
echo "Moving Chef Workstation App to the Applications folder"
pushd "$INSTALLER_DIR/components/chef-workstation-app"
# https://github.com/electron-userland/electron-builder/issues/3779
# https://github.com/electron-userland/electron-builder/issues/4299#issuecomment-544997415
ditto -x -k -V chef-workstation-app-mac.zip ./
sudo rm -rf "/Applications/Chef Workstation App.app"
sudo mv "Chef Workstation App.app" /Applications/
cp "/Applications/Chef Workstation App.app/Contents/Resources/assets/scripts/$app_launcher" $INSTALLER_DIR/bin/. || error_exit "Cannot copy $app_launcher to $INSTALLER_DIR/bin"
rm -rf "$INSTALLER_DIR/components"
popd

ln -sf $INSTALLER_DIR/bin/uninstall_chef_workstation $PREFIX/bin || error_exit "Cannot link uninstall_chef_workstation to $PREFIX/bin"

echo "Setting Chef Workstation App to run at boot..."
su "$USER" $INSTALLER_DIR/bin/$app_launcher load

echo "Launching Chef Workstation App..."
osascript -e 'open app "Chef Workstation App"' > /dev/null 2>&1;
else # linux - postinst does not run for windows.
cwa_app_path="$INSTALLER_DIR/components/chef-workstation-app/chef-workstation-app"
ldd "$cwa_app_path" | grep "not found" >/dev/null 2>&1
# 0 rc means grep found 'not found' text - and we have missing deps.
if [ $? -eq 0 ]; then
echo ""
echo "Chef Workstation ships with a toolbar application, the Chef Workstation App."
echo "To run this application some additional dependencies must be installed."
echo "Using your platform's package manager to install the 'electron' package is "
echo "the easiest way to meet the dependency requirements."
echo ""
echo "You can then launch the App by running 'chef-workstation-app'."
echo "The App will then be available in the system tray."
else
echo ""
echo "The Chef Workstation App is available."
echo ""
echo "Launch the App by running 'chef-workstation-app'."
echo "The App will then be available in the system tray."
fi
ln -sf $cwa_app_path $PREFIX/bin
fi

echo ""
echo "Thank you for installing Chef Workstation!"
echo "You can find some tips on getting started at https://docs.chef.io/workstation/getting_started/"
Expand Down
2 changes: 1 addition & 1 deletion omnibus/package-scripts/chef-workstation/postrm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cleanup_symlinks() {
# Keep removed symlinks in this list, so that removal of upgraded packages still cleans up
# leftovers from older versions. We keep the push jobs values here to cleanup old releases
workstation_binaries="berks chef chef-cli chef-apply chef-shell chef-solo chef-vault cookstyle dco delivery foodcritic inspec kitchen knife ohai push-apply pushy-client pushy-service-manager chef-client mixlib-install chef-zero fauxhai"
binaries="chef-run chef-workstation-app $workstation_binaries chef-analyze hab"
binaries="chef-run $workstation_binaries chef-analyze hab"

for binary in $binaries; do
rm -f "$PREFIX/bin/$binary"
Expand Down
41 changes: 0 additions & 41 deletions omnibus/resources/chef-workstation/msi/source.wxs.erb
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,6 @@
<Binary Id="CustomActionFastMsiDLL"
SourceFile="CustomActionFastMsi.CA.dll" />

<Property Id="WixQuietExecCmdLine" Value='"[WindowsFolder]\System32\taskkill.exe" /T /F /IM "Chef Workstation App*"' />

<Property Id="WixShellExecTarget" Value="[WSAPPDIR]\Chef Workstation App.exe" />
<CustomAction Id="LaunchApplication"
BinaryKey="WixCA"
DllEntry="WixShellExec"
Impersonate="yes" />

<CustomAction Id="TaskKill"
BinaryKey="WixCA"
DllEntry="WixQuietExec"
Expand Down Expand Up @@ -170,10 +162,6 @@
<RegistryKey Root="HKCR" Key="CLSID\{9008CA83-83E4-41FF-9C07-696E2CC47B52}\Implemented Categories\{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}" />
</Component>
</Directory>
<Directory Id="COMPONENTS" Name="components">
<Directory Id="WSAPPDIR" Name="chef-workstation-app">
</Directory>
</Directory>
<Directory Id="EMBEDDED" Name="embedded" >
<Directory Id="EMBEDDEDBIN" Name="bin" >
<Component Id="ChefWSEnvHacks" Guid="{3498A65D-33D8-4CF2-BAB8-6FA072A7070D}" >
Expand All @@ -197,27 +185,9 @@
Show="minimized"
Icon="cwsps.ico"/>
</Component>
<Component Id="ChefWSAppStartMenuShortcut" Guid="{6CFD92E5-B45F-48F2-AC17-54B647D65E66}">
<Shortcut Id="ChefWSAppStartMenuShortcutDef"
Name="!(loc.ChefWSAppShortcutName)"
Description="!(loc.ChefWSAppShortcutDesc)"
Target="[WSAPPDIR]\Chef Workstation App.exe"
Icon="cws.ico"/>
</Component>
</Directory>
</Directory>

<!-- This component puts the WS App in the common autostart folder [if the Feature is selected] -->
<Directory Id="WIX_DIR_COMMON_ALTSTARTUP" >
<Component Id="ChefWSAppAutostartShortcut" Guid="{DF9613D2-4BCA-4D81-8BFA-989070EF1633}">
<Shortcut Id="ChefAppWSAutostartShortcutDef"
Name="!(loc.ChefWSAppShortcutName)"
Description="!(loc.ChefWSAppShortcutDesc)"
Target="[WSAPPDIR]\Chef Workstation App.exe"
Icon="cws.ico"/>
</Component>
</Directory>

<Directory Id="DesktopFolder" Name="Desktop">
<Component Id="PowershellDesktopShortcut" Guid="{396E22A6-A7B6-4AA1-B63C-83A3DD7007A8}">
<Shortcut Id="PowershellDesktopShortcutDef"
Expand All @@ -237,7 +207,6 @@
[x] Start Menu Shortcut
[x] Desktop Shortcut
[ ] Environment Customizations
[x] Chef Workstation App
[x] Start at login
-->
<Feature Id="ChefWSFeature" Title="!(loc.FeatureMainName)"
Expand All @@ -263,15 +232,6 @@
</Feature>
</Feature>

<Feature Id="ChefWSApp" Title="!(loc.FeatureChefWSApp)" Description="!(loc.FeatureChefWSAppDesc)"
Level="1" AllowAdvertise="no">
<ComponentRef Id="ChefWSAppStartMenuShortcut" />
<Feature Id="ChefWSAppAutostartFeature" Title="!(loc.FeatureChefWSAppAutostart)"
Description="!(loc.FeatureChefWSAppAutostartDesc)" Level="1" AllowAdvertise="no" >
<ComponentRef Id="ChefWSAppAutostartShortcut" />
</Feature>
</Feature>

<!--
UI Stuff
-->
Expand All @@ -282,7 +242,6 @@
<Property Id="ARPPRODUCTICON" Value="cws16.ico" />
<Property Id="ARPHELPLINK" Value="https://community.chef.io/tools/chef-workstation/" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="!(loc.LaunchChefWSApp)" />
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1"/>

<!-- Use our custom UI sequence which is based on WixUI_FeatureTree - the default WIX installer UI that includes a feature tree
Expand Down
Loading