-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* move implementation to go * Go based implementation * dockerfile lints * use 1.22.5 only * go 1.22 * test refactor * dependabot ecosystem go * update lint action * action version bumps * add tests * add env var generation, tests, update readme * go mod 1.22 * build with signalilo * bump gh actions versions * add tests * add proxy doc * update doc
- Loading branch information
Showing
23 changed files
with
829 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
.github/workflows/release-container-image-with-signalilo.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Release Container Image - With Signalilo | ||
|
||
on: | ||
schedule: | ||
- cron: '3 3 * * *' | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- 'v*.*.*' | ||
|
||
jobs: | ||
container: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Configure Image Metadata | ||
id: meta | ||
uses: docker/metadata-action@v5 | ||
with: | ||
images: | | ||
quay.io/adfinis/scrubbed-signalilo | ||
tags: | | ||
type=schedule,pattern=nightly | ||
type=edge | ||
type=semver,pattern=v{{version}} | ||
type=semver,pattern=v{{major}} | ||
type=semver,pattern=v{{major}}.{{minor}} | ||
type=ref,event=pr | ||
- name: Login to quay.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USERNAME}} | ||
password: ${{ secrets.QUAY_ACCESS_TOKEN }} | ||
if: ${{ github.event_name != 'pull_request' }} | ||
|
||
- name: Build and push | ||
id: build | ||
uses: docker/build-push-action@v6 | ||
with: | ||
context: . | ||
file: ./Dockerfile.signalilo | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Security | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
permissions: | ||
contents: read | ||
jobs: | ||
scan: | ||
strategy: | ||
matrix: | ||
go: ["1.22.5"] | ||
fail-fast: true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Go ${{ matrix.go }} | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
cache: false | ||
|
||
- name: Run GoSec | ||
uses: securego/gosec@master | ||
with: | ||
args: -exclude-dir examples ./... | ||
|
||
- name: Run GoVulnCheck | ||
uses: golang/govulncheck-action@v1 | ||
with: | ||
go-version-input: ${{ matrix.go }} | ||
go-package: ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,35 @@ | ||
name: Test | ||
on: pull_request | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
permissions: | ||
contents: read | ||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
unit: | ||
strategy: | ||
matrix: | ||
go: ["1.22.5"] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
fail-fast: true | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
|
||
- name: Setup Go ${{ matrix.go }} | ||
uses: actions/setup-go@v5 | ||
with: | ||
python-version: 3.x | ||
- name: ruff | ||
run: | | ||
pip install -r requirements-dev.txt | ||
ruff format --check | ||
ruff check . --output-format=github | ||
shellcheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Run shellcheck | ||
id: shellcheck | ||
uses: ludeeus/[email protected] | ||
go-version: ${{ matrix.go }} | ||
cache: false | ||
|
||
- name: Run Tests | ||
run: go test -race -cover -coverprofile=coverage -covermode=atomic -v ./... | ||
|
||
# - name: Upload coverage to Codecov | ||
# uses: codecov/codecov-action@v4 | ||
# with: | ||
# files: ./coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Verify | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
permissions: | ||
contents: read | ||
jobs: | ||
lint: | ||
strategy: | ||
matrix: | ||
go: ["1.22.5"] | ||
fail-fast: true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Go ${{ matrix.go }} | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
cache: false | ||
|
||
- name: Run GolangCI-Lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.59 | ||
args: --timeout=5m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
__pycache__/ | ||
venv/ | ||
build/ | ||
dist/ | ||
*.spec | ||
.venv/ | ||
scrubbed | ||
coverage.coverprofile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
FROM docker.io/library/python:3.12 AS scrubbed | ||
FROM golang:1.22 AS builder | ||
|
||
WORKDIR /src | ||
|
||
COPY Makefile initenv.sh requirements.txt scrubbed.py . | ||
COPY go.mod go.sum . | ||
|
||
RUN make static | ||
RUN go mod download | ||
|
||
FROM quay.io/vshn/signalilo:v0.14.0 AS signalilo | ||
COPY *.go Makefile . | ||
|
||
FROM docker.io/library/debian:bookworm | ||
RUN make build | ||
|
||
COPY --from=signalilo /usr/local/bin/signalilo /usr/local/bin/ | ||
FROM registry.access.redhat.com/ubi9/ubi-micro:9.4 | ||
|
||
COPY --from=scrubbed /src/dist/scrubbed /usr/local/bin/ | ||
COPY --from=builder /src/scrubbed /usr/local/bin/ | ||
|
||
EXPOSE 8080 | ||
|
||
EXPOSE 8443 | ||
|
||
ENTRYPOINT ["/usr/local/bin/scrubbed"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM golang:1.22 AS builder | ||
|
||
WORKDIR /src | ||
|
||
COPY go.mod go.sum . | ||
|
||
RUN go mod download | ||
|
||
COPY *.go Makefile . | ||
|
||
RUN make build | ||
|
||
FROM quay.io/vshn/signalilo:v0.14.0 AS signalilo | ||
|
||
FROM registry.access.redhat.com/ubi9/ubi-micro:9.4 | ||
|
||
COPY --from=signalilo /usr/local/bin/signalilo /usr/local/bin/ | ||
|
||
COPY --from=builder /src/scrubbed /usr/local/bin/ | ||
|
||
EXPOSE 8080 | ||
|
||
EXPOSE 8443 | ||
|
||
ENTRYPOINT ["/usr/local/bin/scrubbed"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.