You've already forked reloading-manager
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
b40edf70d4
|
|||
|
4f750ae15c
|
|||
|
3246450d77
|
|||
|
74681e01b3
|
|||
|
9dce6b8930
|
|||
|
7c02aa7148
|
|||
|
|
a8c470a474 | ||
|
95b626b439
|
|||
|
b9a6598e87
|
|||
|
4251a03139
|
|||
|
691a32ff56
|
|||
|
3631a4b5dc
|
|||
|
edbd5b4f49
|
|||
|
a20bef65ae
|
|||
| 4056e6705d | |||
|
fc4305f161
|
|||
| f0fc8b7707 |
@@ -1,7 +1,7 @@
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- '**'
|
- 'v*'
|
||||||
|
|
||||||
name: 🏗️ ✨ Build Workflow
|
name: 🏗️ ✨ Build Workflow
|
||||||
|
|
||||||
@@ -25,13 +25,13 @@ jobs:
|
|||||||
- name: 🔑 🔐 Login to Docker Hub
|
- name: 🔑 🔐 Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: 🔑 🛠️ Login to Siteworx Registry
|
- name: 🔑 🛠️ Login to Siteworx Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.SITEWORX_USERNAME }}
|
username: ${{ secrets.SITEWORX_USERNAME }}
|
||||||
password: ${{ secrets.SITEWORX_PASSWORD }}
|
password: ${{ secrets.SITEWORX_PASSWORD }}
|
||||||
registry: scr.siteworxpro.com
|
registry: scr.siteworxpro.com
|
||||||
|
|
||||||
@@ -77,13 +77,13 @@ jobs:
|
|||||||
- name: 🔑 🔐 Login to Docker Hub
|
- name: 🔑 🔐 Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
- name: 🔑 🛠️ Login to Siteworx Registry
|
- name: 🔑 🛠️ Login to Siteworx Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: ${{ vars.SITEWORX_USERNAME }}
|
username: ${{ secrets.SITEWORX_USERNAME }}
|
||||||
password: ${{ secrets.SITEWORX_PASSWORD }}
|
password: ${{ secrets.SITEWORX_PASSWORD }}
|
||||||
registry: scr.siteworxpro.com
|
registry: scr.siteworxpro.com
|
||||||
|
|
||||||
@@ -127,16 +127,25 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "## Do not edit this file directly. It is auto-generated by the script." > argocd/deployment/deployment.yml
|
echo "## Do not edit this file directly. It is auto-generated by the script." > argocd/deployment/deployment.yml
|
||||||
sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml >> argocd/deployment/deployment.yml
|
sed "s|__TAG__|${{ gitea.ref_name }}|g" argocd/template/deployment.yml >> argocd/deployment/deployment.yml
|
||||||
|
#
|
||||||
- name: 💾✅ Commit Updated Manifest
|
# - name: 💾 ✅ Commit Updated Manifest
|
||||||
uses: EndBug/add-and-commit@v9
|
# uses: EndBug/add-and-commit@v9
|
||||||
with:
|
# with:
|
||||||
new_branch: release/${{ gitea.ref_name }}-deploy
|
# new_branch: release/${{ gitea.ref_name }}-deploy
|
||||||
add: argocd/deployment/deployment.yml
|
# add: argocd/deployment/deployment.yml
|
||||||
author_name: "GitHub Action 🤖"
|
# author_name: "GitHub Action 🤖"
|
||||||
author_email: gitia@siteworxpro.com
|
# author_email: gitia@siteworxpro.com
|
||||||
message: "📝🔄 Update deployment manifest with new image tags"
|
# message: "📝 🔄 Update deployment manifest with new image tags"
|
||||||
|
|
||||||
- name: 🚀 ✨ Create Pull Request
|
- name: 🚀 ✨ Create Pull Request
|
||||||
id: cpr
|
id: cpr
|
||||||
uses: peter-evans/create-pull-request@v7
|
uses: peter-evans/create-pull-request@v7
|
||||||
|
env:
|
||||||
|
NODE_TLS_REJECT_UNAUTHORIZED: 0
|
||||||
|
with:
|
||||||
|
base: master
|
||||||
|
add-paths: argocd/deployment/deployment.yml
|
||||||
|
title: "🚀 ✨ Release ${GITHUB_REF_NAME} - Deploy"
|
||||||
|
branch: release/${{ gitea.ref_name }}-deploy
|
||||||
|
committer: "Gitea Action 🤖 <gitia@siteworxpro.com>"
|
||||||
|
body: "📝 🔄 Update deployment manifest with new image tags for release ${GITHUB_REF_NAME}"
|
||||||
@@ -1,4 +1,10 @@
|
|||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
test:
|
||||||
|
description: 'Run tests'
|
||||||
|
required: true
|
||||||
|
default: 'true'
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- "*"
|
- "*"
|
||||||
@@ -47,7 +53,7 @@ jobs:
|
|||||||
- name: ⚙️ 🐹 Set up Go Environment
|
- name: ⚙️ 🐹 Set up Go Environment
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: '1.24.0'
|
go-version: '1.24.3'
|
||||||
cache: true
|
cache: true
|
||||||
- name: 📖 🔍 Checkout Repository Code
|
- name: 📖 🔍 Checkout Repository Code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|||||||
@@ -9,8 +9,11 @@ stages:
|
|||||||
NodeJs Tests:
|
NodeJs Tests:
|
||||||
stage: Tests
|
stage: Tests
|
||||||
image: node:22.14.0
|
image: node:22.14.0
|
||||||
except:
|
rules:
|
||||||
- tags
|
- if: '$CI_PIPELINE_SOURCE == "push"'
|
||||||
|
changes:
|
||||||
|
- frontend/**
|
||||||
|
- frontend/.gitlab-ci.yml
|
||||||
before_script:
|
before_script:
|
||||||
- cd frontend
|
- cd frontend
|
||||||
- npm install
|
- npm install
|
||||||
@@ -21,6 +24,11 @@ include:
|
|||||||
- project: 'shared/blueprints'
|
- project: 'shared/blueprints'
|
||||||
file: 'jobs/golang-tests.yml'
|
file: 'jobs/golang-tests.yml'
|
||||||
ref: master
|
ref: master
|
||||||
|
rules:
|
||||||
|
- if: '$CI_PIPELINE_SOURCE == "push"'
|
||||||
|
changes:
|
||||||
|
- backend/**
|
||||||
|
- backend/.gitlab-ci.yml
|
||||||
inputs:
|
inputs:
|
||||||
job_name: "Go Tests"
|
job_name: "Go Tests"
|
||||||
working_directory: "backend"
|
working_directory: "backend"
|
||||||
@@ -62,6 +70,18 @@ include:
|
|||||||
context: "frontend"
|
context: "frontend"
|
||||||
dockerfile: "frontend/Dockerfile"
|
dockerfile: "frontend/Dockerfile"
|
||||||
|
|
||||||
|
- project: 'shared/blueprints'
|
||||||
|
file: 'jobs/trigger-argocd.yml'
|
||||||
|
ref: master
|
||||||
|
rules:
|
||||||
|
- changes:
|
||||||
|
- argocd/**/*
|
||||||
|
inputs:
|
||||||
|
stage: Trigger
|
||||||
|
argocdServer: ${ARGOCD_SERVER}
|
||||||
|
argocdAuthToken: ${ARGOCD_AUTH_TOKEN}
|
||||||
|
argocdAppName: ${ARGOCD_APP_NAME}
|
||||||
|
|
||||||
Update Deployment:
|
Update Deployment:
|
||||||
image: siteworxpro/alpine:3.21.3
|
image: siteworxpro/alpine:3.21.3
|
||||||
rules:
|
rules:
|
||||||
@@ -108,19 +128,8 @@ Create Merge Request:
|
|||||||
curl --request POST --header "PRIVATE-TOKEN: glpat-hv-uxCx3PDNKn7ihyXce" \
|
curl --request POST --header "PRIVATE-TOKEN: glpat-hv-uxCx3PDNKn7ihyXce" \
|
||||||
--data "source_branch=update-deployment-${CI_COMMIT_TAG}" \
|
--data "source_branch=update-deployment-${CI_COMMIT_TAG}" \
|
||||||
--data "target_branch=master" \
|
--data "target_branch=master" \
|
||||||
--data "title=Update deployment manifest with new image tags" \
|
--data "title=Update deployment manifest for version ${CI_COMMIT_TAG}" \
|
||||||
--data "description=This merge request updates the deployment manifest with the new image tags." \
|
--data "description=This merge request updates the deployment manifest with the new image tags." \
|
||||||
--data "remove_source_branch=true" \
|
--data "remove_source_branch=true" \
|
||||||
|
--data "squash_commits=true" \
|
||||||
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/merge_requests"
|
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/merge_requests"
|
||||||
|
|
||||||
Trigger ArgoCD:
|
|
||||||
stage: Trigger
|
|
||||||
image: siteworxpro/argocd:v2.14.10
|
|
||||||
rules:
|
|
||||||
- changes:
|
|
||||||
- argocd/deployment/*
|
|
||||||
variables:
|
|
||||||
ARGOCD_AUTH_TOKEN: ${ARGOCD_AUTH_TOKEN}
|
|
||||||
ARGOCD_SERVER: ${ARGOCD_SERVER}
|
|
||||||
script: |
|
|
||||||
argocd --grpc-web app sync ${ARGOCD_APP_NAME}
|
|
||||||
@@ -19,11 +19,11 @@ spec:
|
|||||||
- name: siteworxpro
|
- name: siteworxpro
|
||||||
containers:
|
containers:
|
||||||
- name: frontend
|
- name: frontend
|
||||||
image: scr.siteworxpro.com/reloading-manager/frontend:v0.0.27
|
image: scr.siteworxpro.com/reloading-manager/frontend:v0.0.31
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
- name: backend
|
- name: backend
|
||||||
image: scr.siteworxpro.com/reloading-manager/backend:v0.0.27
|
image: scr.siteworxpro.com/reloading-manager/backend:v0.0.31
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
envFrom:
|
envFrom:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM siteworxpro/golang:1.24.0 AS build
|
FROM siteworxpro/golang:1.24.3 AS build
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
module git.siteworxpro.com/reloading-manager/backend
|
module git.siteworxpro.com/reloading-manager/backend
|
||||||
|
|
||||||
go 1.24.0
|
go 1.24.3
|
||||||
|
|
||||||
require (
|
require (
|
||||||
git.siteworxpro.com/packages/go/utilities v1.3.0
|
git.siteworxpro.com/packages/go/utilities v1.3.0
|
||||||
|
|||||||
Reference in New Issue
Block a user