Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/dops 1651/enable fork build #2046

Merged
merged 132 commits into from
Apr 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
e6e4148
Add new workflow for forks
safinsaf Mar 29, 2022
f495cda
Move to self-hosted runners
safinsaf Mar 29, 2022
18ae787
Move to self-hosted runners
safinsaf Mar 29, 2022
e68dfd7
Add deploy steps
safinsaf Mar 29, 2022
a4e5fd2
Build all
safinsaf Mar 30, 2022
428d54f
Run only one workflow
safinsaf Mar 31, 2022
3151ce6
Run only one workflow
safinsaf Mar 31, 2022
2ada7e5
Skip not-needed jobs
safinsaf Mar 31, 2022
bf80b98
Add comments to new checks
safinsaf Mar 31, 2022
6dddb4e
Make the new step first
safinsaf Mar 31, 2022
47bec5d
Do not allow to change iroha-builder Dockerfile
safinsaf Mar 31, 2022
bd674d4
Do not allow to change iroha Dockerfile
safinsaf Mar 31, 2022
9cc0702
Debug iroha workflow not running
safinsaf Mar 31, 2022
e6dc321
Debug iroha workflow not running
safinsaf Mar 31, 2022
52a7f78
Show all changed files
safinsaf Apr 1, 2022
192d688
Fetch history of commits for diff
safinsaf Apr 1, 2022
6d3a129
Try checkout base for mode
safinsaf Apr 1, 2022
fbb6f13
Try checkout v3 on head for diff
safinsaf Apr 1, 2022
d082ccb
Allow use fork point
safinsaf Apr 1, 2022
b999162
Find fork point
safinsaf Apr 1, 2022
0c942c0
Find fork point
safinsaf Apr 1, 2022
2b5ec58
Fix finding ancestor
safinsaf Apr 4, 2022
2728461
Try to remove variable in setting new origin
safinsaf Apr 5, 2022
6901d37
Fix finding ancestor
safinsaf Apr 5, 2022
df87345
Fix output
safinsaf Apr 5, 2022
081348e
Try fix base origin
safinsaf Apr 5, 2022
0ea5baf
Try fix base origin
safinsaf Apr 5, 2022
534c28d
Try fix base origin
safinsaf Apr 5, 2022
752306c
Try fix base origin
safinsaf Apr 5, 2022
38636e3
Try fix base origin
safinsaf Apr 5, 2022
0c318a0
Try fix base origin
safinsaf Apr 5, 2022
6a9001e
Use export for setting output
safinsaf Apr 6, 2022
2b3a8fe
Try saving to file
safinsaf Apr 6, 2022
a420054
Try saving to file
safinsaf Apr 6, 2022
1fcbe98
Try saving to file
safinsaf Apr 6, 2022
8576887
Try saving to file
safinsaf Apr 6, 2022
d2aff0d
Try saving to file
safinsaf Apr 6, 2022
160a675
Try saving to file
safinsaf Apr 6, 2022
fbec820
Debug using hardcoded values
safinsaf Apr 6, 2022
21dca13
Debug using hardcoded values
safinsaf Apr 6, 2022
3461e24
Debug using hardcoded values
safinsaf Apr 6, 2022
190ae0a
Debug using hardcoded values
safinsaf Apr 6, 2022
541f0a5
Debug using hardcoded values
safinsaf Apr 6, 2022
332afdb
Try other action
safinsaf Apr 6, 2022
0d373c4
Try other action
safinsaf Apr 6, 2022
782f853
Try other action
safinsaf Apr 6, 2022
6fa516e
Try other action
safinsaf Apr 6, 2022
2de5e2e
Try other action
safinsaf Apr 6, 2022
baaf74f
Try other action
safinsaf Apr 6, 2022
be7dbe7
Add comments, replace some anchors
safinsaf Apr 6, 2022
35975bd
Remove non-needed job
safinsaf Apr 6, 2022
8d07804
Add permissions
safinsaf Apr 6, 2022
d06813b
Fix permissions
safinsaf Apr 6, 2022
ad04256
Set none to deployments
safinsaf Apr 6, 2022
6363555
Update comments, remove odd steps
safinsaf Apr 6, 2022
b8ab709
Not allow changing scripts used in dockerfile
safinsaf Apr 6, 2022
b5db2a5
Add new filters
safinsaf Apr 6, 2022
f8869cd
Debug new filters
safinsaf Apr 6, 2022
170ca0b
Debug new filters
safinsaf Apr 6, 2022
461f2ec
Debug new filters
safinsaf Apr 6, 2022
f2fd5af
Refactor to run only by comment
safinsaf Apr 8, 2022
46c1a6f
Refactor to run only by comment
safinsaf Apr 8, 2022
2adaa4f
Refactor to run only by comment
safinsaf Apr 8, 2022
4126e7d
Try environments
safinsaf Apr 13, 2022
983f9c6
Add new workflow for forks
safinsaf Mar 29, 2022
72f8b16
Move to self-hosted runners
safinsaf Mar 29, 2022
5193971
Move to self-hosted runners
safinsaf Mar 29, 2022
079aafd
Add deploy steps
safinsaf Mar 29, 2022
7ad48dd
Build all
safinsaf Mar 30, 2022
9f44b05
Run only one workflow
safinsaf Mar 31, 2022
9ad50ba
Run only one workflow
safinsaf Mar 31, 2022
2af6953
Skip not-needed jobs
safinsaf Mar 31, 2022
16725c2
Add comments to new checks
safinsaf Mar 31, 2022
fc3fa4e
Make the new step first
safinsaf Mar 31, 2022
73526f5
Do not allow to change iroha-builder Dockerfile
safinsaf Mar 31, 2022
60bc4d4
Do not allow to change iroha Dockerfile
safinsaf Mar 31, 2022
cb28e1a
Debug iroha workflow not running
safinsaf Mar 31, 2022
4d4ecec
Debug iroha workflow not running
safinsaf Mar 31, 2022
fe73977
Show all changed files
safinsaf Apr 1, 2022
32f6c5d
Fetch history of commits for diff
safinsaf Apr 1, 2022
7343823
Try checkout base for mode
safinsaf Apr 1, 2022
c52ad7d
Try checkout v3 on head for diff
safinsaf Apr 1, 2022
5a9e1a9
Allow use fork point
safinsaf Apr 1, 2022
6fb1288
Find fork point
safinsaf Apr 1, 2022
db27f12
Find fork point
safinsaf Apr 1, 2022
bc06d44
Fix finding ancestor
safinsaf Apr 4, 2022
d1f6786
Try to remove variable in setting new origin
safinsaf Apr 5, 2022
d9995c5
Fix finding ancestor
safinsaf Apr 5, 2022
68a1116
Fix output
safinsaf Apr 5, 2022
8410f24
Try fix base origin
safinsaf Apr 5, 2022
c48a6e2
Try fix base origin
safinsaf Apr 5, 2022
c9f7625
Try fix base origin
safinsaf Apr 5, 2022
d5a5f9c
Try fix base origin
safinsaf Apr 5, 2022
0633c29
Try fix base origin
safinsaf Apr 5, 2022
0bd6133
Try fix base origin
safinsaf Apr 5, 2022
77dd37c
Use export for setting output
safinsaf Apr 6, 2022
9d45358
Try saving to file
safinsaf Apr 6, 2022
4386376
Try saving to file
safinsaf Apr 6, 2022
6937097
Try saving to file
safinsaf Apr 6, 2022
f463447
Try saving to file
safinsaf Apr 6, 2022
0a46880
Try saving to file
safinsaf Apr 6, 2022
048fc52
Try saving to file
safinsaf Apr 6, 2022
2f731c1
Debug using hardcoded values
safinsaf Apr 6, 2022
634d3df
Debug using hardcoded values
safinsaf Apr 6, 2022
2d77772
Debug using hardcoded values
safinsaf Apr 6, 2022
285d2b5
Debug using hardcoded values
safinsaf Apr 6, 2022
d1f5c4c
Debug using hardcoded values
safinsaf Apr 6, 2022
b41d0c1
Try other action
safinsaf Apr 6, 2022
720570a
Try other action
safinsaf Apr 6, 2022
a830e0b
Try other action
safinsaf Apr 6, 2022
7f6da47
Try other action
safinsaf Apr 6, 2022
61438dc
Try other action
safinsaf Apr 6, 2022
76f4794
Try other action
safinsaf Apr 6, 2022
b74c1fc
Add comments, replace some anchors
safinsaf Apr 6, 2022
bd8a070
Remove non-needed job
safinsaf Apr 6, 2022
5b566a2
Add permissions
safinsaf Apr 6, 2022
6edad98
Fix permissions
safinsaf Apr 6, 2022
5065861
Set none to deployments
safinsaf Apr 6, 2022
c47eb9d
Update comments, remove odd steps
safinsaf Apr 6, 2022
c654b70
Not allow changing scripts used in dockerfile
safinsaf Apr 6, 2022
84ef675
Add new filters
safinsaf Apr 6, 2022
b35c99e
Debug new filters
safinsaf Apr 6, 2022
9784d29
Debug new filters
safinsaf Apr 6, 2022
88e5318
Debug new filters
safinsaf Apr 6, 2022
ab7aaed
Refactor to run only by comment
safinsaf Apr 8, 2022
3afd34b
Refactor to run only by comment
safinsaf Apr 8, 2022
8fc7b95
Refactor to run only by comment
safinsaf Apr 8, 2022
429a6ec
Try environments
safinsaf Apr 13, 2022
0775ecc
Add require review to iroha-builder and prepare-env
safinsaf Apr 13, 2022
592b333
Fix rebase issues
safinsaf Apr 13, 2022
d80151b
Update workflow Readme, update comments, remove odd branches, prepare…
safinsaf Apr 13, 2022
73504d6
Merge branch 'main' into feature/DOPS-1651/enable-fork-build
safinsaf Apr 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 29 additions & 4 deletions .github/_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,23 @@ GitHub Actions CI for Iroha

