Skip to content

Commit

Permalink
This is the testing prototype of greenboot.
Browse files Browse the repository at this point in the history
Command: greenbbot  health-check
MOTD is not implemenetd yet

Signed-off-by: Sayan Paul <[email protected]>

modifying ci

writing health check

added config

add tests

testing prototype
  • Loading branch information
say-paul committed Mar 29, 2023
1 parent 0ed08a6 commit eacb3d5
Show file tree
Hide file tree
Showing 5 changed files with 218 additions and 118 deletions.
9 changes: 9 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM fedora:latest

RUN bash -c "$(curl -fsSL "https://raw.githubusercontent.com/microsoft/vscode-dev-containers/main/script-library/common-redhat.sh")" -- "true" "vscode" "1000" "1000" "true"

RUN dnf install -y \
sudo git cargo rust rust-src git-core clippy rustfmt \
&& dnf clean all

USER vscode
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "greenboot-rs",
"build": {
"dockerfile": "Dockerfile"
},
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined"
],
"settings": {
"rust-analyzer.checkOnSave.command": "clippy"
},
"extensions": [
"mutantdino.resourcemonitor",
"matklad.rust-analyzer",
"serayuzgur.crates"
],
"hostRequirements": {
"memory": "4gb"
},
"remoteUser": "vscode",
"updateContentCommand": [
"cargo",
"build"
],
"waitFor": "onCreateCommand"
}
33 changes: 6 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
steps:
- name: Install deps
run: |
dnf install -y make gcc git cargo rust git clevis
dnf install -y make gcc git cargo rust git
- uses: actions/checkout@v3
with:
persist-credentials: false
Expand All @@ -91,30 +91,9 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: test
# This is primarily to ensure that changes to fdo_data.h are committed,
# which is critical for determining whether any stability changes were made
# during the PR review.
- name: Ensure building did not change any code
run: |
git diff --exit-code
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 'latest'
- name: Install commitlint dependencies
run: npm install commitlint
- uses: wagoid/commitlint-github-action@v5
env:
NODE_PATH: ${{ github.workspace }}/node_modules
with:
configFile: .github/commitlint.config.js
failOnWarnings: true
# - name: Ensure building did not change any code
# run: |
# git diff --exit-code

# manpages:
# name: Test man page generation
Expand All @@ -136,6 +115,6 @@ jobs:
# - name: Install devcontainer CLI
# run: npm install -g @vscode/dev-container-cli
# - name: Build devcontainer
# run: devcontainer build --image-name devcontainer-fdo-rs .
# run: devcontainer build --image-name greenboot-rs .
# - name: Test building in devcontainer
# run: docker run --rm -v `pwd`:/code:z --workdir /code --user root devcontainer-fdo-rs cargo build --verbose
# run: docker run --rm -v `pwd`:/code:z --workdir /code --user root greenboot-rs cargo build --verbose
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ nix = "0.25.0"
glob = "0.3.0"
serde = "1.0"
serde_json = "1.0"
thiserror = "1.0.38"
hocon = "0.9.0"
Loading

0 comments on commit eacb3d5

Please sign in to comment.