Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

454 create readme for lme 20 #455

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .devcontainer/python_development/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "Python Development",
"dockerComposeFile": [
"../../testing/development/docker-compose.yml"
],
"service": "ubuntu",
"shutdownAction": "none",
"workspaceFolder": "/lme",
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"littlefoxteam.vscode-python-test-adapter",
"ms-python.black-formatter"
]
}
},
"remoteUser": "admin.ackbar"
}
18 changes: 18 additions & 0 deletions .devcontainer/python_tests/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "Python Tests",
"dockerComposeFile": [
"../../testing/tests/docker-compose.yml"
],
"service": "ubuntu",
"shutdownAction": "none",
"workspaceFolder": "/app",
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"littlefoxteam.vscode-python-test-adapter",
"ms-python.black-formatter"
]
}
}
}
19 changes: 9 additions & 10 deletions .github/ISSUE_TEMPLATE/bug-or-error-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,25 @@ assignees: ''
If the above did not answer your question, proceed with creating an issue below:

## Describe the bug
A clear and concise description of what the bug is.
<!-- A clear and concise description of what the bug is. -->

## To Reproduce
Steps to reproduce the behavior. These should be clear enough that our team can understand your running environment, software/operating system versions, and anything else we might need to debug the issue.

An example of a usable reproducible list are shown in these issues: [Issue 1](https://github.com/cisagov/LME/issues/15) [Issue 2](https://github.com/cisagov/LME/issues/19).

To increase the speed and relevance of the reply we suggest you list down debugging steps you have tried, as well as the following information:
<!-- Steps to reproduce the behavior. These should be clear enough that our team can understand your running environment, software/operating system versions, and anything else we might need to debug the issue. -->
<!-- Good examples can be found here: [Issue 1](https://github.com/cisagov/LME/issues/15) [Issue 2](https://github.com/cisagov/LME/issues/19). -->

### Please complete the following information
**Desktop:**
#### **Desktop:**
- OS: [e.g. Windows 10]
- Browser: [e.g. Firefox Version 104.0.1]
- Software version: [e.g. Sysmon v15.0, Winlogbeat 8.11.1]

**Server:**
#### **Server:**
- OS: [e.g. Ubuntu 22.04]
- Software Versions:
- ELK: [e.g. 8.7.1]
- Docker: [e.g. 20.10.23, build 7155243]

**OPTIONAL**:
- The output of these commands:
```
free -h
Expand All @@ -52,7 +51,7 @@ Increase the number of lines if your issue is not present, or include a relevant
## Expected behavior
A clear and concise description of what you expected to happen.

## Screenshots
## Screenshots **OPTIONAL**
If applicable, add screenshots to help explain your problem.

## Additional context
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
<!-- What problem does this change solve? How did you solve it? -->
<!-- Mention any related issue(s) here using appropriate keywords such -->
<!-- as "closes" or "resolves" to auto-close them on merge. -->
<!-- If this PR is *not* being merged into main, the related issues will not -->
<!-- be auto-closed, so you need to add the issue into the Development box -->
<!-- in the right sidebar -->

### πŸ“· Screenshots (DELETE IF UNAPPLICABLE)

Expand All @@ -22,6 +25,7 @@

- [ ] Changes are limited to a single goal **AND**
the title reflects this in a clear human readable format
- [ ] Issue that this PR solves has been selected in the Development section
- [ ] I have read and agree to LME's [CONTRIBUTING.md](https://github.com/cisagov/LME/CONTRIBUTING.md) document.
- [ ] The PR adheres to LME's requirements in [RELEASES.md](https://github.com/cisagov/LME/RELEASES.md#steps-to-submit-a-PR)
- [ ] These code changes follow [cisagov code standards](https://github.com/cisagov/development-guide).
Expand All @@ -31,9 +35,9 @@

- [ ] All tests pass
- [ ] PR has been tested and the documentation for testing is above
- [ ] Squash and merge all commits into one PR level commit

## βœ… Post-merge Checklist

- [ ] Squash all commits into one PR level commit
- [ ] Delete the branch to keep down number of branches

1 change: 1 addition & 0 deletions .github/README-github.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See the readme in `testing/development` for more information about these workflows and how to develop for them.
22 changes: 22 additions & 0 deletions .github/changelog-configuration.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"categories": [
{
"title": "## What's Added",
"labels": ["feat"],
},
{
"title": "## What's Fixed",
"labels": ["fix"],
},
{
"title": "## What's Updated",
"labels": ["update"],
},
{
"title": "## Uncategorized",
"labels": [],
},
],
"template": "#{{CHANGELOG}}",
"pr_template": "* #{{TITLE}} by @#{{AUTHOR}} in ##{{NUMBER}}"
}
49 changes: 49 additions & 0 deletions .github/workflows/build_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
on:
workflow_dispatch:
inputs:
version:
description: "Release version (e.g., 1.1.0)"
required: true
type: string

name: Build Release

jobs:
build-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get current date
id: date
run: |
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- name: Build Assets
run: git ls-files | zip LME-${{ inputs.version }}.zip -@

- name: Build Changelog
id: release
uses: mikepenz/[email protected]
with:
toTag: "release-${{ inputs.version }}"
configuration: ".github/changelog-configuration.json"
failOnError: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Draft Release
uses: softprops/[email protected]
with:
name: LME v${{ inputs.version }}
tag_name: v${{ inputs.version }}
body: |
## [${{ inputs.version }}] - Timberrrrr! - ${{ env.date }}
${{ steps.release.outputs.changelog }}
files: LME-${{ inputs.version }}.zip
draft: true
prerelease: false
discussion_category_name: "Announcements"
generate_release_notes: false
fail_on_unmatched_files: true
100 changes: 100 additions & 0 deletions .github/workflows/burndown_chart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Burndown Chart

on:
workflow_dispatch:
inputs:
start_date:
description: 'Sprint start date (YYYY-MM-DD)'
required: true
default: '2024-05-09'
type: string
end_date:
description: 'Sprint end date (YYYY-MM-DD)'
required: true
default: '2024-05-25'
type: string
view:
description: 'View number'
required: true
default: '1'
type: string
pull_request:
branches:
- '*'

jobs:
create_chart:
runs-on: ubuntu-latest
env:
UNIQUE_ID:
start_date:
end_date:
view:

steps:
- name: Checkout repository
uses: actions/[email protected]

- name: Setup environment variables
run: |
echo "UNIQUE_ID=$(openssl rand -hex 3 | head -c 6)" >> $GITHUB_ENV

- name: Set default dates
if: github.event_name == 'pull_request'
run: |
echo "start_date=2024-05-09" >> $GITHUB_ENV
echo "end_date=2024-05-25" >> $GITHUB_ENV
echo "view=1" >> $GITHUB_ENV

- name: Use dispatch inputs
if: github.event_name == 'workflow_dispatch'
run: |
echo "start_date=${{ github.event.inputs.start_date }}" >> $GITHUB_ENV
echo "end_date=${{ github.event.inputs.end_date }}" >> $GITHUB_ENV
echo "view=${{ github.event.inputs.view }}" >> $GITHUB_ENV

- name: Run Docker Build
run: docker compose -p ${{ env.UNIQUE_ID }} -f testing/project_management/docker-compose.yml build burndown --no-cache

- name: Run Docker Compose
env:
BURNDOWN_TOKEN: ${{ secrets.BURNDOWN_TOKEN }}
run: docker compose -p ${{ env.UNIQUE_ID }} -f testing/project_management/docker-compose.yml up -d

- name: List docker containers to wait for them to start
run: |
docker ps

- name: Set up the burndown chart config
env:
BURNDOWN_TOKEN: ${{ secrets.BURNDOWN_TOKEN }}
UNIQUE_ID: ${{ env.UNIQUE_ID }}
START_DATE: ${{ env.start_date }}
END_DATE: ${{ env.end_date }}
VIEW: ${{ env.view }}
run: |
cd testing/project_management
docker compose -p ${{ env.UNIQUE_ID }} exec -T burndown bash -c '
/lme/testing/project_management/setup_config.sh -s ${{ env.START_DATE }} -e ${{ env.END_DATE }} -v ${{ env.VIEW }} -f /github-projects-burndown-chart/src/github_projects_burndown_chart/config/config.json
sed -i "s/\"github_token\": \"\"/\"github_token\": \"$BURNDOWN_TOKEN\"/g" /github-projects-burndown-chart/src/github_projects_burndown_chart/config/secrets.json
cat /github-projects-burndown-chart/src/github_projects_burndown_chart/config/config.json
'

- name: Run the burndown chart script
run: |
cd testing/project_management
docker compose -p ${{ env.UNIQUE_ID }} exec -T burndown bash -c '
python3 /github-projects-burndown-chart/src/github_projects_burndown_chart/main.py organization LME --filepath /lme/burndown.png
'
- name: Upload chart artifact
uses: actions/upload-artifact@v4
with:
name: burndown
path: burndown.png

- name: Cleanup Docker Compose
if: always()
run: |
cd testing/project_management
docker compose -p ${{ env.UNIQUE_ID }} down
# docker system prune -a --force
Loading