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

71 configure GitHub ci #113

Merged
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
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: CI/CD Workflow

on:
push:
branches:
- main
paths:
- '**.yaml'
- '**/Dockerfile'
- '**/charts/**'
tags:
- 'v*'

env:
IMAGE_NGINX_CACHE: nginx-cache
REGISTRY: ghcr.io/${{ github.repository_owner }}
PUSH: 1
LOAD: 1
NGINX_CACHE_TAG: v0.1.0
TAG: v0.3.1
PLATFORM_ARCH: linux/amd64

jobs:
build-and-push:
name: Build Cozystack
runs-on: ubuntu-latest
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- name: Set up Docker Registry
run: |
if [ "$GITHUB_ACTIONS" = "true" ]; then
echo "REGISTRY=ghcr.io/${{ github.repository_owner }}" >> $GITHUB_ENV
else
echo "REGISTRY=localhost:5000/cozystack_local" >> $GITHUB_ENV
fi

- uses: actions/checkout@v3
- name: Build usig make
run: |
make

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
48 changes: 48 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Lint

on:
push:
branches: [ main ] # Lint only on pushes to the main branch
pull_request:
branches: [ main ] # Lint on PRs targeting the main branch

permissions:
contents: read

jobs:
lint:
name: Super-Linter
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Run Super-Linter
uses: github/super-linter@v4
env:
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false # Lint only changed files
VALIDATE_TERRAFORM: false # Disable Terraform linting (remove if you need it)
DEFAULT_BRANCH: main # Set your default branch
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Enable only the linters you need for your project
VALIDATE_JAVASCRIPT_ES: true
VALIDATE_PYTHON_BLACK: true
VALIDATE_HTML: false
VALIDATE_GO: false
VALIDATE_XML: false
VALIDATE_JAVA: false
VALIDATE_DOCKERFILE: false
# turn off JSCPD copy/paste detection, which results in lots of results for examples and devops repos
VALIDATE_JSCPD: false
# turn off shfmt shell formatter as we already have shellcheck
VALIDATE_SHELL_SHFMT: false
VALIDATE_EDITORCONFIG: false
# prevent Kubernetes CRD API's from causing kubeval to fail
# also change schema location to an up-to-date list
# https://github.com/yannh/kubernetes-json-schema/#kubeval
KUBERNETES_KUBEVAL_OPTIONS: --ignore-missing-schemas --schema-location https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/
7 changes: 7 additions & 0 deletions .github/workflows/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
# MD013/line-length - Line length
MD013:
# Number of characters, default is 80
line_length: 9999
# check code blocks?
code_blocks: false
55 changes: 55 additions & 0 deletions .github/workflows/linters/.yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@

yaml-files:
- '*.yaml'
- '*.yml'
- '.yamllint'

rules:
braces:
level: warning
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: 1
max-spaces-inside-empty: 5
brackets:
level: warning
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: 1
max-spaces-inside-empty: 5
colons:
level: warning
max-spaces-before: 0
max-spaces-after: 1
commas:
level: warning
max-spaces-before: 0
min-spaces-after: 1
max-spaces-after: 1
comments: disable
comments-indentation: disable
document-end: disable
document-start: disable
empty-lines:
level: warning
max: 2
max-start: 0
max-end: 0
hyphens:
level: warning
max-spaces-after: 1
indentation:
level: warning
spaces: consistent
indent-sequences: true
check-multi-line-strings: false
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: disable
new-lines:
type: unix
trailing-spaces: disable
line-length:
max: 130
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: false
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ repos:
make -C packages/system repo
make -C packages/apps repo
make -C packages/extra repo
mkdir -p _out/logos
cp ./packages/apps/*/logos/*.svg ./packages/extra/*/logos/*.svg _out/logos/

assets:
make -C packages/core/installer/ assets
3 changes: 3 additions & 0 deletions packages/apps/clickhouse/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.helmignore
/logos
/Makefile
2 changes: 1 addition & 1 deletion packages/apps/clickhouse/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: clickhouse
description: Managed ClickHouse service
icon: https://cdn.worldvectorlogo.com/logos/clickhouse.svg
icon: /logos/clickhouse.svg

# A chart can be either an 'application' or a 'library' chart.
#
Expand Down
1 change: 1 addition & 0 deletions packages/apps/clickhouse/logos/clickhouse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/apps/ferretdb/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.helmignore
/logos
/Makefile
2 changes: 1 addition & 1 deletion packages/apps/ferretdb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: ferretdb
description: Managed FerretDB service
icon: ferretdb.svg
icon: /logos/ferretdb.svg

# A chart can be either an 'application' or a 'library' chart.
#
Expand Down
54 changes: 54 additions & 0 deletions packages/apps/ferretdb/logos/ferretdb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 3 additions & 23 deletions packages/apps/http-cache/.helmignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
.helmignore
/logos
/Makefile
2 changes: 1 addition & 1 deletion packages/apps/http-cache/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: http-cache
description: Layer7 load balacner and caching service
icon: https://www.svgrepo.com/show/373924/nginx.svg
icon: /logos/nginx.svg

# A chart can be either an 'application' or a 'library' chart.
#
Expand Down
2 changes: 2 additions & 0 deletions packages/apps/http-cache/logos/nginx.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/apps/kafka/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.helmignore
/logos
/Makefile
2 changes: 1 addition & 1 deletion packages/apps/kafka/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: kafka
description: Managed Kafka service
icon: https://upload.wikimedia.org/wikipedia/commons/0/05/Apache_kafka.svg
icon: /logos/kafka.svg

# A chart can be either an 'application' or a 'library' chart.
#
Expand Down
1 change: 1 addition & 0 deletions packages/apps/kafka/logos/kafka.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 3 additions & 23 deletions packages/apps/kubernetes/.helmignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
.helmignore
/logos
/Makefile
2 changes: 1 addition & 1 deletion packages/apps/kubernetes/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: kubernetes
description: Managed Kubernetes service
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/Kubernetes_logo_without_workmark.svg/723px-Kubernetes_logo_without_workmark.svg.png
icon: /logos/kubernetes.svg

# A chart can be either an 'application' or a 'library' chart.
#
Expand Down
Loading