Skip to content

Commit

Permalink
Initial changes
Browse files Browse the repository at this point in the history
These are incomplete, but provide the basic skeleton of change.

Accepts a config file, or environment variables for authentication to
one or more RedFish endpoints. The config file can specify global
credentials, as well as per-host credentials.

Adds a `--json` flag for printing the output as JSON.

Adds a `--insecure` flag for connecting to untrusted RedFish endpoints.

Allows hosts to be provided as positional arguments, or by piping

```
echo host1 host2 | gru show system

gru show system host1 host2
```
  • Loading branch information
rustydb committed Jul 17, 2023
1 parent bfaa2fa commit 888724a
Show file tree
Hide file tree
Showing 88 changed files with 1,138 additions and 10,672 deletions.
16 changes: 0 additions & 16 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
### Summary and Scope

<!--- Pick one below and delete the rest -->
<!--- Add the JIRA (WORD-NUMBER), or use a hyper-link ([WORD-NUMBER](https://jira-pro.its.hpecorp.net:8443/browse/WORD-NUMBER)). -->

- Fixes:
- Requires:
Expand All @@ -17,21 +16,6 @@

<!--- words; describe what this change is and what it is for. -->

### Prerequisites

<!--- An empty check is two brackets with a space inbetween, a checked checkbox is two brackets with an x inbetween -->
<!--- unchecked checkbox: [ ] -->
<!--- checked checkbox: [x] -->
<!--- invalid checkbox: [] -->

- [ ] I have included documentation in my PR (or it is not required)
- [ ] I tested this on internal system (if yes, please include results or a description of the test)
- [ ] I tested this on a vshasta system (if yes, please include results or a description of the test)

### Idempotency

<!--- describe testing done to verify code changes behave in an idempotent manner -->

### Risks and Mitigations

<!--- What is less risky, or more risky now - or if your mod fails is there a new risk? -->
Expand Down
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ updates:
interval: "weekly"
labels:
- "dependencies"
- package-ecosystem: "github-actions"
# Look for `.github/workflows` in the `root` directory
directory: "/"
# Check for updates once a week
schedule:
interval: "weekly"
32 changes: 0 additions & 32 deletions .github/workflows/ci.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint
env:
GO_VERSION: '1.20'
on:
push:

jobs:

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: lint
run: make lint
25 changes: 25 additions & 0 deletions .github/workflows/promote-prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build a pre-release
on:
push:
tags:
- 'v?[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- 'v?[0-9]+.[0-9]+.[0-9]+b[0-9]+'
- 'v?[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
workflow_dispatch:

env:
STREAM: unstable
jobs:
Promote:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3

- uses: ncipollo/release-action@v1
with:
allowUpdates: true # if the job is re-ran to catch missed artifacts, allow updates
generateReleaseNotes: true
# artifacts: ${{ env.DIR_UPLOAD }}/*
prerelease: true
makeLatest: false
22 changes: 22 additions & 0 deletions .github/workflows/promote-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build a release
on:
push:
tags:
- 'v?[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:

env:
STREAM: stable
jobs:
Promote:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: ncipollo/release-action@v1
with:
allowUpdates: true # if the job is re-ran to catch missed artifacts, allow updates
generateReleaseNotes: true
# artifacts: ${{ env.DIR_UPLOAD }}/*
prerelease: false
makeLatest: true
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test
env:
GO_VERSION: '1.20'
on:
push:

jobs:

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}

- name: Test
run: make test
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Binaries for programs and plugins
bin/
dist/
*.exe
*.exe~
*.dll
Expand All @@ -12,4 +14,7 @@
*.out

# Dependency directories (remove the comment below to include it)
# vendor/
vendor/

build/
gru.y[a?]ml
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 Cray / HPE
Copyright (c) 2023 Cray / HPE

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 888724a

Please sign in to comment.