Skip to content

Commit 0ee34c1

Browse files
authored
Merge branch 'master' into wyllie-unify-temp
2 parents ceaa041 + 98f073e commit 0ee34c1

File tree

1,243 files changed

+153
-149831
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,243 files changed

+153
-149831
lines changed

.github/build/Makefile-show-help.mk

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,35 @@
11
.DEFAULT_GOAL := show-help
22
# See <https://gist.github.com/klmr/575726c7e05d8780505a> for explanation.
3+
# Modified to support multi-line comments and preserve target order
34
.PHONY: show-help
45
show-help:
5-
@echo "$$(tput bold)Please specify a build target. The choices are:$$(tput sgr0)";echo;sed -ne"/^## /{h;s/.*//;:d" -e"H;n;s/^## //;td" -e"s/:.*//;G;s/\\n## /---/;s/\\n/ /g;p;}" ${MAKEFILE_LIST}|LC_ALL='C' sort -f|awk -F --- -v n=$$(tput cols) -v i=19 -v a="$$(tput setaf 6)" -v z="$$(tput sgr0)" '{printf"%s%*s%s ",a,-i,$$1,z;m=split($$2,w," ");l=n-i;for(j=1;j<=m;j++){l-=length(w[j])+1;if(l<= 0){l=n-i-length(w[j])-1;printf"\n%*s ",-i," ";}printf"%s ",w[j];}printf"\n";}'|more $(shell test $(shell uname) == Darwin && echo '-Xr')
6+
@echo "$$(tput bold)Please specify a build target. The choices are:$$(tput sgr0)";echo; \
7+
awk ' \
8+
/^##/ { \
9+
gsub(/^## ?/, ""); \
10+
if (buffer == "") buffer = $$0; \
11+
else buffer = buffer " " $$0; \
12+
next; \
13+
} \
14+
/^[a-zA-Z_-]+:/ && $$0 !~ /:=/ && $$0 !~ /^\\./ { \
15+
split($$0, parts, ":"); \
16+
target = parts[1]; \
17+
if (target != "" && target !~ /^\./ && !(target in seen)) { \
18+
if (buffer != "") { \
19+
targets[++count] = target; \
20+
comments[target] = buffer; \
21+
seen[target] = 1; \
22+
} \
23+
buffer = ""; \
24+
} \
25+
} \
26+
!/^##/ && !/^[a-zA-Z_-]+:/ { \
27+
buffer = ""; \
28+
} \
29+
END { \
30+
for (i = 1; i <= count; i++) { \
31+
target = targets[i]; \
32+
comment = comments[target]; \
33+
printf "\033[36m%-19s\033[0m %s\n", target, comment; \
34+
} \
35+
}' ${MAKEFILE_LIST}

.github/build/Makefile.core.mk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ EXOSCALE_DEV="https://dev-sks.exoscale.com"
5454
#-----------------------------------------------------------------------------
5555
# Server
5656
#-----------------------------------------------------------------------------
57-
MESHERY_K8S_SKIP_COMP_GEN ?= TRUE
58-
APPLICATIONCONFIGPATH="./apps.json"
59-
PORT:=9081
57+
PORT:=1313
6058

6159
#-----------------------------------------------------------------------------
6260
# Build

.github/workflows/build-and-release.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,25 +50,25 @@ jobs:
5050
fi
5151
5252
echo "✅ Found module for orgId '$ORG_ID': $MODULE"
53-
make update-module module="$MODULE" version="$VERSION"
53+
make theme-update module="$MODULE" version="$VERSION"
5454
5555
- name: Install dependencies
56-
run: make academy-setup
56+
run: make setup
5757

5858
- name: Build Academy
59-
run: make academy-prod
59+
run: make prod-build
6060

61-
- name: Pull changes from self master
62-
run: git pull origin master
61+
# - name: Pull changes from self master
62+
# run: git pull origin master
6363

64-
- uses: stefanzweifel/git-auto-commit-action@v5
65-
with:
66-
commit_message: Build Academy
67-
commit_options: '--signoff'
68-
branch: master
69-
commit_user_name: l5io
70-
commit_user_email: [email protected]
71-
commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
64+
# - uses: stefanzweifel/git-auto-commit-action@v5
65+
# with:
66+
# commit_message: Build Academy
67+
# commit_options: '--signoff'
68+
# branch: master
69+
# commit_user_name: l5io
70+
# commit_user_email: [email protected]
71+
# commit_author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
7272

