Skip to content

Commit

Permalink
Merge branch 'staging' into CTOR-1116-update-en-version-an-add-a-fren…
Browse files Browse the repository at this point in the history
…ch-version-for-sc-datadog-metrics
  • Loading branch information
lucie-dubrunfaut authored Jan 21, 2025
2 parents cd39e81 + bde815a commit 082c03e
Show file tree
Hide file tree
Showing 1,779 changed files with 94,198 additions and 41,665 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Download actionlint
id: get_actionlint
Expand All @@ -39,7 +39,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Install Yaml
run: |
Expand Down
28 changes: 18 additions & 10 deletions .github/workflows/archive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,28 @@ concurrency:

jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
run_install: false

- name: Set up Node
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20
node-version: 22
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
uses: borales/actions-yarn@3766bb1335b98fb13c60eaf358fe20811b730a88 # v5.0.0
with:
cmd: install --frozen-lockfile
run: pnpm install --frozen-lockfile
shell: bash

- name: Redirect pp and cloud links to last documentation
run: |
Expand All @@ -34,10 +42,10 @@ jobs:
shell: bash

- name: Build documentation for ${{ github.event.inputs.version }}
run: ARCHIVED_VERSION="${{ github.event.inputs.version }}" yarn build
run: ARCHIVED_VERSION="${{ github.event.inputs.version }}" pnpm build

- name: Store build archived doc in cache
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-archived-doc"
Expand All @@ -47,7 +55,7 @@ jobs:
runs-on: [self-hosted, infra]
steps:
- name: Restore built archived doc from cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-archived-doc"
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/clean-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: clean-cache

on:
pull_request:
types:
- closed

jobs:
clean-cache:
runs-on: ubuntu-24.04
steps:
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Clean cache
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80 changes: 56 additions & 24 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Get changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
Expand Down Expand Up @@ -169,34 +169,60 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0

- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
with:
version: 9
run_install: false

- name: Set up Node
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20
cache: yarn
node-version: 22
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Install dependencies
uses: borales/actions-yarn@3766bb1335b98fb13c60eaf358fe20811b730a88 # v5.0.0
run: pnpm install --frozen-lockfile
shell: bash

- name: Restore docusaurus build from cache
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
cmd: install --frozen-lockfile
path: |
.docusaurus
build
key: docusaurus-build-${{ matrix.environment }}-${{ github.head_ref || github.ref_name }}
restore-keys: |
docusaurus-build-${{ matrix.environment }}-staging
- name: Build documentation
run: yarn build
run: pnpm build
env:
PP: ${{ matrix.pp }}
CLOUD: ${{ matrix.cloud }}
VERSIONS: ${{ matrix.environment == 'staging' && matrix.versions || matrix.next_version }}
BASE_URL: ${{ github.event_name == 'pull_request' && format('/previews/pr-{0}/{1}', github.event.pull_request.number, matrix.environment) || '' }}

- name: Store build in cache
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- name: Clear previous docker image from cache
run: |
curl \
-X DELETE \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
https://api.github.com/repos/centreon/centreon-documentation/actions/caches?key=docusaurus-build-${{ matrix.environment }}-${{ github.head_ref || github.ref_name }}
shell: bash

- name: Store docusaurus build cache in cache
uses: actions/cache/save@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-doc-${{ matrix.environment }}"
path: |
.docusaurus
build
key: docusaurus-build-${{ matrix.environment }}-${{ github.head_ref || github.ref_name }}

deploy-preview:
if: ${{ github.event_name == 'pull_request' }}
Expand All @@ -212,13 +238,15 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Restore build from cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-doc-${{ matrix.environment }}"
path: |
.docusaurus
build
key: docusaurus-build-${{ matrix.environment }}-${{ github.head_ref || github.ref_name }}
fail-on-cache-miss: true

- name: Setup awscli
Expand Down Expand Up @@ -292,13 +320,15 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Restore build from cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-doc-staging"
path: |
.docusaurus
build
key: docusaurus-build-staging-${{ github.head_ref || github.ref_name }}
fail-on-cache-miss: true

- name: Deploy to https://docs-staging.int.centreon.com
Expand All @@ -324,13 +354,15 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Restore build from cache
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
with:
path: "./build"
key: "${{ github.sha }}-${{ github.run_id }}-build-doc-next"
path: |
.docusaurus
build
key: docusaurus-build-next-${{ github.head_ref || github.ref_name }}
fail-on-cache-miss: true

- name: Setup awscli
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/set-pull-request-external-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: set-pull-request-external-label

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
pull_request_target:

jobs:
set-pull-request-external-label:
if: |
github.event.pull_request.head.repo.fork &&
! contains(github.event.pull_request.labels.*.name, 'external')
runs-on: ubuntu-24.04

steps:
- name: Set PR external label
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const label = 'external';
try {
await github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
labels: [label]
});
} catch (e) {
core.warning(`failed to add label ${label}: ${e}`);
}
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ let you know so that you can rebase it.

