Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mybee
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
mybee
Commits
9917a715
Unverified
Commit
9917a715
authored
Oct 09, 2020
by
Ivan Vandot
Committed by
GitHub
Oct 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trigger argocd only on master, split /beekeeper and master push (#825)
parent
2c41dffc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
169 additions
and
20 deletions
+169
-20
beekeeper.yml
.github/workflows/beekeeper.yml
+2
-20
go.yml
.github/workflows/go.yml
+8
-0
slash-beekeeper.yml
.github/workflows/slash-beekeeper.yml
+159
-0
No files found.
.github/workflows/beekeeper.yml
View file @
9917a715
name
:
Beekeeper
on
:
issue_comment
:
types
:
[
created
]
repository_dispatch
:
types
:
[
trigger-beekeeper
]
jobs
:
beekeeper
:
name
:
Execute "/beekeeper" slash command
if
:
github.event.issue.pull_request != '' && contains(github.event.comment.body, '/beekeeper')
env
:
REPLICA
:
3
runs-on
:
ubuntu-latest
steps
:
-
name
:
Check for Command
id
:
command
uses
:
xt0rted/slash-command-action@v1
with
:
repo-token
:
${{ secrets.GITHUB_TOKEN }}
command
:
beekeeper
reaction-type
:
"
rocket"
-
name
:
Get PR Branch
if
:
steps.command.outputs.command-arguments == 'beekeeper'
id
:
comment-branch
uses
:
xt0rted/pull-request-comment-branch@v1
with
:
repo_token
:
${{ secrets.GITHUB_TOKEN }}
-
name
:
Echo command (debug)
run
:
echo "The command was '${{ steps.command.outputs.command-name }}' with arguments '${{ steps.command.outputs.command-arguments }}'"
-
name
:
Checkout
uses
:
actions/checkout@v2
with
:
ref
:
${{ steps.comment-branch.outputs.ref }}
fetch-depth
:
1
-
name
:
Install bee-local
run
:
|
...
...
.github/workflows/go.yml
View file @
9917a715
...
...
@@ -68,3 +68,11 @@ jobs:
./bin/deepsource report --analyzer test-coverage --key go --value-file ./cover.out
env
:
DEEPSOURCE_DSN
:
${{ secrets.DEEPSOURCE_DSN }}
-
name
:
Trigger Beekeeper
if
:
github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest' && success()
uses
:
peter-evans/repository-dispatch@v1
with
:
token
:
${{ secrets.REPO_GHA_PAT }}
repository
:
${{ github.repository }}
event-type
:
trigger-beekeeper
client-payload
:
'
{"ref":
"${{
github.ref
}}",
"sha":
"${{
github.sha
}}"}'
.github/workflows/slash-beekeeper.yml
0 → 100644
View file @
9917a715
name
:
Slash Beekeeper
on
:
issue_comment
:
types
:
[
created
]
jobs
:
beekeeper
:
name
:
Execute "/beekeeper" slash command
if
:
github.event.issue.pull_request != '' && contains(github.event.comment.body, '/beekeeper')
env
:
REPLICA
:
3
runs-on
:
ubuntu-latest
steps
:
-
name
:
Check for Command
id
:
command
uses
:
xt0rted/slash-command-action@v1
with
:
repo-token
:
${{ secrets.GITHUB_TOKEN }}
command
:
beekeeper
reaction-type
:
"
rocket"
-
name
:
Get PR Branch
if
:
steps.command.outputs.command-arguments == 'beekeeper'
id
:
comment-branch
uses
:
xt0rted/pull-request-comment-branch@v1
with
:
repo_token
:
${{ secrets.GITHUB_TOKEN }}
-
name
:
Echo command (debug)
run
:
echo "The command was '${{ steps.command.outputs.command-name }}' with arguments '${{ steps.command.outputs.command-arguments }}'"
-
name
:
Checkout
uses
:
actions/checkout@v2
with
:
ref
:
${{ steps.comment-branch.outputs.ref }}
fetch-depth
:
1
-
name
:
Install bee-local
run
:
|
sudo mv $(command -v brew){,_disable}
export URL=$(curl -s https://api.github.com/repos/ethersphere/bee-local/releases/latest | jq -r .tarball_url)
curl -Ls ${URL} -o bee-local.tar.gz
tar --strip-components=1 --wildcards -xzf bee-local.tar.gz ethersphere-bee-local-*/{beeinfra.sh,helm-values,hack}
-
name
:
Install latest beekeeper
run
:
|
export TAG=$(curl -s https://api.github.com/repos/ethersphere/beekeeper/releases/latest | jq -r .tag_name)
curl -Ls https://github.com/ethersphere/beekeeper/releases/download/${TAG}/beekeeper-linux-amd64 -o beekeeper
chmod +x beekeeper
-
name
:
Prepare testing cluster (DNS discovery)
run
:
|
./beeinfra.sh prepare --dns-disco --geth
-
name
:
Set kube config
run
:
|
mkdir -p ~/.kube
cp $(k3d get-kubeconfig --name='k3s-default') ~/.kube/config
-
name
:
Set testing cluster (DNS discovery)
run
:
|
echo -e "127.0.0.10\tregistry.localhost" | sudo tee -a /etc/hosts
for ((i=0; i<REPLICA; i++)); do echo -e "127.0.1.$((i+1))\tbee-${i}.localhost bee-${i}-debug.localhost"; done | sudo tee -a /etc/hosts
./beeinfra.sh install --dns-disco --local -r "${REPLICA}" --bootnode /dnsaddr/localhost --pay-threshold 10000 --geth
-
name
:
Test fullconnectivity
id
:
fullconnectivity-1
run
:
./beekeeper check fullconnectivity --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}"
-
name
:
Test pingpong
id
:
pingpong-1
run
:
./beekeeper check pingpong --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}"
-
name
:
Test settlements
id
:
settlements
run
:
./beekeeper check settlements --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" --upload-node-count 10 -t
10000
-
name
:
Destroy the cluster
run
:
|
./beeinfra.sh destroy
-
name
:
Prepare testing cluster (Node connection)
run
:
|
./beeinfra.sh prepare --geth
-
name
:
Set kube config
run
:
|
mkdir -p ~/.kube
cp $(k3d get-kubeconfig --name='k3s-default') ~/.kube/config
-
name
:
Set testing cluster (Node connection)
run
:
|
./beeinfra.sh install --local -r "${REPLICA}" --geth
-
name
:
Test fullconnectivity
id
:
fullconnectivity-2
run
:
./beekeeper check fullconnectivity --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}"
-
name
:
Test pingpong
id
:
pingpong-2
run
:
./beekeeper check pingpong --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}"
-
name
:
Test balances
id
:
balances
run
:
./beekeeper check balances --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" --upload-node-count "${REPLICA}"
-
name
:
Test pushsync (bytes)
id
:
pushsync-bytes
run
:
./beekeeper check pushsync --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" --upload-node-count "${REPLICA}" --chunks-per-node
3
-
name
:
Test pushsync (chunks)
id
:
pushsync-chunks
run
:
./beekeeper check pushsync --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" --upload-node-count "${REPLICA}" --chunks-per-node 3 --upload-chunks
-
name
:
Test retrieval
id
:
retrieval
run
:
./beekeeper check retrieval --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" --upload-node-count "${REPLICA}" --chunks-per-node
3
-
name
:
Test pullsync
id
:
pullsync
run
:
./beekeeper check pullsync --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" --upload-node-count "${REPLICA}" --chunks-per-node
3
-
name
:
Test chunkrepair
id
:
chunkrepair
run
:
./beekeeper check chunkrepair --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}"
-
name
:
Test manifest
id
:
manifest
run
:
./beekeeper check manifest --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}"
-
name
:
Destroy the cluster
run
:
|
./beeinfra.sh destroy
grep -vE 'bee|registry.localhost' /etc/hosts | sudo tee /etc/hosts
-
name
:
Prepare testing cluster (Node connection) 5 bee nodes
run
:
|
./beeinfra.sh prepare --geth
-
name
:
Set kube config
run
:
|
mkdir -p ~/.kube
cp $(k3d get-kubeconfig --name='k3s-default') ~/.kube/config
-
name
:
Increase REPLICA to
5
run
:
|
echo "::set-env name=REPLICA::5"
-
name
:
Set testing cluster (Node connection) 5 bee nodes
run
:
|
echo -e "127.0.0.10\tregistry.localhost" | sudo tee -a /etc/hosts
for ((i=0; i<REPLICA; i++)); do echo -e "127.0.1.$((i+1))\tbee-${i}.localhost bee-${i}-debug.localhost"; done | sudo tee -a /etc/hosts
./beeinfra.sh install --local -r "${REPLICA}" --geth
-
name
:
Test localpinning
1
id
:
localpinning-1
run
:
./beekeeper check localpinning --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}"
-
name
:
Test localpinning
2
id
:
localpinning-2
run
:
./beekeeper check localpinning --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" --large-file-disk-ratio
2
-
name
:
Test localpinning
3
id
:
localpinning-3
run
:
./beekeeper check localpinning --api-scheme http --debug-api-scheme http --disable-namespace --debug-api-domain localhost --api-domain localhost --node-count "${REPLICA}" --large-file-disk-ratio 2 --large-file-count
10
-
name
:
Debug workflow if failed
if
:
failure()
run
:
|
export FAILED='no-test'
if ${{ steps.fullconnectivity-1.outcome=='failure' }}; then FAILED=fullconnectivity-1; fi
if ${{ steps.pingpong-1.outcome=='failure' }}; then FAILED=pingpong-1; fi
if ${{ steps.fullconnectivity-2.outcome=='failure' }}; then FAILED=fullconnectivity-2; fi
if ${{ steps.pingpong-2.outcome=='failure' }}; then FAILED=pingpong-2; fi
if ${{ steps.balances.outcome=='failure' }}; then FAILED=balances; fi
if ${{ steps.settlements.outcome=='failure' }}; then FAILED=settlements; fi
if ${{ steps.pushsync-bytes.outcome=='failure' }}; then FAILED=pushsync-bytes; fi
if ${{ steps.pushsync-chunks.outcome=='failure' }}; then FAILED=pushsync-chunks; fi
if ${{ steps.retrieval.outcome=='failure' }}; then FAILED=retrieval; fi
if ${{ steps.pullsync.outcome=='failure' }}; then FAILED=pullsync; fi
if ${{ steps.chunkrepair.outcome=='failure' }}; then FAILED=chunkrepair; fi
if ${{ steps.manifest.outcome=='failure' }}; then FAILED=manifest; fi
if ${{ steps.localpinning-1.outcome=='failure' }}; then FAILED=localpinning-1; fi
if ${{ steps.localpinning-2.outcome=='failure' }}; then FAILED=localpinning-2; fi
if ${{ steps.localpinning-3.outcome=='failure' }}; then FAILED=localpinning-3; fi
KEYS=$(curl -sSf -X POST https://eu.relay.tunshell.com/api/sessions)
curl -sSf -X POST -H "Content-Type: application/json" -d "{\"text\": \"Failed -> \`${FAILED}\`\nDebug -> \`sh <(curl -sSf https://lets.tunshell.com/init.sh) L $(echo $KEYS | jq -r .peer2_key) \${TUNSHELL_SECRET} eu.relay.tunshell.com\`\"}" https://beehive.ethswarm.org/hooks/${{ secrets.WEBHOOK_KEY }}
echo "Failed test: ${FAILED}"
echo "Connect to github actions node using"
echo "sh <(curl -sSf https://lets.tunshell.com/init.sh) L $(echo $KEYS | jq -r .peer2_key) \${TUNSHELL_SECRET} eu.relay.tunshell.com"
curl -sSf https://lets.tunshell.com/init.sh | sh /dev/stdin T $(echo $KEYS | jq -r .peer1_key) ${{ secrets.TUNSHELL_SECRET }} eu.relay.tunshell.com
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment