Skip to content

Commit

Permalink
Revert "[ci] Fix sonarqube scan (#189936)"
Browse files Browse the repository at this point in the history
This reverts commit c0b6ed5.
  • Loading branch information
jbudz committed Aug 6, 2024
1 parent 11f5c58 commit f587412
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 46 deletions.
35 changes: 0 additions & 35 deletions .buildkite/pipeline-resource-definitions/kibana-sonarqube.yml

This file was deleted.

1 change: 0 additions & 1 deletion .buildkite/pipeline-resource-definitions/locations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ spec:
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/security-solution-quality-gate/kibana-serverless-security-solution-quality-gate-rule-management.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/trigger-version-dependent-jobs.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-pointer-compression.yml
- https://github.com/elastic/kibana/blob/main/.buildkite/pipeline-resource-definitions/kibana-sonarqube.yml
12 changes: 5 additions & 7 deletions .buildkite/scripts/common/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ if [[ -d /opt/local-ssd/buildkite ]]; then
mkdir -p "$TMPDIR"
fi

if command -v jq >/dev/null 2>&1; then
KIBANA_PKG_BRANCH="$(jq -r .branch "$KIBANA_DIR/package.json")"
export KIBANA_PKG_BRANCH
export KIBANA_BASE_BRANCH="$KIBANA_PKG_BRANCH"
KIBANA_PKG_BRANCH="$(jq -r .branch "$KIBANA_DIR/package.json")"
export KIBANA_PKG_BRANCH
export KIBANA_BASE_BRANCH="$KIBANA_PKG_BRANCH"

KIBANA_PKG_VERSION="$(jq -r .version "$KIBANA_DIR/package.json")"
export KIBANA_PKG_VERSION
fi
KIBANA_PKG_VERSION="$(jq -r .version "$KIBANA_DIR/package.json")"
export KIBANA_PKG_VERSION

# Detects and exports the final target branch when using a merge queue
if [[ "${BUILDKITE_BRANCH:-}" == "gh-readonly-queue"* ]]; then
Expand Down
34 changes: 34 additions & 0 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,39 @@ spec:
lifecycle: production
system: control-plane

---
# yaml-language-server: $schema=https://gist.githubusercontent.com/elasticmachine/988b80dae436cafea07d9a4a460a011d/raw/rre.schema.json
apiVersion: backstage.io/v1alpha1
kind: Resource
metadata:
name: buildkite-pipeline-kibana-sonarqube
description: Run a SonarQube scan
links:
- title: Pipeline
url: https://buildkite.com/elastic/kibana-sonarqube
spec:
type: buildkite-pipeline
owner: group:kibana-operations
system: buildkite
implementation:
apiVersion: buildkite.elastic.dev/v1
kind: Pipeline
metadata:
name: kibana / sonarqube
spec:
repository: elastic/kibana
provider_settings:
trigger_mode: none
schedules:
daily:
branch: main
cronline: "@daily"
pipeline_file: ".buildkite/pipelines/sonarqube.yml"
teams:
kibana-operations:
access_level: MANAGE_BUILD_AND_READ
everyone:
access_level: READ_ONLY

# Please avoid creating new kibana pipelines in this file to avoid bloating.
# Instead, create a new file in the pipeline-resource-definitions directory, and wire it in through the locations.yml file.
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ export const initIpToHostName = ({ framework }: InfraBackendLibs) => {
}
const hostDoc = first(hits.hits)!;
return response.ok({ body: { host: hostDoc._source.host.name } });
} catch (error) {
} catch ({ statusCode = 500, message = 'Unknown error occurred' }) {
return response.customError({
statusCode: error.statusCode || 500,
body: { message: error.message || 'Unknown error occurred' },
statusCode,
body: { message },
});
}
}
Expand Down

0 comments on commit f587412

Please sign in to comment.