Skip to content

Commit

Permalink
Remove plugin from package
Browse files Browse the repository at this point in the history
  • Loading branch information
Tostti committed Nov 14, 2024
1 parent da9a183 commit b488fca
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 27 deletions.
35 changes: 12 additions & 23 deletions .github/workflows/build_wazuh_dashboard_with_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ on:
required: true
default: false
upload:
description: "Upload ?"
description: 'Upload ?'
type: boolean
default: true
checksum:
Expand Down Expand Up @@ -126,21 +126,21 @@ jobs:
- name: Get SHA of wazuh-dashboard-plugins
id: get-plugins-sha
run: |
git clone -b ${{ inputs.reference_wazuh_plugins }} --single-branch https://github.com/wazuh/wazuh-dashboard-plugins.git wzdp
cd wzdp
echo "WAZUH_PLUGINS_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
git clone -b ${{ inputs.reference_wazuh_plugins }} --single-branch https://github.com/wazuh/wazuh-dashboard-plugins.git wzdp
cd wzdp
echo "WAZUH_PLUGINS_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Get SHA of wazuh-security-dashboards-plugin
id: get-security-sha
run: |
git clone -b ${{ inputs.reference_security_plugins }} --single-branch https://github.com/wazuh/wazuh-security-dashboards-plugin.git wzsp
cd wzsp
echo "WAZUH_SECURITY_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
git clone -b ${{ inputs.reference_security_plugins }} --single-branch https://github.com/wazuh/wazuh-security-dashboards-plugin.git wzsp
cd wzsp
echo "WAZUH_SECURITY_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Get SHA of wazuh-dashboards-reporting
id: get-reporting-sha
run: |
git clone -b ${{ inputs.reference_report_plugins }} --single-branch https://github.com/wazuh/wazuh-dashboards-reporting.git wzrp
cd wzrp
echo "WAZUH_REPORTING_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
git clone -b ${{ inputs.reference_report_plugins }} --single-branch https://github.com/wazuh/wazuh-dashboards-reporting.git wzrp
cd wzrp
echo "WAZUH_REPORTING_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Setup variables
id: setup-variables
Expand Down Expand Up @@ -219,18 +219,6 @@ jobs:
aws-secret-access-key: ${{ secrets.CI_INTERNAL_DEVELOPMENT_BUCKET_USER_SECRET_KEY }}
aws-region: ${{ secrets.CI_AWS_REGION }}

- name: Verify if package is already built
run: |
set +e
echo "Verifying package"
PACKAGE_NAME=${{ needs.setup-variables.outputs.FINAL_NAME }}
exists=$(aws s3 ls s3://packages-dev.internal.wazuh.com/development/wazuh/5.x/main/packages/$PACKAGE_NAME)
if [ -n "$exists" ]; then
echo "Package already exists"
exit 1
fi
set -e
build-base:
needs: [validate-job]
name: Build dashboard
Expand Down Expand Up @@ -260,7 +248,8 @@ jobs:
with:
reference: ${{ inputs.reference_report_plugins }}
build-and-test-package:
needs: [setup-variables, build-main-plugins, build-base, build-security-plugin, build-report-plugin]
needs:
[setup-variables, build-main-plugins, build-base, build-security-plugin, build-report-plugin]
runs-on: ${{ (inputs.architecture == 'arm64' || inputs.architecture == 'aarch64') && 'wz-linux-arm64' || 'ubuntu-22.04' }}
name: Generate packages
steps:
Expand Down
1 change: 1 addition & 0 deletions dev-tools/build-packages/deb/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ configure)
runuser "${NAME}" --shell="/bin/bash" --command="echo kibanaserver | ${INSTALLATION_DIR}/bin/opensearch-dashboards-keystore add opensearch.username --stdin" >/dev/null 2>&1
runuser "${NAME}" --shell="/bin/bash" --command="echo kibanaserver | ${INSTALLATION_DIR}/bin/opensearch-dashboards-keystore add opensearch.password --stdin" >/dev/null 2>&1
fi
/usr/share/wazuh-dashboard/bin/opensearch-dashboards-plugin remove wazuh --allow-root >/dev/null 2>&1
;;

abort-upgrade | abort-remove | abort-deconfigure) ;;
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/build-packages/rpm/wazuh-dashboard.spec
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ if [ -f %{INSTALL_DIR}/wazuh-dashboard.restart ]; then
fi

fi

/usr/share/wazuh-dashboard/bin/opensearch-dashboards-plugin remove wazuh --allow-root

# -----------------------------------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion src/core/public/chrome/chrome_service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export class ChromeService {
forceAppSwitcherNavigation$={navLinks.getForceAppSwitcherNavigation$()}
helpExtension$={helpExtension$.pipe(takeUntil(this.stop$))}
helpSupportUrl$={helpSupportUrl$.pipe(takeUntil(this.stop$))}
homeHref={application.getUrlForApp('wz-home')}
homeHref={application.getUrlForApp('home')}
isVisible$={this.isVisible$}
headerVariant$={this.headerVariant$}
opensearchDashboardsVersion={injectedMetadata.getWazuhVersion()}
Expand Down
2 changes: 1 addition & 1 deletion src/core/public/chrome/ui/header/header_logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function onClick(
event.stopPropagation();
}
} else {
navigateToApp('wz-home');
navigateToApp('home');
event.preventDefault();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/public/chrome/ui/header/home_loader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function onClick(
event.stopPropagation();
}
} else {
navigateToApp('wz-home');
navigateToApp('home');
event.preventDefault();
}
}
Expand Down

0 comments on commit b488fca

Please sign in to comment.