Skip to content

Commit a1605c2

Browse files
author
dixyushi
committed
Merge remote-tracking branch 'upstream/main' into main
2 parents 5c57a15 + 86d3363 commit a1605c2

34 files changed

Lines changed: 817 additions & 51 deletions

.github/actions/spelling/only.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Only process perl / JavaScript / Python files
2+
\.asciidoc$
3+
\.adoc$
4+
\.md$

.github/workflows/buildMain.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,35 @@ on:
55
branches: [ main ]
66

77
workflow_dispatch:
8+
inputs:
9+
logLevel:
10+
description: 'Log level'
11+
default: '--debug'
12+
813
jobs:
14+
setup-matrix:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout playbooks
18+
uses: actions/checkout@v2
19+
with:
20+
repository: devonfw-tutorials/tutorials
21+
path: playbooks
22+
- name: Setup matrix combinations
23+
id: setup-matrix-combinations
24+
run: |
25+
cd playbooks
26+
for dir in */; do MATRIX_PARAMS_COMBINATIONS=$MATRIX_PARAMS_COMBINATIONS'{"tutorial": "'${dir::-1}'"},'; done
27+
echo ::set-output name=matrix-combinations::{\"include\":[$MATRIX_PARAMS_COMBINATIONS]}
28+
outputs:
29+
matrix-combinations: ${{ steps.setup-matrix-combinations.outputs.matrix-combinations }}
30+
931
build_main:
1032
runs-on: ubuntu-latest
11-
33+
needs: setup-matrix
34+
strategy:
35+
fail-fast: false
36+
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix-combinations) }}
1237
steps:
1338
- name: Checkout tutorial-compiler
1439
uses: actions/checkout@v2
@@ -29,12 +54,13 @@ jobs:
2954
- name: npm install
3055
run: npm install
3156

32-
- name: run buildRun.sh
33-
run: sh buildRun.sh
57+
- name: run buildRun.sh ${{ github.event.inputs.logLevel }}
58+
run: sh buildRun.sh -p ${{ matrix.tutorial }} ${{ github.event.inputs.logLevel }}
3459

3560
- name: Repository dispatch
3661
uses: peter-evans/repository-dispatch@v1
3762
with:
3863
token: ${{ secrets.REPO_ACCESS_TOKEN }}
3964
repository: devonfw-tutorials/katacoda-scenarios
40-
event-type: dispatch-katacoda-scenarios
65+
event-type: dispatch-katacoda-scenarios
66+
client-payload: '{"tutorial": "${{ matrix.tutorial }}"}'

.github/workflows/buildPullRequest.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,37 @@
1-
name: CI
1+
name: CI-PR
22

33
on:
44
pull_request:
55
branches: [ main ]
66

77
workflow_dispatch:
88
jobs:
9+
setup-matrix:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout playbooks
13+
uses: actions/checkout@v2
14+
with:
15+
repository: devonfw-tutorials/tutorials
16+
path: playbooks
17+
- id: changedfiles
18+
uses: jitterbit/get-changed-files@v1
19+
- name: Setup matrix combinations
20+
id: setup-matrix-combinations
21+
run: |
22+
for changed_file in ${{ steps.changedfiles.outputs.all }}; do
23+
dir="$(echo $changed_file | cut -d/ -f1)"
24+
MATRIX_PARAMS_COMBINATIONS=$MATRIX_PARAMS_COMBINATIONS'{"tutorial": "'$dir'"},'
25+
done
26+
echo ::set-output name=matrix-combinations::{\"include\":[$MATRIX_PARAMS_COMBINATIONS]}
27+
outputs:
28+
matrix-combinations: ${{ steps.setup-matrix-combinations.outputs.matrix-combinations }}
29+
930
build_pullRequest:
1031
runs-on: ubuntu-latest
11-
32+
needs: setup-matrix
33+
strategy:
34+
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix-combinations) }}
1235
steps:
1336
- name: Checkout tutorial-compiler
1437
uses: actions/checkout@v2
@@ -30,4 +53,4 @@ jobs:
3053
run: npm install
3154

3255
- name: run buildRun.sh
33-
run: sh buildRun.sh
56+
run: sh buildRun.sh --user ${{ github.actor }} --branch ${{ github.event.pull_request.head.ref }} -p ${{ matrix.tutorial }}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Auto review tutorial description
2+
3+
on:
4+
pull_request_target:
5+
6+
workflow_dispatch:
7+
jobs:
8+
auto_review:
9+
runs-on: ubuntu-latest
10+
env:
11+
PR_NUMBER: ${{github.event.number}}
12+
13+
steps:
14+
- name: Checkout playbooks
15+
uses: actions/checkout@v2
16+
17+
- name: Checkout tutorial-compiler
18+
uses: actions/checkout@v2
19+
with:
20+
repository: devonfw-tutorials/tutorial-compiler
21+
path: tutorial-compiler
22+
23+
- name: Install node environment
24+
uses: actions/setup-node@v2-beta
25+
26+
- name: npm install
27+
run: npm install
28+
29+
- name: Check tutorial descriptions
30+
run: node autoReviewPullRequest.js
31+
32+
- name: Get message
33+
id: get_message
34+
run: |
35+
message=`cat message.txt`
36+
echo ${message}
37+
echo "::set-output name=message::$message"
38+
39+
- name: Request changes
40+
if: ${{ steps.get_message.outputs.message != '' }}
41+
uses: andrewmusgrave/automatic-pull-request-review@0.0.2
42+
with:
43+
repo-token: '${{ secrets.GITHUB_TOKEN }}'
44+
event: REQUEST_CHANGES
45+
body: ${{ steps.get_message.outputs.message }}
46+

