Compare commits
2 commits
becc5b22c0
...
7ecd1ba594
Author | SHA1 | Date | |
---|---|---|---|
7ecd1ba594 | |||
a7a0c55f7a |
5 changed files with 103 additions and 118 deletions
12
.github/FUNDING.yml
vendored
12
.github/FUNDING.yml
vendored
|
@ -1,12 +0,0 @@
|
||||||
# These are supported funding model platforms
|
|
||||||
|
|
||||||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
|
||||||
patreon: # Replace with a single Patreon username
|
|
||||||
open_collective: # Replace with a single Open Collective username
|
|
||||||
ko_fi: # Replace with a single Ko-fi username
|
|
||||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
||||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
||||||
liberapay: # Replace with a single Liberapay username
|
|
||||||
issuehunt: # Replace with a single IssueHunt username
|
|
||||||
otechie: # Replace with a single Otechie username
|
|
||||||
custom: [ "https://www.buymeacoffee.com/phntxx" ]
|
|
106
.github/workflows/main.yml
vendored
106
.github/workflows/main.yml
vendored
|
@ -1,106 +0,0 @@
|
||||||
name: Tests and push apps
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
|
|
||||||
style:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@master
|
|
||||||
|
|
||||||
- name: Setup node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '16'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
uses: borales/actions-yarn@v5.0.0
|
|
||||||
with:
|
|
||||||
cmd: install
|
|
||||||
|
|
||||||
- name: Check code formatting
|
|
||||||
uses: borales/actions-yarn@v5.0.0
|
|
||||||
with:
|
|
||||||
cmd: prettier --check
|
|
||||||
|
|
||||||
- name: Check code linting
|
|
||||||
uses: borales/actions-yarn@v5.0.0
|
|
||||||
with:
|
|
||||||
cmd: lint
|
|
||||||
|
|
||||||
dashboard:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@master
|
|
||||||
|
|
||||||
- name: Setup node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '16'
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
uses: borales/actions-yarn@v5.0.0
|
|
||||||
with:
|
|
||||||
cmd: install
|
|
||||||
|
|
||||||
- name: Check code typing
|
|
||||||
uses: borales/actions-yarn@v5.0.0
|
|
||||||
with:
|
|
||||||
cmd: typecheck
|
|
||||||
|
|
||||||
- name: Run unit tests
|
|
||||||
uses: borales/actions-yarn@v5.0.0
|
|
||||||
with:
|
|
||||||
cmd: test --coverage
|
|
||||||
|
|
||||||
- name: Codecov
|
|
||||||
uses: codecov/codecov-action@v4
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
fail_ci_if_error: true
|
|
||||||
verbose: true
|
|
||||||
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [style, dashboard]
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@master
|
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Login to DockerHub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Build and push
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
push: true
|
|
||||||
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
|
|
||||||
tags: |
|
|
||||||
phntxx/dashboard:latest
|
|
||||||
ghcr.io/phntxx/dashboard:latest
|
|
32
.woodpecker/.build.yaml
Normal file
32
.woodpecker/.build.yaml
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
steps:
|
||||||
|
- name: docker
|
||||||
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
|
settings:
|
||||||
|
registry: git.ar21.de
|
||||||
|
username:
|
||||||
|
from_secret: REGISTRY_USER
|
||||||
|
password:
|
||||||
|
from_secret: REGISTRY_PASS
|
||||||
|
repo: git.ar21.de/yolokube/dashboard
|
||||||
|
tags:
|
||||||
|
- latest
|
||||||
|
- ${CI_PIPELINE_NUMBER}
|
||||||
|
when:
|
||||||
|
- branch: master
|
||||||
|
event: push
|
||||||
|
- name: docker-staging
|
||||||
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
|
settings:
|
||||||
|
registry: git.ar21.de
|
||||||
|
username:
|
||||||
|
from_secret: REGISTRY_USER
|
||||||
|
password:
|
||||||
|
from_secret: REGISTRY_PASS
|
||||||
|
repo: git.ar21.de/yolokube/dashboard
|
||||||
|
tags:
|
||||||
|
- staging
|
||||||
|
- staging-${CI_PIPELINE_NUMBER}
|
||||||
|
when:
|
||||||
|
- branch:
|
||||||
|
exclude: master
|
||||||
|
event: push
|
51
.woodpecker/.deploy.yaml
Normal file
51
.woodpecker/.deploy.yaml
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
steps:
|
||||||
|
- name: bump tag in deployment-repo (prod)
|
||||||
|
image: git.ar21.de/aaron/kustomize-ci
|
||||||
|
commands:
|
||||||
|
- git clone https://git.ar21.de/yolokube/core-deployments.git deployment-repo
|
||||||
|
- kustomize edit set image git.ar21.de/yolokube/dashboard=git.ar21.de/yolokube/dashboard:${CI_PIPELINE_NUMBER} deployment-repo/dashboard/overlays/prod
|
||||||
|
when:
|
||||||
|
- branch: master
|
||||||
|
event: push
|
||||||
|
- name: bump tag in deployment-repo (staging)
|
||||||
|
image: git.ar21.de/aaron/kustomize-ci
|
||||||
|
commands:
|
||||||
|
- git clone https://git.ar21.de/yolokube/core-deployments.git deployment-repo
|
||||||
|
- cd /deployment-repo/dashboard/overlays/staging
|
||||||
|
- kustomize edit set image git.ar21.de/yolokube/dashboard=git.ar21.de/yolokube/dashboard:staging-${CI_PIPELINE_NUMBER}
|
||||||
|
when:
|
||||||
|
- branch:
|
||||||
|
exclude: master
|
||||||
|
event: push
|
||||||
|
- name: push new tag to deployment-repo (prod)
|
||||||
|
image: appleboy/drone-git-push
|
||||||
|
settings:
|
||||||
|
branch: main
|
||||||
|
remote: ssh://git@git.ar21.de:2222/yolokube/core-deployments.git
|
||||||
|
path: deployment-repo
|
||||||
|
force: false
|
||||||
|
commit: true
|
||||||
|
commit_message: "DASHBOARD: update image tag to ${CI_PIPELINE_NUMBER} (done automagically via Woodpecker pipeline)"
|
||||||
|
ssh_key:
|
||||||
|
from_secret: FORGEJO_SSH_KEY
|
||||||
|
when:
|
||||||
|
- branch: master
|
||||||
|
event: push
|
||||||
|
- name: push new tag to deployment-repo (staging)
|
||||||
|
image: appleboy/drone-git-push
|
||||||
|
settings:
|
||||||
|
branch: main
|
||||||
|
remote: ssh://git@git.ar21.de:2222/yolokube/core-deployments.git
|
||||||
|
path: deployment-repo
|
||||||
|
force: false
|
||||||
|
commit: true
|
||||||
|
commit_message: "DASHBOARD STAGING: update image tag to stagint-${CI_PIPELINE_NUMBER} (done automagically via Woodpecker pipeline)"
|
||||||
|
ssh_key:
|
||||||
|
from_secret: FORGEJO_SSH_KEY
|
||||||
|
when:
|
||||||
|
- branch:
|
||||||
|
exclude: master
|
||||||
|
event: push
|
||||||
|
depends_on:
|
||||||
|
- build
|
||||||
|
- test
|
20
.woodpecker/.test.yaml
Normal file
20
.woodpecker/.test.yaml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
steps:
|
||||||
|
- name: test (prod)
|
||||||
|
image: git.ar21.de/yolokube/dashboard:${CI_PIPELINE_NUMBER}
|
||||||
|
commands:
|
||||||
|
- nginx
|
||||||
|
- curl -fsS -m 10 --retry 5 -o /dev/null http://localhost:8080
|
||||||
|
when:
|
||||||
|
- branch: master
|
||||||
|
event: push
|
||||||
|
- name: test (staging)
|
||||||
|
image: git.ar21.de/yolokube/dashboard:staging-${CI_PIPELINE_NUMBER}
|
||||||
|
commands:
|
||||||
|
- nginx
|
||||||
|
- curl -fsS -m 10 --retry 5 -o /dev/null http://localhost:8080
|
||||||
|
when:
|
||||||
|
- branch:
|
||||||
|
exclude: master
|
||||||
|
event: push
|
||||||
|
depends_on:
|
||||||
|
- build
|
Loading…
Reference in a new issue