mirror of
https://github.com/krkn-chaos/krkn.git
synced 2026-02-14 18:10:00 +00:00
Clean up and start figuring out CI failures
This commit is contained in:
committed by
Naga Ravi Chaitanya Elluri
parent
9208f39e06
commit
9810649c62
@@ -1,4 +1,4 @@
|
||||
name: Docker Image CI
|
||||
name: Build Krkn
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@@ -13,7 +13,14 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
- name: Build the Docker images
|
||||
run: docker build --no-cache -t quay.io/chaos-kubox/krkn containers/
|
||||
|
||||
- name: Create multi-node KinD cluster
|
||||
uses: chaos-kubox/actions/kind@main
|
||||
- name: Install environment
|
||||
run: |
|
||||
sudo apt-get install build-essential python3-dev
|
||||
pip install -r requirements.txt
|
||||
- name: Run CI
|
||||
run: ./CI/run.sh
|
||||
- name: Login in quay
|
||||
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||
run: docker login quay.io -u ${QUAY_USER} -p ${QUAY_TOKEN}
|
||||
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@@ -1,22 +0,0 @@
|
||||
name: Code Quality Check
|
||||
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
lint-ci:
|
||||
runs-on: ubuntu-latest
|
||||
name: Run pre-commit and install test
|
||||
steps:
|
||||
- name: Check out source repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Set up Python environment
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: "3.8"
|
||||
- name: Run pre-commit
|
||||
uses: pre-commit/action@v2.0.3
|
||||
- name: Install Kraken
|
||||
run: |
|
||||
python setup.py develop
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
repos:
|
||||
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
||||
rev: v1.1.1
|
||||
hooks:
|
||||
- id: remove-tabs
|
||||
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v2.0.0
|
||||
hooks:
|
||||
- id: check-merge-conflict
|
||||
- id: check-case-conflict
|
||||
- id: detect-private-key
|
||||
- id: check-ast
|
||||
|
||||
- repo: https://gitlab.com/PyCQA/flake8
|
||||
rev: '3.7.8'
|
||||
hooks:
|
||||
- id: flake8
|
||||
additional_dependencies: ['pep8-naming']
|
||||
# Ignore all format-related checks as Black takes care of those.
|
||||
args: ['--ignore', 'E123,E125', '--select', 'E,W,F', '--max-line-length=120']
|
||||
@@ -34,12 +34,25 @@ The signal is set to `RUN` by default, meaning it will continue to run the scena
|
||||
|
||||
#### Setting Signal
|
||||
|
||||
See [set_stop_signal.py](https://github.com/chaos-kubox/krkn/blob/main/set_stop_signal.py) for an example of how to reset the kraken status during kraken execution.
|
||||
You can reset the kraken status during kraken execution with a `set_stop_signal.py` script with the following contents:
|
||||
|
||||
```
|
||||
import http.client as cli
|
||||
|
||||
conn = cli.HTTPConnection("0.0.0.0", "<port>")
|
||||
|
||||
conn.request("POST", "/STOP", {})
|
||||
|
||||
# conn.request('POST', '/PAUSE', {})
|
||||
|
||||
# conn.request('POST', '/RUN', {})
|
||||
|
||||
response = conn.getresponse()
|
||||
print(response.read().decode())
|
||||
```
|
||||
|
||||
Make sure to set the correct port number in your set_stop_signal script.
|
||||
|
||||
|
||||
|
||||
##### Url Examples
|
||||
To stop run:
|
||||
|
||||
|
||||
8
kind-config.yml
Normal file
8
kind-config.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
kind: Cluster
|
||||
apiVersion: kind.x-k8s.io/v1alpha4
|
||||
nodes:
|
||||
- role: control-plane
|
||||
- role: control-plane
|
||||
- role: control-plane
|
||||
- role: worker
|
||||
- role: worker
|
||||
@@ -1,12 +0,0 @@
|
||||
import http.client as cli
|
||||
|
||||
conn = cli.HTTPConnection("0.0.0.0", "<port>")
|
||||
|
||||
conn.request("POST", "/STOP", {})
|
||||
|
||||
# conn.request('POST', '/PAUSE', {})
|
||||
|
||||
# conn.request('POST', '/RUN', {})
|
||||
|
||||
response = conn.getresponse()
|
||||
print(response.read().decode())
|
||||
Reference in New Issue
Block a user