.github/workflows/spell-check.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: SpellCheck
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
if: false
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
11+
- name: Check spelling
12+
uses: check-spelling/check-spelling@0.0.17-alpha
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Check PR Katacoda Syntax
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
workflow_dispatch:
8+
jobs:
9+
build_pullRequest:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout tutorial-compiler
14+
uses: actions/checkout@v2
15+
with:
16+
repository: devonfw-tutorials/tutorial-compiler
17+
18+
- name: Checkout playbooks
19+
uses: actions/checkout@v2
20+
with:
21+
repository: devonfw-tutorials/tutorials
22+
path: playbooks
23+
24+
- uses: actions/setup-node@v2-beta
25+
26+
- name: install TS
27+
run: npm install typescript
28+
29+
- name: npm install
30+
run: npm install
31+
32+
- name: run buildRun.sh --user ${{ github.actor }} --branch ${{ github.event.pull_request.head.ref }}
33+
run: sh buildRun.sh --user ${{ github.actor }} --branch ${{ github.event.pull_request.head.ref }} -e katacoda

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/node_modules/*

JumpTheQueue/index.asciidoc

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
= Tutorial for the Jump The Queue Application
1+
= Jump start an end-to-end devonfw sample application.
22
====
33
Jump The Queue is a small application based on the devonfw framework, which you can create yourself by following our simple step-by-step tutorial. By doing so, you will learn about the app development workflow and gain insight into the design of a professional business information system.
44
5+
## Prerequisites
6+
* User should have Java, Angular development experience
7+
8+
## Learning goals
9+
After completing this tutorial, you will have learned about a devonfw sample application Jump-The-Queue and its architecture.
10+
511
More information about Jump The Queue on https://github.com/devonfw/jump-the-queue
612
====
713

814
[step]
915
--
1016
restoreDevonfwIde(["java", "mvn", "node", "ng", "npm"])
1117
--
12-
13-
Make sure to install the devonfw IDE before executing the next steps. For this tutorial we have done it for you.
14-
Afterwards clone the Jump-The-Queue Repository.
18+
First, clone the Jump-The-Queue Repository.
1519
[step]
1620
--
1721
cloneRepository("", "https://github.com/devonfw/jump-the-queue.git")
@@ -34,7 +38,7 @@ npmInstall("jump-the-queue/angular")
3438
--
3539

3640
====
37-
Now build and run the Anguar Server.
41+
Now build and run the Angular Server.
3842
The following two steps are only needed in this tutorial. Normally you can simply execute "ng serve", open the https://localhost:4200/ and start using the app.
3943
In the next step you need to change the Base URL for the REST Services.
4044
[step]

README.adoc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
= devonfw Tutorials
2+
3+
Welcome to the devonfw repository for all devonfw assets. You can find all ready to use tutorials on https://katacoda.com/devonfw[Katacoda].
4+
5+
== How to Create Your Tutorial
6+
7+
Get to know how to write your first tutorial by running your first https://katacoda.com/devonfw/scenarios/tutorial-compiler[katacoda tutorial] on this topic! Additionally, You can find an detailed explanation as well in the wiki https://github.com/devonfw-tutorials/tutorials/wiki/Development[here].
8+
9+
An overview of the commands available for tutorial specification out of the box can be found in the https://github.com/devonfw-tutorials/tutorials/wiki/Functions[function reference].
10+
11+
You can view compiled pull requests on our https://katacoda.com/devonfw-dev[development Katacoda space].
12+
13+
== Adapting the Tutorial Generation Process
14+
15+
In this repository, you write tutorials that are executed by the https://github.com/devonfw-tutorials/tutorial-compiler[tutorial compiler]. The tutorial compiler ensures that the tutorials are automatically tested end-to-end. Out of the tutorial specification maintained in this repsitory, it generates multiple outputs like Katacoda tutorials, website step-by-step tutorial documentation and possibly more.
16+
17+
By adapting the https://github.com/devonfw-tutorials/tutorial-compiler[tutorial compiler], you could also create new commands, which can be cross-compiled to multiple output formats and which will implement its own e2e test execution and assertion.

README.md

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

0 commit comments

Comments
 (0)