7373
- name: Checkout meshery-cloud repo
7474
uses: actions/checkout@v4

.github/workflows/slack.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
11
name: Slack Notify
2-
on:
2+
3+
on:
34
watch:
45
types: [started]
6+
issues:
7+
types: [labeled]
8+
59
jobs:
610
star-notify:
711
if: github.event_name == 'watch'
812
name: Notify Slack on star
913
runs-on: ubuntu-latest
1014
steps:
11-
- name: Get current star count
12-
run: |
13-
echo "STARS=$(curl --silent 'https://api.github.com/repos/${{github.repository}}' -H 'Accept: application/vnd.github.preview' | jq '.stargazers_count')" >> $GITHUB_ENV
14-
- name: Notify slack
15-
env:
16-
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
17-
uses: pullreminders/slack-action@master
18-
with:
19-
args: '{\"channel\":\"CSK7N9TGX\",\"text\":\"${{ github.actor }} just starred ${{github.repository}}! (https://github.com/${{github.repository}}/stargazers) Total ⭐️: ${{env.STARS}}\"}'
15+
- name: Get current star count
16+
run: |
17+
echo "STARS=$(curl --silent 'https://api.github.com/repos/${{ github.repository }}' -H 'Accept: application/vnd.github.preview' | jq '.stargazers_count')" >> $GITHUB_ENV
18+
- name: Notify Slack
19+
env:
20+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
21+
uses: pullreminders/slack-action@master
22+
with:
23+
args: '{\"channel\":\"CSK7N9TGX\",\"text\":\"${{ github.actor }} just starred ${{ github.repository }}! (https://github.com/${{ github.repository }}/stargazers) Total ⭐️: ${{ env.STARS }}\"}'
24+
2025
good-first-issue-notify:
21-
if: github.event_name == 'issues' && github.event.label.name == 'good first issue' || github.event.label.name == 'first-timers-only'
26+
if: github.event_name == 'issues' && (github.event.label.name == 'good first issue' || github.event.label.name == 'first-timers-only')
2227
name: Notify Slack for new good-first-issue
2328
runs-on: ubuntu-latest
2429
steps:
25-
- name: Notify slack
30+
- name: Notify Slack
2631
env:
2732
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
2833
uses: pullreminders/slack-action@master
2934
with:
30-
args: '{\"channel\":\"C019426UBNY\",\"text\":\"A good first issue label was just added to ${{github.event.issue.html_url}}.\"}'
35+
args: '{\"channel\":\"C019426UBNY\",\"type\":\"section\",\"text\":\":new: Good first issue up for grabs: ${{ github.event.issue.title }} - ${{ github.event.issue.html_url }} \"}'
36+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ node_modules/
2626
# Output of sitemap generation
2727
/ui/public/sitemap.xml
2828
node_modules/
29+
public/
2930
.hugo_build.lock

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ RUN hugo version && go version && node -v && npm -v
1919
COPY . .
2020

2121
# Build Academy pages
22-
RUN make academy-setup
23-
RUN make academy-prod
22+
RUN make setup
23+
RUN make prod-build

Makefile

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,39 +18,51 @@ include .github/build/Makefile-show-help.mk
1818
#----------------------------------------------------------------------------
1919
# Academy
2020
# ---------------------------------------------------------------------------
21-
.PHONY: academy-setup academy-dev academy-staging academy-prod update-module
21+
.PHONY: setup build stg-build prod-build theme-update sync-with-cloud site
2222

23-
## Install site dependencies
24-
academy-setup:
23+
## ------------------------------------------------------------
24+
----LOCAL_BUILDS: Show help for available targets
25+
26+
## Local: Install site dependencies
27+
setup:
2528
npm i
2629

27-
## Build site using Layer5 Cloud as the baseURL
28-
academy-prod:
29-
hugo --cleanDestinationDir --gc --minify --baseURL "https://cloud.layer5.io/academy"
30+
## Local: Build site for local consumption
31+
build:
32+
hugo build
33+
34+
## Local: Build and run site locally with draft and future content enabled.
35+
site: check-go
36+
hugo server -D -F
37+
38+
## ------------------------------------------------------------
39+
----REMOTE_BUILDS: Show help for available targets
3040

