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

Remove plugin from package #414

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
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
Loading