Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-yurchenko committed Feb 10, 2021
0 parents commit 0c8cff8
Show file tree
Hide file tree
Showing 32 changed files with 1,924 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Contributing Guidelines

:confetti_ball::medal_military: First of all, thank you for contributing! :medal_military::confetti_ball:

## Issue

- Search for an already opened [issue](https://github.com/ReasonSoftware/ssh-manager/issues) before submitting a [new one](https://github.com/ReasonSoftware/ssh-manager/issues/new/choose).
- Provide as much information as you can.

## Pull Request

- Ensure [Pull Request](https://github.com/ReasonSoftware/ssh-manager/pulls) description clearly describes the problem and solution.
- Make sure all Tests are passed and there is no Code Coverage degradation.
- Add more tests wherever possible.
- Please follow [AngularJS Commit Message Guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines)
96 changes: 96 additions & 0 deletions .github/ISSUE_TEMPLATE/report_a_bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
name: Report a Bug
about: Create a report to help us improve
title: ''
labels: ''
assignees: anton-yurchenko

---

### Description

A clear and concise description of what the bug is

### Version

`Provide an Application Version`

*First log message contains the version number...*

### Log

```Attach an execution log```

*In case your security policy does not allow you to provide usernames, you may replace them with something like `user-1`/`user-2`.*

#### Sanitized Central Configuration

:warning: **Obfuscate real information** :warning:

<details><summary>Clich Here to Expand</summary>

```json
{
"users": {
"user.1": "AAA",
"user.2": "BBB",
"user.3": "CCC",
"user.4": "DDD",
"user.5": "EEE",
"user.6": "FFF"
},
"server_groups": {
"backend": {
"sudoers": [
"user.2"
],
"users": [
"user.1",
"user.4",
"user.5"
]
},
"poc": {
"sudoers": [
"user.1",
"user.2",
"user.4"
],
"users": [
"user.6"
]
},
"devops": {
"sudoers": [
"user.2"
],
"users": [
"user.3",
"user.5"
]
}
}
}
```

</details>

#### Sanitized Server Configuration

:warning: **Obfuscate real information** :warning:

<details><summary>Clich Here to Expand</summary>

```yaml
secret_name: XXX
groups:
- A
- B
- C
```
</details>
### Screenshots
If applicable, add screenshots to help explain your problem.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/suggest_a_change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Suggest a Change
about: Suggest an enhancement to help us improve
title: ''
labels: ''
assignees: anton-yurchenko

---

### Description
A clear and concise description of what an enhancement is about

### Reference
If applicable, add external documentation links.

### Screenshots
If applicable, add screenshots to help explain your problem.
93 changes: 93 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
## Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## How Has This Been Tested

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

- [ ] Test A
- [ ] Test B

#### Test Central Configuration

<details><summary>Clich Here to Expand</summary>

```json
{
"users": {
"user.1": "ssh-rsa AAA...",
"user.2": "ssh-rsa AAA...",
"user.3": "ssh-rsa AAA...",
"user.4": "ssh-rsa AAA...",
"user.5": "ssh-rsa AAA...",
"user.6": "ssh-rsa AAA..."
},
"server_groups": {
"backend": {
"sudoers": [
"user.2"
],
"users": [
"user.1",
"user.4",
"user.5"
]
},
"poc": {
"sudoers": [
"user.1",
"user.2",
"user.4"
],
"users": [
"user.6"
]
},
"devops": {
"sudoers": [
"user.2"
],
"users": [
"user.3",
"user.5"
]
}
}
}
```

</details>

#### Test Server Configuration

<details><summary>Clich Here to Expand</summary>

```yaml
secret_name: ssh-manager
groups:
- devops
```
</details>
# Checklist
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: gomod
directory: "/"
schedule:
interval: monthly
assignees:
- anton-yurchenko
labels:
- dependencies

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: monthly
target-branch: master
assignees:
- anton-yurchenko
13 changes: 13 additions & 0 deletions .github/no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Configuration for probot-no-response - https://github.com/probot/no-response

# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 14
# Label requiring a response
responseRequiredLabel: more-information-needed
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
This issue has been automatically closed because there has been no response
to our request for more information from the original author. With only the
information that is currently in the issue, we don't have enough information
to take action. Please reach out if you have or find the answers we need so
that we can investigate further.
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Init
uses: actions/setup-go@v2
with:
go-version: 1.15
id: go

- name: Checkout
uses: actions/checkout@v2

- name: Install Dependencies
run: |
go get -v -t -d ./...
- name: Lint
run: |
export PATH=$PATH:$(go env GOPATH)/bin
curl -s https://api.github.com/repos/golangci/golangci-lint/releases/latest | grep browser_download_url | grep linux-amd64 | cut -d : -f 2,3 | tr -d \" | wget -i -
tar -xvf golangci-lint-*-linux-amd64.tar.gz --strip=1 --no-anchored golangci-lint
./golangci-lint run ./...
- name: Test
run: go test -v $(go list ./... | grep -v vendor | grep -v mocks) -race -coverprofile=coverage.txt -covermode=atomic

- name: Build
run: GOOS=linux GOARCH=amd64 go build -o ssh-manager

- name: Pack
run: zip ssh-manager.zip ssh-manager LICENSE.md

- name: Release
uses: docker://antonyurchenko/git-release:latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHANGELOG_FILE: "CHANGELOG.md"
ALLOW_TAG_PREFIX: "true"
with:
args: ssh-manager.zip
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# OS
**/.DS_Store

# IDE
.vscode/
**/__debug_bin
.idea/

# project
coverage.txt
/vendor/
/release/
/docs/schema.json
/scripts/local.sh
/ssh-manager
/ssh-manager.zip
var/
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## [1.0.0](https://github.com/ReasonSoftware/ssh-manager/releases/tag/v1.0.0) - 2021-02-10
- First release
Loading

0 comments on commit 0c8cff8

Please sign in to comment.