---------------------

USAGE
### Workflows

There are GitHub Actions Workflows called [`Iroha1`](build-iroha1.src.yml) and [`Iroha1-fork`](build-iroha1-fork.src.yml).


USAGE of Iroha1-fork
-----
GitHub Actions Workflow [`Iroha1`](build-iroha1.src.yml) solves task of automated build and deployment Iroha1.
GitHub Actions Workflow [`Iroha1-fork`](build-iroha1-fork.src.yml) solves task of automated build and deployment of Iroha1 from forks.

Runs on **pull request** from forks to Iroha1 main and development branches.

The workflow is started on pull request creation or update. The workflow is paused on steps that require build of untrusted code. Maintainers are notified to review the code and allow build and deployment.


USAGE of Iroha1
-----
GitHub Actions Workflow [`Iroha1`](build-iroha1.src.yml) solves task of automated build and deployment Iroha1 from Hyperledger/iroha repository.
There are events when it is running:
- on **pull request** to Iroha1 main and development branches
- on **push** to main or development branches including event when PR is **merged**
Expand All @@ -22,12 +36,17 @@ Default `buildspec` is _`/build all`_
Build matrix is a way to select among number of configurations to be built.
Build matrix is generated from buildspec string and handled by script [`chatops-gen-matrix.sh`](./chatops-gen-matrix.sh)

