Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e535a75649 | |||
| a44aef5381 | |||
| 4a278b1419 | |||
| 698c977511 | |||
| 86108f5b75 | |||
| fb92b4c000 |
Vendored
+11
-8
@@ -1,5 +1,5 @@
|
|||||||
# FleetDM Stack - Gitea Actions
|
# FleetDM Stack - Gitea Actions
|
||||||
# CI: lint on every push
|
# CI: lint on every push (skips docs-only changes)
|
||||||
# Semantic Release: auto-bump version on push to main/master
|
# Semantic Release: auto-bump version on push to main/master
|
||||||
# - merge from feature/* branch → major bump
|
# - merge from feature/* branch → major bump
|
||||||
# - any other commit (fix, chore, etc.) → patch bump
|
# - any other commit (fix, chore, etc.) → patch bump
|
||||||
@@ -12,6 +12,14 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- master
|
- master
|
||||||
|
paths-ignore:
|
||||||
|
- 'docs/**'
|
||||||
|
- 'README.md'
|
||||||
|
- 'STATUS.md'
|
||||||
|
- 'AGENTS.md'
|
||||||
|
- 'TASKS.md'
|
||||||
|
- '.gitignore'
|
||||||
|
- 'djinni-*/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
@@ -24,7 +32,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 https://git.produktor.io/${{ gitea.repository }}.git .
|
git clone --depth=1 https://${{ gitea.actor }}:${{ gitea.token }}@git.produktor.io/${{ gitea.repository }}.git .
|
||||||
git checkout ${{ gitea.sha }}
|
git checkout ${{ gitea.sha }}
|
||||||
|
|
||||||
- name: Install Helm
|
- name: Install Helm
|
||||||
@@ -48,7 +56,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout (full history for tags)
|
- name: Checkout (full history for tags)
|
||||||
run: |
|
run: |
|
||||||
git clone https://git.produktor.io/${{ gitea.repository }}.git .
|
git clone https://${{ gitea.actor }}:${{ gitea.token }}@git.produktor.io/${{ gitea.repository }}.git .
|
||||||
git fetch --tags
|
git fetch --tags
|
||||||
|
|
||||||
- name: Determine version bump
|
- name: Determine version bump
|
||||||
@@ -60,13 +68,11 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
echo "Latest tag: $LATEST_TAG"
|
echo "Latest tag: $LATEST_TAG"
|
||||||
|
|
||||||
# Strip 'v' prefix and split
|
|
||||||
VER="${LATEST_TAG#v}"
|
VER="${LATEST_TAG#v}"
|
||||||
MAJOR=$(echo "$VER" | cut -d. -f1)
|
MAJOR=$(echo "$VER" | cut -d. -f1)
|
||||||
MINOR=$(echo "$VER" | cut -d. -f2)
|
MINOR=$(echo "$VER" | cut -d. -f2)
|
||||||
PATCH=$(echo "$VER" | cut -d. -f3)
|
PATCH=$(echo "$VER" | cut -d. -f3)
|
||||||
|
|
||||||
# Check if this commit is a merge from a feature/* branch
|
|
||||||
COMMIT_MSG=$(git log -1 --format='%s' ${{ gitea.sha }})
|
COMMIT_MSG=$(git log -1 --format='%s' ${{ gitea.sha }})
|
||||||
echo "Commit message: $COMMIT_MSG"
|
echo "Commit message: $COMMIT_MSG"
|
||||||
|
|
||||||
@@ -74,7 +80,6 @@ jobs:
|
|||||||
if echo "$COMMIT_MSG" | grep -qiE "^Merge.*feature/"; then
|
if echo "$COMMIT_MSG" | grep -qiE "^Merge.*feature/"; then
|
||||||
IS_FEATURE="true"
|
IS_FEATURE="true"
|
||||||
fi
|
fi
|
||||||
# Also check parent branches for merge commits
|
|
||||||
if git log -1 --format='%P' ${{ gitea.sha }} | grep -q ' '; then
|
if git log -1 --format='%P' ${{ gitea.sha }} | grep -q ' '; then
|
||||||
MERGE_BRANCH=$(git log -1 --format='%s' ${{ gitea.sha }} | grep -oE "feature/[^ '\"]*" || true)
|
MERGE_BRANCH=$(git log -1 --format='%s' ${{ gitea.sha }} | grep -oE "feature/[^ '\"]*" || true)
|
||||||
if [ -n "$MERGE_BRANCH" ]; then
|
if [ -n "$MERGE_BRANCH" ]; then
|
||||||
@@ -130,7 +135,6 @@ jobs:
|
|||||||
API="https://git.produktor.io/api/v1/repos/${{ gitea.repository }}/releases"
|
API="https://git.produktor.io/api/v1/repos/${{ gitea.repository }}/releases"
|
||||||
TOKEN="${{ gitea.token }}"
|
TOKEN="${{ gitea.token }}"
|
||||||
|
|
||||||
# Create release
|
|
||||||
RELEASE=$(curl -sf -X POST "$API" \
|
RELEASE=$(curl -sf -X POST "$API" \
|
||||||
-H "Authorization: token $TOKEN" \
|
-H "Authorization: token $TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
@@ -138,7 +142,6 @@ jobs:
|
|||||||
RELEASE_ID=$(echo "$RELEASE" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
|
RELEASE_ID=$(echo "$RELEASE" | grep -o '"id":[0-9]*' | head -1 | cut -d: -f2)
|
||||||
echo "Created release ID: $RELEASE_ID"
|
echo "Created release ID: $RELEASE_ID"
|
||||||
|
|
||||||
# Upload chart package
|
|
||||||
for f in .tmp/*.tgz; do
|
for f in .tmp/*.tgz; do
|
||||||
FNAME=$(basename "$f")
|
FNAME=$(basename "$f")
|
||||||
curl -sf -X POST "$API/$RELEASE_ID/assets?name=$FNAME" \
|
curl -sf -X POST "$API/$RELEASE_ID/assets?name=$FNAME" \
|
||||||
|
|||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
@@ -23,6 +23,8 @@ make verify
|
|||||||
make port-forward
|
make port-forward
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### 1. Create local cluster
|
### 1. Create local cluster
|
||||||
@@ -63,6 +65,10 @@ make port-forward FLEET_PORT=9090
|
|||||||
Open **https://localhost:8585** in your browser (accept the self-signed certificate).
|
Open **https://localhost:8585** in your browser (accept the self-signed certificate).
|
||||||
Fleet setup wizard will guide you through initial configuration.
|
Fleet setup wizard will guide you through initial configuration.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Teardown
|
## Teardown
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -162,5 +168,5 @@ tech-task/
|
|||||||
|
|
||||||
The architectural design document for "Company Inc." is in `docs/`:
|
The architectural design document for "Company Inc." is in `docs/`:
|
||||||
|
|
||||||
- [Architecture Design Document](docs/architecture-design-company-inc.md) — 1–2 page design (convert to PDF for submission)
|
- [Architecture Design Document](docs/architecture-design-company-inc.md) — 1-2 page design (convert to PDF for submission)
|
||||||
- [High-Level Diagram](docs/architecture-hld.md) — Mermaid diagrams (infra, CI/CD, network security)
|
- [High-Level Diagram](docs/architecture-hld.md) — Mermaid diagrams (infra, CI/CD, network security)
|
||||||
|
|||||||
@@ -106,6 +106,7 @@ flowchart TD
|
|||||||
|
|
||||||
Zero-downtime releases without duplicating infrastructure. Both versions run inside the **same GKE cluster**; the load balancer switches traffic atomically.
|
Zero-downtime releases without duplicating infrastructure. Both versions run inside the **same GKE cluster**; the load balancer switches traffic atomically.
|
||||||
|
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
flowchart LR
|
flowchart LR
|
||||||
LB[Load Balancer]
|
LB[Load Balancer]
|
||||||
@@ -113,7 +114,7 @@ flowchart LR
|
|||||||
LB -.->|0% traffic| Blue[Blue — v1.3.0<br/>new release]
|
LB -.->|0% traffic| Blue[Blue — v1.3.0<br/>new release]
|
||||||
Blue -.->|smoke tests pass| LB
|
Blue -.->|smoke tests pass| LB
|
||||||
```
|
```
|
||||||
|
---
|
||||||
| Phase | Action |
|
| Phase | Action |
|
||||||
|-------|--------|
|
|-------|--------|
|
||||||
| **Deploy** | New version deployed to the idle slot (blue) |
|
| **Deploy** | New version deployed to the idle slot (blue) |
|
||||||
@@ -207,7 +208,7 @@ Not everything in a "best practices" architecture is worth implementing on day o
|
|||||||
## 7. High-Level Architecture Diagram
|
## 7. High-Level Architecture Diagram
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
flowchart TB
|
flowchart TD
|
||||||
Users((Users))
|
Users((Users))
|
||||||
|
|
||||||
Users --> CDN[Cloud CDN<br/>Static Assets]
|
Users --> CDN[Cloud CDN<br/>Static Assets]
|
||||||
@@ -230,7 +231,7 @@ flowchart TB
|
|||||||
|
|
||||||
API --> Mongo
|
API --> Mongo
|
||||||
API --> Secrets
|
API --> Secrets
|
||||||
GKE --> Registry
|
GKE ----> Registry
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ flowchart TB
|
|||||||
|
|
||||||
Git --> Actions
|
Git --> Actions
|
||||||
Actions --> Registry
|
Actions --> Registry
|
||||||
Argo --> GKE
|
Argo ----> GKE
|
||||||
```
|
```
|
||||||
|
|
||||||
## Blue-Green Deployment Flow
|
## Blue-Green Deployment Flow
|
||||||
@@ -103,7 +103,7 @@ flowchart LR
|
|||||||
## Network Security Layers
|
## Network Security Layers
|
||||||
|
|
||||||
```mermaid
|
```mermaid
|
||||||
flowchart TD
|
flowchart LR
|
||||||
Internet((Internet)) --> FW[VPC Firewall<br/>Default deny]
|
Internet((Internet)) --> FW[VPC Firewall<br/>Default deny]
|
||||||
FW --> LB[Load Balancer<br/>HTTPS only]
|
FW --> LB[Load Balancer<br/>HTTPS only]
|
||||||
LB --> NP[K8s Network Policies]
|
LB --> NP[K8s Network Policies]
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 161 KiB |
Reference in New Issue
Block a user