To understand how the documentation is structured, you may have a look to the
[Docusaurus project](https://docusaurus.io/).
We're using version 2.
We're using version 3.

### Pull request guidelines

Expand All @@ -57,17 +57,17 @@ set by the existing documentation.

## How to build the documentation locally

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
This website is built using [Docusaurus 3](https://docusaurus.io/), a modern static website generator.

### Which branch should I base my PRs on?

Use branch **staging**. We will merge the PR into production once it has gone through the validation process.

### Prerequisites

1. Install **yarn**. On Windows: https://classic.yarnpkg.com/latest.msi
1. Install [**pnpm** (version 9)]: https://pnpm.io/installation

2. Install **node.js** (version 14 minimum): https://nodejs.org/en/download/
2. Install **node.js** (version 18 minimum): https://nodejs.org/en/download/

3. Clone the repository :

Expand All @@ -85,28 +85,28 @@ Use branch **staging**. We will merge the PR into production once it has gone th
git checkout <name_of_branch>
```

4. Install dependencies:
5. Install dependencies:

```
yarn install --frozen-lockfile
pnpm install --frozen-lockfile
```

### Building the documentation website

* Build the EN or FR version of the site (faster)

* EN: ```yarn start```
* FR: ```yarn start --locale=fr```
* EN: ```pnpm start```
* FR: ```pnpm start --locale=fr```

The website opens in your browser at the following address: http://localhost:3000/. Most changes are reflected live without having to restart the server.

* If you really need to build the whole website, use the following command (but be aware it takes a long time to build):

```
yarn build
pnpm build
```

Then use the `npm run serve` command to open the website in your browser.
Then use the `pnpm run serve` command to open the website in your browser.

## Adding files to the table of contents

Expand Down
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

14 changes: 7 additions & 7 deletions cloud/alerts-notifications/notif-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ Resources are checked according to the following parameters:

| Macro | Description | Example |
| ----- | ----------- |-------- |
|{{NOTIFICATIONTYPE}}| **Recovery**, **Warning**, **Critical** or **Unknown** for a service; **Recovery**, **Down** or **Unreachable** for a host. | CRITICAL |
{{NAME}}| The name of the service or host. For a service, the name of the host it is attached to is also given. | central/proc-ntpd |
{{ID}}| An internal ID for the resource. This can be used for API calls. | 41:209 |
{{STATE}}| The [status](./concepts.md) that the resource has just entered. | CRITICAL |
{{SHORTDATETIME}}| Date and time in the following format: MM/DD/YY h:mm:ss | 10/18/23 12:20:42 |
{{LONGDATETIME}}| Date and time, including the day of the week. | Wednesday October 18, 2023, 12:20:42 |
{{OUTPUT}}| The output of the check command, i.e. the text that is displayed in the **Information** column in the **Resources status** page. | CRITICAL: Number of current processes running: 0 |
|\{\{NOTIFICATIONTYPE\}\}| **Recovery**, **Warning**, **Critical** or **Unknown** for a service; **Recovery**, **Down** or **Unreachable** for a host. | CRITICAL |
\{\{NAME\}\}| The name of the service or host. For a service, the name of the host it is attached to is also given. | central/proc-ntpd |
\{\{ID\}\}| An internal ID for the resource. This can be used for API calls. | 41:209 |
\{\{STATE\}\}| The [status](./concepts.md) that the resource has just entered. | CRITICAL |
\{\{SHORTDATETIME\}\}| Date and time in the following format: MM/DD/YY h:mm:ss | 10/18/23 12:20:42 |
\{\{LONGDATETIME\}\}| Date and time, including the day of the week. | Wednesday October 18, 2023, 12:20:42 |
\{\{OUTPUT\}\}| The output of the check command, i.e. the text that is displayed in the **Information** column in the **Resources status** page. | CRITICAL: Number of current processes running: 0 |

3. Click the **Save** button at the top right of the panel. The new notification rule appears in the list. You may have to wait up to 5 minutes before the rule starts being applied.
2 changes: 1 addition & 1 deletion cloud/alerts-notifications/resources-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ Graphs display metric evolution over a given period. This can be defined in the

- A selection of preconfigured periods is available in the graph header: Last Day, Last 7 Days, Last 31 Days
- Datetime pickers are available for Start and End points in time. Whenever the displayed period changes, this element is updated accordingly
- Using the side [<] and [>] buttons that appear upon hovering the graph's border, you can translate in time by half your current timespan (backward and forward in time, respectively)
- Using the side [\<] and [>] buttons that appear upon hovering the graph's border, you can translate in time by half your current timespan (backward and forward in time, respectively)
- Selecting a period of time within the graph will zoom in on this period

![image](../assets/alerts/resources-status/resources-status-graph-time-selection.gif)
Expand Down
Binary file modified cloud/assets/getting-started/infra3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 082c03e

Please sign in to comment.