Skip to content

Commit

Permalink
Merge pull request #638 from tailwarden/develop
Browse files Browse the repository at this point in the history
v3.0.7 release 🚀
  • Loading branch information
mlabouardy authored Mar 17, 2023
2 parents 866b55f + be5dd6d commit ab4ac69
Show file tree
Hide file tree
Showing 77 changed files with 1,862 additions and 884 deletions.
149 changes: 0 additions & 149 deletions .circleci/config.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/build_test_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "Build and Test Komiser PRs"
on: pull_request

jobs:
build_test_dashboard:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
cache-dependency-path: "dashboard/package-lock.json"

- run: npm ci
working-directory: dashboard

- run: npm run lint
working-directory: dashboard

- run: npm test
working-directory: dashboard

- run: npm run build
working-directory: dashboard

build_test_cli:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.20.2

# FIXME: https://github.com/golangci/golangci-lint-action/issues/677
# - name: golangci-lint
# uses: golangci/golangci-lint-action@v3
# with:
# skip-pkg-cache: true

- name: Install dependencies
run: go mod download

- name: Test
run: make test

- name: Build
run: make build
77 changes: 77 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: "Release Komiser"
on:
push:
# run only against tags
tags:
- "*"

jobs:
build_frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
cache-dependency-path: "dashboard/package-lock.json"

- run: npm ci
working-directory: dashboard

- run: npm run build
working-directory: dashboard

- uses: actions/upload-artifact@v3
with:
name: dashboard-build
path: dashboard/out

build_komiser:
runs-on: ubuntu-latest
needs: build_frontend
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- run: git fetch --force --tags

- uses: actions/setup-go@v4
with:
go-version: ">=1.20.2"
cache: true

- name: Install go-bin-data
run: |
go install -a -v github.com/go-bindata/go-bindata/...@latest
go install -v github.com/elazarl/go-bindata-assetfs/...
- uses: actions/download-artifact@v3
with:
name: dashboard-build
path: out

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_LOGIN }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ bin
*.db

.vscode/
.env
.env
dist/
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
run:
timeout: 5m
skip-dirs:
- dashboard
75 changes: 75 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
before:
hooks:
- go mod tidy
- go-bindata-assetfs -o internal/api/v1/template.go out/...
- sed -i -e 's/package main/package v1/g' internal/api/v1/template.go
builds:
- env:
- CGO_ENABLED=0
goos:
- darwin
- linux
- windows
goarch:
- amd64
- arm64

blobs:
- provider: s3
bucket: komiser-releases
folder: "/{{.Version}}"

brews:
- tap:
owner: tailwarden
name: homebrew-komiser
branch: master
folder: Formula
homepage: "https://komiser.io"
description: "Komiser.io command line interface"
url_template: "https://cli.komiser.io/{{ .Tag }}/{{ .ArtifactName }}"

dockers:
- image_templates:
- tailwarden/komiser:{{ .Tag }}
- tailwarden/komiser:latest
- tailwarden/komiser:{{ .FullCommit }}
use: buildx
build_flag_templates:
- "--platform linux/amd64,linux/arm64"
- "--build-arg SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY"

release:
github:
owner: tailwarden
name: komiser
draft: true

archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
# use zip for windows archives
format_overrides:
- goos: windows
format: zip
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
# The lines beneath this are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
3 changes: 2 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ We are always thrilled to receive pull requests, and do our best to process them

## Guidelines

We recommend discussing your plans on our Discord (join our <a href="https://discord.oraculi.io/">community server</a>) head to the `contributors` section before starting to code - especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give feedback on your design, and maybe point out if someone else is working on the same thing.
We recommend discussing your plans on our Discord (join our <a href="https://discord.tailwarden.com">community server</a>) head to the `contributors` section before starting to code - especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give feedback on your design, and maybe point out if someone else is working on the same thing.

Any significant improvements should be documented as a github issue before anybody starts working on it. Please take a moment to check that an issue doesn’t already exist documenting your bug report or improvement proposal. If it does, it never hurts to add a quick “+1” or “I have this problem too”. This will help prioritize the most common problems and requests

Expand All @@ -19,6 +19,7 @@ Fork the repo and make changes on your fork in a feature branch based on the mas
- Submit unit tests for your changes. Go has a great test framework built in; use it! Take a look at existing tests for inspiration. Run the full test suite on your branch before submitting a pull request.
- Make sure you include relevant updates or additions to documentation when creating or modifying features.
- Write clean code. Universally formatted code promotes ease of writing, reading, and maintenance. Always run go fmt before committing your changes. Most editors have plugins that do this automatically.
- While submitting Pull Request, Always remember to change the base branch from <a href="https://github.com/tailwarden/komiser/tree/master">master</a> to <a href="https://github.com/tailwarden/komiser/tree/develop">develop</a>. This will keep your Pull Request away from conflicts. **Master brach always reflects the releases and major fixes, So that it can be used by the end users.**

## How to add a new cloud provider?

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MAINTAINER mlabouardy <mohamed@tailwarden.com>
RUN echo "Running on $BUILDPLATFORM, building for $TARGETPLATFORM" > /log

ENV SEGMENT_WRITE_KEY $SEGMENT_WRITE_KEY
ENV VERSION 3.0.6
ENV VERSION 3.0.7

RUN apk update && apk add curl
RUN curl -L https://cli.komiser.io/$VERSION/linux/komiser -o /usr/bin/komiser && \
Expand Down
Loading

0 comments on commit ab4ac69

Please sign in to comment.