Skip to content

Commit ddd7e82

Browse files
committed
This is the testing prototype of greenboot.
Command: greenbbot health-check MOTD is not implemenetd yet Signed-off-by: Sayan Paul <paul.sayan@gmail.com> modifying ci writing health check added config add tests testing prototype
1 parent 0ed08a6 commit ddd7e82

5 files changed

Lines changed: 226 additions & 121 deletions

File tree

.devcontainer/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM fedora:latest
2+
3+
RUN bash -c "$(curl -fsSL "https://raw.githubusercontent.com/microsoft/vscode-dev-containers/main/script-library/common-redhat.sh")" -- "true" "vscode" "1000" "1000" "true"
4+
5+
RUN dnf install -y \
6+
sudo git cargo rust rust-src git-core clippy rustfmt \
7+
&& dnf clean all
8+
9+
USER vscode

.devcontainer/devcontainer.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "greenboot-rs",
3+
"build": {
4+
"dockerfile": "Dockerfile"
5+
},
6+
"runArgs": [
7+
"--cap-add=SYS_PTRACE",
8+
"--security-opt",
9+
"seccomp=unconfined"
10+
],
11+
"settings": {
12+
"rust-analyzer.checkOnSave.command": "clippy"
13+
},
14+
"extensions": [
15+
"mutantdino.resourcemonitor",
16+
"matklad.rust-analyzer",
17+
"serayuzgur.crates"
18+
],
19+
"hostRequirements": {
20+
"memory": "4gb"
21+
},
22+
"remoteUser": "vscode",
23+
"updateContentCommand": [
24+
"cargo",
25+
"build"
26+
],
27+
"waitFor": "onCreateCommand"
28+
}

.github/workflows/ci.yml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
steps:
6868
- name: Install deps
6969
run: |
70-
dnf install -y make gcc git cargo rust git clevis
70+
dnf install -y make gcc git cargo rust git
7171
- uses: actions/checkout@v3
7272
with:
7373
persist-credentials: false
@@ -91,30 +91,9 @@ jobs:
9191
uses: actions-rs/cargo@v1
9292
with:
9393
command: test
94-
# This is primarily to ensure that changes to fdo_data.h are committed,
95-
# which is critical for determining whether any stability changes were made
96-
# during the PR review.
97-
- name: Ensure building did not change any code
98-
run: |
99-
git diff --exit-code
100-
101-
commitlint:
102-
runs-on: ubuntu-latest
103-
steps:
104-
- uses: actions/checkout@v3
105-
with:
106-
fetch-depth: 0
107-
- uses: actions/setup-node@v3
108-
with:
109-
node-version: 'latest'
110-
- name: Install commitlint dependencies
111-
run: npm install commitlint
112-
- uses: wagoid/commitlint-github-action@v5
113-
env:
114-
NODE_PATH: ${{ github.workspace }}/node_modules
115-
with:
116-
configFile: .github/commitlint.config.js
117-
failOnWarnings: true
94+
# - name: Ensure building did not change any code
95+
# run: |
96+
# git diff --exit-code
11897

11998
# manpages:
12099
# name: Test man page generation
@@ -136,6 +115,6 @@ jobs:
136115
# - name: Install devcontainer CLI
137116
# run: npm install -g @vscode/dev-container-cli
138117
# - name: Build devcontainer
139-
# run: devcontainer build --image-name devcontainer-fdo-rs .
118+
# run: devcontainer build --image-name greenboot-rs .
140119
# - name: Test building in devcontainer
141-
# run: docker run --rm -v `pwd`:/code:z --workdir /code --user root devcontainer-fdo-rs cargo build --verbose
120+
# run: docker run --rm -v `pwd`:/code:z --workdir /code --user root greenboot-rs cargo build --verbose

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ nix = "0.25.0"
1515
glob = "0.3.0"
1616
serde = "1.0"
1717
serde_json = "1.0"
18+
thiserror = "1.0.38"
19+
hocon = "0.9.0"

0 commit comments

Comments
 (0)