Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
cf16eb1
feat: adding container build and run with compose
Rauno-Newesis Oct 6, 2025
6892e7e
feat: testing during docker build
Rauno-Newesis Oct 6, 2025
b8d1d18
feat: adding cicd to build and publish images
Rauno-Newesis Oct 6, 2025
18fc967
fix: adding production target to lakepublisher
Rauno-Newesis Oct 6, 2025
3ffa0c3
feat: initial kubernetes plain manifests
Rauno-Newesis Oct 6, 2025
5765f59
feat: adding helm chart
Rauno-Newesis Oct 17, 2025
fa111df
chore: placeholders
Rauno-Newesis Oct 17, 2025
2a5da7a
chore: adding security check
Rauno-Newesis Oct 24, 2025
70c219e
fix: Fix Kubesec scan to handle multi-document YAML files and add err…
Rauno-Newesis Oct 24, 2025
02b0166
fix: update helm chart path on security scan
Rauno-Newesis Oct 24, 2025
66b09fa
feat: Replaced Kubesec with Checkov for better Kubernetes security sc…
Rauno-Newesis Oct 24, 2025
e946939
fix: Fix Checkov output file path and add file existence check
Rauno-Newesis Oct 24, 2025
1b60298
docs: adding comments to workflow files
Rauno-Newesis Oct 24, 2025
37ce923
chore: GitOps approach and IaC
Rauno-Newesis Oct 24, 2025
b8058d8
docs: adding DevSecOps readme
Rauno-Newesis Oct 24, 2025
0d4bc5c
Merge branch 'phase4/devsecops' into phase5/gitops
Rauno-Newesis Oct 27, 2025
67fb76c
feat: adding tflint
Rauno-Newesis Oct 27, 2025
292f42b
feat: adding sops for secrets management
Rauno-Newesis Oct 27, 2025
2500e22
feat: stg and prod deploy model
Rauno-Newesis Oct 27, 2025
cb1b9ba
feat: semantic version
Rauno-Newesis Oct 27, 2025
bb2cbba
feat: renovate to manage dependencies
Rauno-Newesis Oct 27, 2025
aa72095
fix: gitignore update
Rauno-Newesis Oct 27, 2025
ba470e3
Merge branch 'phase5/gitops' into phase6/secrets-management
Rauno-Newesis Oct 27, 2025
571f17d
fix: gitignore correction
Rauno-Newesis Oct 27, 2025
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
4 changes: 4 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>raunodepasquale/containersandorchestratorlab:renovate.json"]
}
130 changes: 130 additions & 0 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Build and Push Docker Images Workflow
# Builds production Docker images and pushes them to GitHub Container Registry
# Only runs after PR approval (on main/develop branch push) to ensure security validation

name: Build and Push Images

# Trigger Configuration
# Supports both automatic builds and semantic version releases
on:
workflow_dispatch: # Manual triggering with version support
inputs:
version_tag:
description: 'Semantic version tag (e.g., v1.2.3)'
required: false
type: string
deploy_to_staging:
description: 'Deploy to staging after build'
required: false
default: 'false'
type: choice
options:
- 'true'
- 'false'
push:
paths:
- 'packages/**' # Only trigger when application code changes
branches:
- main # Production branch
- develop # Development branch

# Environment variables for container registry
env:
REGISTRY: ghcr.io # GitHub Container Registry
IMAGE_NAME: ${{ github.repository }} # Use repository name as base image name

jobs:
# Job: Build and Push Container Images
# Builds production-ready Docker images and pushes to registry
build-and-push:
runs-on: ubuntu-latest

# Required permissions for GitHub Container Registry
permissions:
contents: read # Read repository contents
packages: write # Push to GitHub Container Registry

# Build all 4 services in parallel using matrix strategy
strategy:
matrix:
service: [backend, frontend, processor, lakepublisher]

steps:
# Get the source code
- name: Checkout
uses: actions/checkout@v4

# Authenticate with GitHub Container Registry
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }} # ghcr.io
username: ${{ github.actor }} # GitHub username
password: ${{ secrets.GITHUB_TOKEN }} # Automatic GitHub token

# Determine version and tags
- name: Determine version and tags
id: version
run: |
if [ -n "${{ github.event.inputs.version_tag }}" ]; then
# Manual dispatch with semantic version
VERSION_TAG="${{ github.event.inputs.version_tag }}"
TAGS="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.service }}:${VERSION_TAG}"
TAGS="${TAGS},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.service }}:latest"
echo "Using semantic version: $VERSION_TAG"
else
# Automatic build with commit-based tags
if [ "${{ github.ref_name }}" = "main" ]; then
TAGS="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.service }}:main-${{ github.sha }}"
TAGS="${TAGS},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.service }}:latest"
else
TAGS="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.service }}:${{ github.ref_name }}-${{ github.sha }}"
fi
VERSION_TAG="${{ github.ref_name }}-${{ github.sha }}"
fi

echo "tags=$TAGS" >> $GITHUB_OUTPUT
echo "version_tag=$VERSION_TAG" >> $GITHUB_OUTPUT
echo "Generated tags: $TAGS"

# Extract metadata for labels
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.service }}

# Build Docker image and push to registry
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./packages/${{ matrix.service }} # Build context for each service
target: production # Use production stage (runs tests first)
push: true # Push to registry
tags: ${{ steps.version.outputs.tags }} # Apply version-based tags
labels: ${{ steps.meta.outputs.labels }} # Apply metadata labels
build-args: |
VERSION=${{ steps.version.outputs.version_tag }}
BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
VCS_REF=${{ github.sha }}

# Job 2: Trigger Staging Deployment (if requested)
trigger-staging:
runs-on: ubuntu-latest
needs: build-and-push
if: github.event.inputs.deploy_to_staging == 'true' && github.event.inputs.version_tag != ''

steps:
- name: Trigger staging deployment
uses: actions/github-script@v7
with:
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'deploy-staging.yml',
ref: 'main',
inputs: {
image_tag: '${{ github.event.inputs.version_tag }}'
}
});
Loading