Skip to content

Commit 6946f78

Browse files
committed
Merge branch 'main' into mobile-view-optimization
2 parents ba83453 + 92bb6c5 commit 6946f78

File tree

1,580 files changed

+19321
-9718
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,580 files changed

+19321
-9718
lines changed

.clabot

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,14 @@
187187
"Apoorvkudesia-sumologic",
188188
"ntanwar-sumo",
189189
"aj-sumo",
190-
"samiura"
190+
"samiura",
191+
"naveenrama",
192+
"fguimond",
193+
"rmeyer-legato",
194+
"jagan2221",
195+
"pankaj101A",
196+
"prajalb",
197+
"dk-logic"
191198
],
192199
"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.",
193200
"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: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,14 @@ jobs:
5353
with:
5454
node-version: '20.x'
5555
cache: 'yarn'
56-
- name: Docusaurus Webpack cache
57-
uses: actions/cache@v3
58-
with:
59-
path: node_modules/.cache
60-
key: ${{ runner.os }}-webpack-cache-${{ hashFiles('yarn.lock') }}
6156
- name: Install awscli
6257
uses: unfor19/install-aws-cli-action@v1
6358
- name: Install jq
6459
run: sudo apt-get install -y jq
6560
- name: Install dependencies
6661
run: yarn install --frozen-lockfile
62+
- name: Clean Docusaurus cache
63+
run: rm -rf .docusaurus build
6764
- name: Build the Docusaurus site
6865
run: yarn build
6966
- name: Deploy the Docusaurus site

.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 }}"
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Trigger Jenkins pipeline
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
JENKINS_TRIGGER_SOURCE:
7+
default: "${{ github.event_name }} on ${{ github.ref_name }} in ${{ github.repository }} at ${{ github.sha }}"
8+
type: string
9+
secrets:
10+
WEBOPS_AWS_REGION:
11+
required: true
12+
WEBOPS_AWS_SG_NAME:
13+
required: true
14+
WEBOPS_JENKINS_PORT:
15+
required: true
16+
WEBOPS_JENKINS_HOST:
17+
required: true
18+
WEBOPS_AWS_ACCESS_KEY:
19+
required: true
20+
WEBOPS_AWS_SECRET_KEY:
21+
required: true
22+
WEBOPS_WEBHOOK_TOKEN:
23+
required: true
24+
25+
jobs:
26+
trigger-jenkins-pipeline:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Get runner IP
30+
if: always()
31+
id: ip
32+
uses: haythem/[email protected]
33+
- name: Add runner to AWS security group ingress
34+
env:
35+
AWS_ACCESS_KEY_ID: ${{ secrets.WEBOPS_AWS_ACCESS_KEY }}
36+
AWS_SECRET_ACCESS_KEY: ${{ secrets.WEBOPS_AWS_SECRET_KEY }}
37+
AWS_DEFAULT_REGION: ${{ secrets.WEBOPS_AWS_REGION }}
38+
run: aws ec2 authorize-security-group-ingress --group-name ${{ secrets.WEBOPS_AWS_SG_NAME }} --protocol tcp --port ${{ secrets.WEBOPS_JENKINS_PORT }} --cidr ${{ steps.ip.outputs.ipv4 }}/32
39+
- name: Trigger Jenkins pipeline
40+
run: |
41+
curl -H 'Content-Type: application/json' \
42+
-d '{ "TRIGGER_SOURCE": "${{ inputs.JENKINS_TRIGGER_SOURCE }}" }' \
43+
-X POST \
44+
${{ secrets.WEBOPS_JENKINS_HOST }}:${{ secrets.WEBOPS_JENKINS_PORT || '80' }}/generic-webhook-trigger/invoke?token=${{ secrets.WEBOPS_WEBHOOK_TOKEN }}
45+
- name: Remove runner from AWS security group ingress
46+
env:
47+
AWS_ACCESS_KEY_ID: ${{ secrets.WEBOPS_AWS_ACCESS_KEY }}
48+
AWS_SECRET_ACCESS_KEY: ${{ secrets.WEBOPS_AWS_SECRET_KEY }}
49+
AWS_DEFAULT_REGION: ${{ secrets.WEBOPS_AWS_REGION }}
50+
if: always()
51+
run: aws ec2 revoke-security-group-ingress --group-name ${{ secrets.WEBOPS_AWS_SG_NAME }} --protocol tcp --port ${{ secrets.WEBOPS_JENKINS_PORT }} --cidr ${{ steps.ip.outputs.ipv4 }}/32

0 commit comments

Comments
 (0)