Set pipline for develop
This commit is contained in:
parent
70f2f54548
commit
2398544648
@ -1,14 +1,17 @@
|
|||||||
steps:
|
steps:
|
||||||
# ✅ Print available ENV vars for debugging
|
|
||||||
debug-env:
|
debug-env:
|
||||||
|
name: debug-env
|
||||||
image: alpine
|
image: alpine
|
||||||
|
when:
|
||||||
|
event: [ push ]
|
||||||
commands:
|
commands:
|
||||||
- echo "🔍 Available ENV variables:"
|
- echo "🔍 Available ENV variables:"
|
||||||
- printenv | sort
|
- printenv | sort
|
||||||
|
|
||||||
# 🔧 FRONTEND
|
# === FRONTEND ===
|
||||||
|
|
||||||
generate-tags-frontend:
|
generate-tags-frontend:
|
||||||
|
name: generate-tags-frontend
|
||||||
image: ghcr.io/dvjn/woodpecker-docker-tags-plugin
|
image: ghcr.io/dvjn/woodpecker-docker-tags-plugin
|
||||||
when:
|
when:
|
||||||
event: [ push ]
|
event: [ push ]
|
||||||
@ -23,19 +26,23 @@ steps:
|
|||||||
tags_file: .tags-frontend
|
tags_file: .tags-frontend
|
||||||
|
|
||||||
print-tags-frontend:
|
print-tags-frontend:
|
||||||
|
name: print-tags-frontend
|
||||||
image: alpine
|
image: alpine
|
||||||
|
when:
|
||||||
|
event: [ push ]
|
||||||
depends_on: [ generate-tags-frontend ]
|
depends_on: [ generate-tags-frontend ]
|
||||||
commands:
|
commands:
|
||||||
- echo "🔥 Tags to push for frontend:"
|
- echo "🔥 Tags to push for frontend:"
|
||||||
- cat .tags-frontend
|
- cat .tags-frontend
|
||||||
|
|
||||||
build-frontend:
|
build-frontend:
|
||||||
|
name: build-frontend
|
||||||
image: woodpeckerci/plugin-kaniko
|
image: woodpeckerci/plugin-kaniko
|
||||||
depends_on: [ print-tags-frontend ]
|
|
||||||
when:
|
when:
|
||||||
event: [ push ]
|
event: [ push ]
|
||||||
path:
|
path:
|
||||||
include: [ frontend/** ]
|
include: [ frontend/** ]
|
||||||
|
depends_on: [ print-tags-frontend ]
|
||||||
settings:
|
settings:
|
||||||
registry: harbor.dvirlabs.com
|
registry: harbor.dvirlabs.com
|
||||||
repo: my-apps/labmap-frontend
|
repo: my-apps/labmap-frontend
|
||||||
@ -48,12 +55,13 @@ steps:
|
|||||||
from_secret: DOCKER_PASSWORD
|
from_secret: DOCKER_PASSWORD
|
||||||
|
|
||||||
update-values-frontend:
|
update-values-frontend:
|
||||||
|
name: update-values-frontend
|
||||||
image: alpine:3.19
|
image: alpine:3.19
|
||||||
depends_on: [ build-frontend ]
|
|
||||||
when:
|
when:
|
||||||
event: [ push ]
|
event: [ push ]
|
||||||
path:
|
path:
|
||||||
include: [ frontend/** ]
|
include: [ frontend/** ]
|
||||||
|
depends_on: [ build-frontend ]
|
||||||
environment:
|
environment:
|
||||||
GIT_USERNAME:
|
GIT_USERNAME:
|
||||||
from_secret: GIT_USERNAME
|
from_secret: GIT_USERNAME
|
||||||
@ -63,7 +71,7 @@ steps:
|
|||||||
- apk add --no-cache git yq
|
- apk add --no-cache git yq
|
||||||
- git config --global user.name "woodpecker-bot"
|
- git config --global user.name "woodpecker-bot"
|
||||||
- git config --global user.email "ci@dvirlabs.com"
|
- git config --global user.email "ci@dvirlabs.com"
|
||||||
- git clone "https://$${GIT_USERNAME}:$${GIT_TOKEN}@git.dvirlabs.com/dvirlabs/my-apps.git"
|
- git clone "https://${GIT_USERNAME}:${GIT_TOKEN}@git.dvirlabs.com/dvirlabs/my-apps.git"
|
||||||
- cd my-apps
|
- cd my-apps
|
||||||
- |
|
- |
|
||||||
if [ "$CI_COMMIT_BRANCH" = "develop" ]; then
|
if [ "$CI_COMMIT_BRANCH" = "develop" ]; then
|
||||||
@ -77,9 +85,10 @@ steps:
|
|||||||
git commit -m "frontend: update tag to $TAG" || echo "No changes"
|
git commit -m "frontend: update tag to $TAG" || echo "No changes"
|
||||||
git push origin HEAD
|
git push origin HEAD
|
||||||
|
|
||||||
# 🔧 BACKEND
|
# === BACKEND ===
|
||||||
|
|
||||||
generate-tags-backend:
|
generate-tags-backend:
|
||||||
|
name: generate-tags-backend
|
||||||
image: ghcr.io/dvjn/woodpecker-docker-tags-plugin
|
image: ghcr.io/dvjn/woodpecker-docker-tags-plugin
|
||||||
when:
|
when:
|
||||||
event: [ push ]
|
event: [ push ]
|
||||||
@ -94,19 +103,23 @@ steps:
|
|||||||
tags_file: .tags-backend
|
tags_file: .tags-backend
|
||||||
|
|
||||||
print-tags-backend:
|
print-tags-backend:
|
||||||
|
name: print-tags-backend
|
||||||
image: alpine
|
image: alpine
|
||||||
|
when:
|
||||||
|
event: [ push ]
|
||||||
depends_on: [ generate-tags-backend ]
|
depends_on: [ generate-tags-backend ]
|
||||||
commands:
|
commands:
|
||||||
- echo "🔥 Tags to push for backend:"
|
- echo "🔥 Tags to push for backend:"
|
||||||
- cat .tags-backend
|
- cat .tags-backend
|
||||||
|
|
||||||
build-backend:
|
build-backend:
|
||||||
|
name: build-backend
|
||||||
image: woodpeckerci/plugin-kaniko
|
image: woodpeckerci/plugin-kaniko
|
||||||
depends_on: [ print-tags-backend ]
|
|
||||||
when:
|
when:
|
||||||
event: [ push ]
|
event: [ push ]
|
||||||
path:
|
path:
|
||||||
include: [ backend/** ]
|
include: [ backend/** ]
|
||||||
|
depends_on: [ print-tags-backend ]
|
||||||
settings:
|
settings:
|
||||||
registry: harbor.dvirlabs.com
|
registry: harbor.dvirlabs.com
|
||||||
repo: my-apps/labmap-backend
|
repo: my-apps/labmap-backend
|
||||||
@ -119,12 +132,13 @@ steps:
|
|||||||
from_secret: DOCKER_PASSWORD
|
from_secret: DOCKER_PASSWORD
|
||||||
|
|
||||||
update-values-backend:
|
update-values-backend:
|
||||||
|
name: update-values-backend
|
||||||
image: alpine:3.19
|
image: alpine:3.19
|
||||||
depends_on: [ build-backend ]
|
|
||||||
when:
|
when:
|
||||||
event: [ push ]
|
event: [ push ]
|
||||||
path:
|
path:
|
||||||
include: [ backend/** ]
|
include: [ backend/** ]
|
||||||
|
depends_on: [ build-backend ]
|
||||||
environment:
|
environment:
|
||||||
GIT_USERNAME:
|
GIT_USERNAME:
|
||||||
from_secret: GIT_USERNAME
|
from_secret: GIT_USERNAME
|
||||||
@ -134,7 +148,7 @@ steps:
|
|||||||
- apk add --no-cache git yq
|
- apk add --no-cache git yq
|
||||||
- git config --global user.name "woodpecker-bot"
|
- git config --global user.name "woodpecker-bot"
|
||||||
- git config --global user.email "ci@dvirlabs.com"
|
- git config --global user.email "ci@dvirlabs.com"
|
||||||
- git clone "https://$${GIT_USERNAME}:$${GIT_TOKEN}@git.dvirlabs.com/dvirlabs/my-apps.git"
|
- git clone "https://${GIT_USERNAME}:${GIT_TOKEN}@git.dvirlabs.com/dvirlabs/my-apps.git"
|
||||||
- cd my-apps
|
- cd my-apps
|
||||||
- |
|
- |
|
||||||
if [ "$CI_COMMIT_BRANCH" = "develop" ]; then
|
if [ "$CI_COMMIT_BRANCH" = "develop" ]; then
|
||||||
|
|||||||
@ -81,5 +81,6 @@ def list_icons():
|
|||||||
return categories
|
return categories
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
uvicorn.run(app, host="0.0.0.0", port=8000)
|
uvicorn.run(app, host="0.0.0.0", port=8000)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user