Skip to content

Commit

Permalink
exodus
Browse files Browse the repository at this point in the history
  • Loading branch information
thekruzer committed Oct 20, 2020
0 parents commit 3ad652e
Show file tree
Hide file tree
Showing 52 changed files with 4,905 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Bug report
about: Report a bug encountered
title: ''
labels: kind/bug
assignees: ''

---

**What happened**:

**What you expected to happen**:

**How to reproduce it (as minimally and precisely as possible)**:

**Anything else we need to know?**:

**Environment**:
- Kubernetes version (use `kubectl version`):
- Cloud provider or configuration:
- Install tools:
- Others:
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Enhancement Request
about: Suggest an enhancement
title: ''
labels: kind/enhancement
assignees: ''

---
**What would you like to be added**:

**Why is this needed**:
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build On Push
on:
pull_request:
branches:
- master
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Download Build Dependencies
run: |
make get-bins
- name: Test
run: |
make test
- name: Build
run: |
make gorelease-snapshot
54 changes: 54 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "CodeQL"

on:
push:
branches: [master, ]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 8 * * 4'

jobs:
analyse:
name: Analyse
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
29 changes: 29 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- '*' # Push events to matching v*, i.e. v1.0, v20.15.10

jobs:
releaseme:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.13
- name: Build & Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
make get-bins
make codecov-report
make build
docker login -u kruzops -p ${{ secrets.DOCKERHUB_KRUZOPS_PASSWORD }}
make gorelease
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

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

build/*
dist/*
bin/*

.idea/
134 changes: 134 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
project_name: exodus
env:
#- GO111MODULE=on
#- GOPROXY=https://gocenter.io
before:
hooks:
# You may remove this if you don't use go modules.
#- go mod download
# you may remove this if you don't need go generate
#- go generate ./...
builds:
- env:
- CGO_ENABLED=0
flags:
# Custom ldflags templates.
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
ldflags:
- -s -w -X github.com/kruzio/exodus/cmd.Commit={{.Commit}} -X github.com/kruzio/exodus/cmd.Version={{.Version}}
# Binary name.
# Can be a path (e.g. `bin/app`) to wrap the binary in a directory.
# Default is the name of the project directory.
binary: exodus
# Path to main.go file or main package.
# Default is `.`.
main: main.go

goos:
- linux
- darwin
- windows
goarch:
#- 386
- amd64
#- arm
#- arm64
ignore:
- goos: darwin
goarch: 386
hooks:
post: /bin/bash hack/goreleaser-postbuild.sh

#signs:
# - artifacts: checksum

checksum:
name_template: '{{ .ProjectName }}_checksums.txt'

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- Merge pull request
- Merge branch

archives:
- id: default
builds:
- exodus
name_template: '{{ .ProjectName }}_v{{ .Major }}.{{ .Minor }}.{{ .Patch }}_{{ .Os }}_{{ .Arch }}'
format: binary

dockers:
- image_templates:
- 'kruzio/exodus:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}'
- 'kruzio/exodus:latest'
dockerfile: Dockerfile
binaries:
- exodus
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=repository=https://github.com/kruzio/exodus"
- "--label=homepage=https://github.com/kruzio/exodus"
- "--label=maintainer=Kruz.io <exodus@kruz.io>"
skip_push: false
- image_templates:
- 'kruzio/exodus:v{{ .Major }}.{{ .Minor }}.{{ .Patch }}-debug'
- 'kruzio/exodus:debug'
dockerfile: Dockerfile_debug
binaries:
- exodus
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=repository=https://github.com/kruzio/exodus"
- "--label=homepage=https://github.com/kruzio/exodus"
- "--label=maintainer=Kruz.io <support@kruz.io>"
skip_push: false

release:
# Repo in which the release will be created.
# Default is extracted from the origin remote URL.
# Note: it can only be one: either github or gitlab or gitea
github:
owner: kruzio
name: exodus

# If set to true, will not auto-publish the release.
# Default is false.
draft: false

# If set to auto, will mark the release as not ready for production
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
# If set to true, will mark the release as not ready for production.
# Default is false.
prerelease: true

# You can change the name of the GitHub release.
# Default is `{{.Tag}}`
name_template: "v{{ .Major }}.{{ .Minor }}.{{ .Patch }}"

# You can disable this pipe in order to not upload any artifacts to
# GitHub.
# Defaults to false.
#disable: true

# You can add extra pre-existing files to the release.
# The filename on the release will be the last part of the path (base). If
# another file with the same name exists, the latest one found will be used.
# Defaults to empty.
# extra_files:
# - glob: ./path/to/file.txt
# - glob: ./glob/**/to/**/file/**/*
# - glob: ./glob/foo/to/bar/file/foobar/override_from_previous


10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM alpine:latest AS build
RUN apk --no-cache --update add wget ca-certificates

FROM scratch

WORKDIR /
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY exodus /exodus

ENTRYPOINT ["/exodus"]
7 changes: 7 additions & 0 deletions Dockerfile_debug
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM alpine:latest
RUN apk --no-cache --update add bash wget ca-certificates

WORKDIR /
COPY exodus /exodus

ENTRYPOINT ["/exodus"]
Loading

0 comments on commit 3ad652e

Please sign in to comment.