Skip to content

Commit 2dd302e

Browse files
committed
Merge branch 'main' into DOCS-1006
2 parents 1e3eb8d + 85afe6d commit 2dd302e

File tree

1,456 files changed

+16314
-9390
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,456 files changed

+16314
-9390
lines changed

.clabot

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,11 @@
190190
"samiura",
191191
"naveenrama",
192192
"fguimond",
193-
"rmeyer-legato"
193+
"rmeyer-legato",
194+
"jagan2221",
195+
"pankaj101A",
196+
"prajalb",
197+
"dk-logic"
194198
],
195199
"message": "Thank you for your contribution! As this is an open source project, we require contributors to sign our Contributor License Agreement and do not have yours on file. To proceed with your PR, please [sign your name here](https://forms.gle/YgLddrckeJaCdZYA6) and we will add you to our approved list of contributors.",
196200
"label": "cla-signed",

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
/docs/send-data/opentelemetry-collector/ @SumoLogic/open-source-collection-team @kimsauce @jpipkin1 @mafsumo @JV0812 @amee-sumo
1414

1515
# GitHub workflow owners
16-
/.github/workflows/ @SumoLogic/open-source-collection-team @kimsauce
16+
/.github/workflows/ @kimsauce

.github/workflows/build_and_deploy.yml

Lines changed: 0 additions & 85 deletions
This file was deleted.

.github/workflows/delete-review.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/deploy-to-pantheon.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Build helpdocs site
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_call:
8+
9+
jobs:
10+
build-helpdocs-site:
11+
runs-on: ubuntu-latest
12+
environment:
13+
name: production
14+
url: https://www.sumologic.com/
15+
env:
16+
CI: true
17+
NODE_ENV: production
18+
NODE_OPTIONS: "--max-old-space-size=8192 --max-http-header-size=8192"
19+
HOSTNAME: https://www.sumologic.com
20+
BASE_URL: /help/
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- name: Set up Node.js
26+
uses: actions/setup-node@v3
27+
with:
28+
node-version: '20.x'
29+
cache: 'yarn'
30+
- name: Install dependencies
31+
run: yarn install --frozen-lockfile
32+
- name: Clean Docusaurus cache
33+
run: rm -rf .docusaurus build
34+
- name: Build the Docusaurus site
35+
run: |
36+
yarn build
37+
- name: Upload build artifact
38+
uses: actions/upload-artifact@v4
39+
id: artifact-upload-step
40+
with:
41+
name: build-output
42+
path: ./build/

