Skip to content

Commit

Permalink
initial rewrite of aws-nuke using libnuke
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Jan 16, 2024
1 parent cd21b0f commit cce744e
Show file tree
Hide file tree
Showing 501 changed files with 27,211 additions and 8,305 deletions.
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name-template: "v$RESOLVED_VERSION"
tag-template: "$RESOLVED_VERSION"
version-template: "$MAJOR.$MINOR.$PATCH"
version-resolver:
major:
labels:
- "major"
minor:
labels:
- "minor"
- "enhancement"
patch:
labels:
- "auto-update"
- "patch"
- "fix"
- "bugfix"
- "bug"
- "hotfix"
default: "minor"

categories:
- title: "🚀 Enhancements"
labels:
- "enhancement"
- "patch"
- title: "🐛 Bug Fixes"
labels:
- "fix"
- "bugfix"
- "bug"
- "hotfix"
- title: "🤖 Automatic Updates"
labels:
- "auto-update"

exclude-labels:
- "skip-changelog"

change-template: |
<details>
<summary>$TITLE @$AUTHOR (#$NUMBER)</summary>
$BODY
</details>
template: |
$CHANGES
replacers:
# Remove irrelevant information from Renovate bot
- search: '/---\s+^#.*Renovate configuration(?:.|\n)*?This PR has been generated .*/gm'
replace: ""
# Remove Renovate bot banner image
- search: '/\[!\[[^\]]*Renovate\][^\]]*\](\([^)]*\))?\s*\n+/gm'
replace: ""
60 changes: 60 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: docs

on:
workflow_dispatch:
push:
branches:
- main
paths:
- docs/**

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
- name: setup pages
uses: actions/configure-pages@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: setup cache
run: |
echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- name: handle cache
uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: install mkdocs material
run: |
pip install mkdocs-material
- name: run mkdocs material
run: |
mkdocs build
- name: upload artifact
uses: actions/upload-pages-artifact@v1
with:
# Upload entire repository
path: public/
- name: deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
24 changes: 24 additions & 0 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: release-drafter

on:
push:
branches:
- main
paths-ignore:
- .github/**
- docs/**

permissions:
contents: write
pull-requests: read

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
with:
publish: false
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.RELEASES_GITHUB_TOKEN }}
13 changes: 5 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
/vendor
/aws-nuke
/aws-nuke-*
/dist
/releases
/mocks
releases
.envrc
.idea
config.yaml
cosign.key
*-config.yaml
config*.yaml
*-config.yaml
config.*.yaml

20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# syntax=docker/dockerfile:1.3-labs
FROM alpine:3.14.3 as base
RUN apk add --no-cache ca-certificates
RUN useradd -D aws-nuke

FROM ghcr.io/acorn-io/images-mirror/golang:1.21 AS build
COPY / /src
WORKDIR /src
RUN \
--mount=type=cache,target=/go/pkg \
--mount=type=cache,target=/root/.cache/go-build \
go build -o bin/aws-nuke main.go

FROM base AS goreleaser
COPY aws-nuke /usr/local/bin/aws-nuke
USER aws-nuke

FROM base
COPY --from=build /src/bin/aws-nuke /usr/local/bin/aws-nuke
USER aws-nuke
9 changes: 0 additions & 9 deletions Dockerfile.goreleaser

This file was deleted.

22 changes: 17 additions & 5 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
The MIT License (MIT)

Copyright 2021 Erik Kristensen
Copyright 2016-2021 reBuy reCommerce GmbH
Copyright (c) 2016 reBuy reCommerce GmbH
Copyright (c) 2021 Erik Kristensen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
PACKAGE=github.com/rebuy-de/aws-nuke
docs-build:
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material build

include golang.mk
docs-serve:
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material

docs-seed:
cp README.md docs/index.md
Loading

0 comments on commit cce744e

Please sign in to comment.