3141
## Build site using Layer5 Cloud Staging as the baseURL
32-
academy-staging:
42+
stg-build:
3343
hugo --cleanDestinationDir --gc --minify --baseURL "https://staging-cloud.layer5.io/academy"
3444

35-
## Build site for local consumption
36-
academy-dev:
37-
hugo build
45+
## Build site using Layer5 Cloud as the baseURL
46+
prod-build:
47+
hugo --cleanDestinationDir --gc --minify --baseURL "https://cloud.layer5.io/academy"
48+
49+
50+
## ------------------------------------------------------------
51+
----MAINTENANCE: Show help for available targets
52+
53+
check-go:
54+
@echo "Checking if Go is installed..."
55+
@command -v go > /dev/null || (echo "Go is not installed. Please install it before proceeding."; exit 1)
56+
@echo "Go is installed."
57+
58+
## Update the academy-theme package to latest version
59+
theme-update:
60+
echo "Updating to latest academy-theme..." && \
61+
hugo mod get github.com/layer5io/academy-theme
3862

39-
## Build and run site locally
40-
academy-dev-live:
41-
hugo serve
42-
43-
## Upgrade site's theme to latest version
44-
## Change to "theme-upgrade"
45-
update-module:
46-
@if [ -z "$(module)" ] || [ -z "$(version)" ]; then \
47-
echo "Usage: make update-module module=<module-path> version=<version>"; \
48-
exit 1; \
49-
fi && \
50-
echo "Updating Hugo module: $(module) to version $(version)" && \
51-
hugo mod get $(module)@$(version)
52-
53-
## Publish Academy build to Layer5 Cloud
63+
## Publish Academy build to Layer5 Cloud.
64+
## Copy built site from public/ to
65+
## ../meshery-cloud/academy directory
5466
sync-with-cloud:
5567
rm -rf ../meshery-cloud/academy
5668
mkdir -p ../meshery-cloud/academy

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Always store the `token` input as a GitHub secret and **never hardcode it** in y
8181

8282
## 🧑‍💻 Maintained by [Layer5](https://layer5.io)
8383

84-
💬 If you encounter issues or want to contribute, please open an issue or pull request at [github.com/layer5io/actions](https://github.com/layer5io/academy-build).
84+
💬 If you encounter issues or want to contribute, please open an issue or pull request at [github.com/layer5io/academy-build](https://github.com/layer5io/academy-build).
8585

8686
---
8787

@@ -90,7 +90,7 @@ Always store the `token` input as a GitHub secret and **never hardcode it** in y
9090
To use this action from the [GitHub Marketplace](https://github.com/marketplace/actions), reference it like:
9191

9292
```
93-
uses: layer5io/academy-build@v1
93+
uses: layer5io/academy-build@master
9494
```
9595

9696
> Supports [composite run steps](https://docs.github.com/en/actions/creating-actions/creating-a-composite-action) – no runtime required.

content/challenges/_index.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
---
2-
title: Learning Paths
3-
description: Learn about the various learning paths available in the Layer5 ecosystem.
4-
linkTitle: Learning Paths.
5-
# tells hugo that this section is of type learning-path ( to use appropiate templates )
6-
type: learning-paths
7-
cascade: # tells hugo to set this as default type for all children content in this section
8-
type: learning-paths
2+
title: Challenges
3+
description: "Explore the challenges in Layer5 Academy. Each challenge is designed to help you learn and practice your skills in a hands-on way."
4+
linkTitle: Challenges
5+
type: challenge
6+
cascade:
7+
type: challenge
98
---
109

1110
{{% pageinfo %}}
1211

13-
### Learning Paths
12+
### Challenges
1413

1514
{{% /pageinfo %}}

content/learning-paths/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title: Learning Paths
33
description: Learn about the various learning paths available in the Layer5 ecosystem.
44
linkTitle: Learning Paths
55
# tells hugo that this section is of type learning-path ( to use appropiate templates )
6-
type: learning-paths
6+
type: learning-path
77
cascade: # tells hugo to set this as default type for all children content in this section
8-
type: learning-paths
8+
type: learning-path
99
---
1010

1111
{{% pageinfo %}}

0 commit comments

Comments
 (0)