.github/workflows/job_pantheon.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: Deploy to Pantheon
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
workflow_call:
8+
inputs:
9+
SITE_PATH:
10+
description: Destination filepath, must include trailing slash and no leading slash (default is empty string, or the / site root)
11+
default: ''
12+
type: string
13+
PANTHEON_SITE_ID:
14+
description: Human-readable site ID
15+
type: string
16+
required: true
17+
PANTHEON_STAGING_ENV_NAME:
18+
type: string
19+
default: "env-${{ github.sha }}"
20+
description: Name of the staging environment (11-char max)
21+
PANTHEON_DESTINATION:
22+
description: Target Pantheon environment, either 'dev' or 'staging'
23+
required: true
24+
type: string
25+
secrets:
26+
PANTHEON_SSH_KEY:
27+
required: true
28+
PANTHEON_KNOWN_HOSTS:
29+
required: true
30+
PANTHEON_USER_EMAIL:
31+
required: true
32+
PANTHEON_AUTH_USER:
33+
required: true
34+
PANTHEON_AUTH_PASSWORD:
35+
required: true
36+
PANTHEON_MACHINE_TOKEN:
37+
required: true
38+
39+
jobs:
40+
deploy-to-pantheon:
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
with:
45+
fetch-depth: 0
46+
- name: Install SSH key
47+
uses: shimataro/ssh-key-action@v2
48+
with:
49+
key: ${{ secrets.PANTHEON_SSH_KEY }}
50+
config: |
51+
Host *.drush.in
52+
StrictHostKeyChecking no
53+
known_hosts: ${{ secrets.PANTHEON_KNOWN_HOSTS }}
54+
- name: Setup PHP
55+
uses: shivammathur/setup-php@v2
56+
with:
57+
php-version: "8.2"
58+
- name: Install Terminus
59+
run: |
60+
sudo apt update
61+
sudo apt install -y curl php-common php-cli php-xml php-mbstring php-curl git jq
62+
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
63+
php -r "if (hash_file('sha384', 'composer-setup.php') === file_get_contents('https://composer.github.io/installer.sig')) { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }"
64+
php composer-setup.php
65+
php -r "unlink('composer-setup.php');"
66+
mv composer.phar /usr/local/bin/composer
67+
curl -L https://github.com/pantheon-systems/terminus/releases/download/4.0.3/terminus.phar --output terminus
68+
chmod +x terminus
69+
mv terminus /usr/local/bin/terminus
70+
terminus self:update
71+
git config -l | grep 'http\..*\.extraheader' | cut -d= -f1 | xargs -L1 git config --unset-all
72+
git config --global user.email "${{ secrets.PANTHEON_USER_EMAIL }}"
73+
git config --global user.name "GitHub workflow"
74+
echo "PANTHEON_BRANCH=master" >> $GITHUB_ENV
75+
echo "PANTHEON_ENV=dev" >> $GITHUB_ENV
76+
- name: Retrieve build artifact
77+
uses: actions/download-artifact@v5
78+
with:
79+
name: build-output
80+
path: ./build
81+
- name: Terminus login
82+
run: terminus auth:login --machine-token ${{ secrets.PANTHEON_MACHINE_TOKEN }}
83+
- name: Staging environment setup
84+
if: inputs.PANTHEON_DESTINATION == 'staging'
85+
run: |
86+
STAGING_NAME="${{ inputs.PANTHEON_STAGING_ENV_NAME }}"
87+
NORMLIZED_STAGING_ENV_NAME="${STAGING_NAME:0:11}"
88+
DEV_SITE_EXISTS="$(terminus env:list "${{ inputs.PANTHEON_SITE_ID }}" --format=list | grep "$NORMLIZED_STAGING_ENV_NAME" | wc -l | xargs)"
89+
if [ "$DEV_SITE_EXISTS" -eq "0" ]; then
90+
terminus multidev:create --no-interaction --no-ansi ${{ inputs.PANTHEON_SITE_ID }}.dev "$NORMLIZED_STAGING_ENV_NAME"
91+
terminus lock:enable ${{ inputs.PANTHEON_SITE_ID }}.$NORMLIZED_STAGING_ENV_NAME -- "${{ secrets.PANTHEON_AUTH_USER }}" "${{ secrets.PANTHEON_AUTH_PASSWORD }}"
92+
fi
93+
terminus connection:set "${{ inputs.PANTHEON_SITE_ID }}.$NORMLIZED_STAGING_ENV_NAME" git
94+
echo "PANTHEON_ENV=helpdocs" >> $GITHUB_ENV
95+
echo "PANTHEON_BRANCH=$NORMLIZED_STAGING_ENV_NAME" >> $GITHUB_ENV
96+
- name: Commit build and deploy to Pantheon repo
97+
run: |
98+
terminus local:clone --yes --branch="${{ env.PANTHEON_BRANCH }}" ${{ inputs.PANTHEON_SITE_ID }}
99+
rsync --archive ./build/ "$HOME/pantheon-local-copies/${{ inputs.PANTHEON_SITE_ID }}/${{ inputs.SITE_PATH }}"
100+
chmod -R 755 $HOME/pantheon-local-copies/${{ inputs.PANTHEON_SITE_ID }}/${{ inputs.SITE_PATH }}
101+
git -C "$HOME/pantheon-local-copies/${{ inputs.PANTHEON_SITE_ID }}" add .
102+
git -C "$HOME/pantheon-local-copies/${{ inputs.PANTHEON_SITE_ID }}" commit -m "Added content from ${{ github.repository }} at ${{ github.sha }}"
103+
WATCH_COMMIT=$(git -C "$HOME/pantheon-local-copies/${{ inputs.PANTHEON_SITE_ID }}" rev-parse --verify HEAD)
104+
git -C "$HOME/pantheon-local-copies/${{ inputs.PANTHEON_SITE_ID }}" push origin
105+
terminus workflow:wait --max 600 --commit $WATCH_COMMIT -- ${{ inputs.PANTHEON_SITE_ID }}.${{ env.PANTHEON_ENV }}
106+
- name: Terminus logout
107+
if: always()
108+
run: |
109+
rm -rf $HOME/pantheon-local-copies/${{ inputs.PANTHEON_SITE_ID }}/${{ inputs.SITE_PATH }}
110+
terminus auth:logout
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Slack notification
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
SLACK_MESSAGE:
7+
type: string
8+
required: true
9+
secrets:
10+
SLACK_URL:
11+
required: true
12+
13+
jobs:
14+
notify-channel:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a
18+
with:
19+
webhook: ${{ secrets.SLACK_URL }}
20+
webhook-type: incoming-webhook
21+
payload: |
22+
blocks:
23+
- type: "section"
24+
text:
25+
type: "mrkdwn"
26+
text: "${{ inputs.SLACK_MESSAGE }}"

0 commit comments

Comments
 (0)