-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathbuild-testcase-workflow-merge-queue-demo
More file actions
executable file
·61 lines (42 loc) · 2.04 KB
/
build-testcase-workflow-merge-queue-demo
File metadata and controls
executable file
·61 lines (42 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Create a repository and setup a simple workflow
# Prior to running this, make any needed modifications to test-data/workflow-simple.yml_
# that are needed for the testcase.
# The "as delivered" version of workflow-simple.yml_ will trigger the workflow
# with dispatch event
#
normal=$(tput sgr0)
highlight=$(tput setaf 2)
yellow=$(tput setaf 3)
printf "$highlight"
cat << EOF
________ ____
/_ __/ /_ ___ / __ \____ _ _____ _____
/ / / __ \/ _ \ / /_/ / __ \ | /| / / _ \/ ___/
/ / / / / / __/ / ____/ /_/ / |/ |/ / __/ /
/_/ /_/ /_/\___/ /_/ \____/|__/|__/\___/_/
==================================================
$0
==================================================
EOF
printf "${normal}"
printf "${highlight} - Creating repo: ${normal}"
./create-repo.sh | jq -r '.name'
printf "${highlight} - Creating webhook: ${normal}"
./create-webhook.sh | jq -r '.id'
printf "${highlight} - Creating docs/README.md: ${normal}"
./create-commit-readme.sh | jq -r ".content.html_url"
printf "${highlight} - Creating new_branch: ${normal}"
./create-branch-newbranch.sh | jq -r '.url'
# order is important here the workflow file must be created
printf "${highlight} - Committing workflow file: ${normal}"
./create-commit-workflow-merge-queue-demo.sh | jq -r '.content.path'
printf "${highlight} - Creating repository branch ruleset: ${normal}"
./create-a-repository-ruleset-branch-pattern-merge-queue.sh | jq -r '.name'
printf "${highlight} - Creating a commit on the new branch: ${normal}"
./create-commit-on-new-branch.sh | jq -r ".content.html_url"
printf "${highlight} - Creating an update commit to docs/README.md: ${normal}"
./create-commit-update-readme.sh | jq -r ".content.html_url"
printf "${highlight} - Creating an issue: ${normal}"
./create-repo-issue.sh | jq -r '.html_url'
printf "${highlight} - Creating a pull request: ${normal}"
./create-pull-request.sh | jq -r '.html_url'