## List of files
List of files
-----
- `build-iroha1.src.yml`
Main file here. GitHub workflow YAML description with ANCHORS, code is not duplicated.
IMPORTANT: regeneration required after after edit, which is automated with pre-commit.
IMPORTANT: regeneration required after edit, which is automated with pre-commit.
- `build-iroha1-fork.src.yml`
Same as previous, but for forks
- `workflows/build-iroha1.yml`
Result worflow taken by GitHub and generated with make-workflows script. Long file of repeated code. DO NOT EDIT MANUALLY.
- `workflows/build-iroha1.yml`
Same as previous, but for forks
- `make-workflows.sh`
A tool to generate workflows/*.yml from *.src.yml - evaluates anchors. [Read the docs](_README.make-workflows.md).
- `chatops-gen-matrix.sh`
Expand Down Expand Up @@ -65,3 +84,9 @@ Build matrix is generated from buildspec string and handled by script [`chatops-
See docs of make-workflows. Use instead of pre-commit as `ln -s ../../.github/pre-commit-hook.sh .git/hooks/pre-commit`, reserv alternative.
- `TESTS_ALLOWED_TO_FAIL`
One day tests of Iroha became failing. To fix CI and postpone fixing tests, this file was invented. It allows CI to pass even when listed tests are failing. DO NOT USE UNLESS YOU DEFINITELY KNOW WHAT'S GOING. KEEP IT EMPTY.

Worth noting
-----
None of workflows run for PRs that update only .md and .rst files. As sourse code of Iroha and dependencies do not change, building and testing is redundant.

Forks are not allowed to change `.github` folder, Dockerfiles and scripts in `docker` folder
Loading