Set pipline for develop
This commit is contained in:
parent
647e6002a4
commit
218682d9a8
@ -1,9 +1,23 @@
|
|||||||
steps:
|
steps:
|
||||||
|
generate-tags-frontend:
|
||||||
|
name: Generate Tags for Frontend
|
||||||
|
image: ghcr.io/dvjn/woodpecker-docker-tags-plugin
|
||||||
|
when:
|
||||||
|
path:
|
||||||
|
include: [ frontend/** ]
|
||||||
|
settings:
|
||||||
|
tags: |
|
||||||
|
edge -b develop -v develop
|
||||||
|
edge -b master -v latest
|
||||||
|
sha
|
||||||
|
tags_file: .tags-frontend
|
||||||
|
|
||||||
build-frontend:
|
build-frontend:
|
||||||
name: Build & Push Frontend
|
name: Build & Push Frontend
|
||||||
image: woodpeckerci/plugin-kaniko
|
image: woodpeckerci/plugin-kaniko
|
||||||
|
depends_on: [ generate-tags-frontend ]
|
||||||
when:
|
when:
|
||||||
event: [ push, pull_request, tag ]
|
event: [ push ]
|
||||||
path:
|
path:
|
||||||
include: [ frontend/** ]
|
include: [ frontend/** ]
|
||||||
settings:
|
settings:
|
||||||
@ -11,21 +25,31 @@ steps:
|
|||||||
repo: my-apps/labmap-frontend
|
repo: my-apps/labmap-frontend
|
||||||
dockerfile: frontend/Dockerfile
|
dockerfile: frontend/Dockerfile
|
||||||
context: frontend
|
context: frontend
|
||||||
tags:
|
tags_file: .tags-frontend
|
||||||
- latest
|
|
||||||
- ${CI_COMMIT_SHA:0:7}
|
|
||||||
- ${CI_COMMIT_BRANCH=="develop" && echo "develop-${CI_COMMIT_SHA}" || echo "${CI_COMMIT_SHA:0:7}"}
|
|
||||||
username:
|
username:
|
||||||
from_secret: DOCKER_USERNAME
|
from_secret: DOCKER_USERNAME
|
||||||
password:
|
password:
|
||||||
from_secret: DOCKER_PASSWORD
|
from_secret: DOCKER_PASSWORD
|
||||||
|
|
||||||
|
generate-tags-backend:
|
||||||
|
name: Generate Tags for Backend
|
||||||
|
image: ghcr.io/dvjn/woodpecker-docker-tags-plugin
|
||||||
|
when:
|
||||||
|
path:
|
||||||
|
include: [ backend/** ]
|
||||||
|
settings:
|
||||||
|
tags: |
|
||||||
|
edge -b develop -v develop
|
||||||
|
edge -b master -v latest
|
||||||
|
sha
|
||||||
|
tags_file: .tags-backend
|
||||||
|
|
||||||
build-backend:
|
build-backend:
|
||||||
name: Build & Push Backend
|
name: Build & Push Backend
|
||||||
image: woodpeckerci/plugin-kaniko
|
image: woodpeckerci/plugin-kaniko
|
||||||
|
depends_on: [ generate-tags-backend ]
|
||||||
when:
|
when:
|
||||||
event: [ push, pull_request, tag ]
|
event: [ push ]
|
||||||
path:
|
path:
|
||||||
include: [ backend/** ]
|
include: [ backend/** ]
|
||||||
settings:
|
settings:
|
||||||
@ -33,10 +57,7 @@ steps:
|
|||||||
repo: my-apps/labmap-backend
|
repo: my-apps/labmap-backend
|
||||||
dockerfile: backend/Dockerfile
|
dockerfile: backend/Dockerfile
|
||||||
context: backend
|
context: backend
|
||||||
tags:
|
tags_file: .tags-backend
|
||||||
- latest
|
|
||||||
- ${CI_COMMIT_SHA:0:7}
|
|
||||||
- ${CI_COMMIT_BRANCH=="develop" && echo "develop-${CI_COMMIT_SHA}" || echo "${CI_COMMIT_SHA:0:7}"}
|
|
||||||
username:
|
username:
|
||||||
from_secret: DOCKER_USERNAME
|
from_secret: DOCKER_USERNAME
|
||||||
password:
|
password:
|
||||||
@ -70,7 +91,7 @@ steps:
|
|||||||
yq -i ".frontend.tag = \"$TAG\"" manifests/labmap/values.yaml
|
yq -i ".frontend.tag = \"$TAG\"" manifests/labmap/values.yaml
|
||||||
git add manifests/labmap/values.yaml
|
git add manifests/labmap/values.yaml
|
||||||
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 master
|
git push origin HEAD
|
||||||
|
|
||||||
update-values-backend:
|
update-values-backend:
|
||||||
name: Update backend tag in values.yaml
|
name: Update backend tag in values.yaml
|
||||||
@ -100,4 +121,4 @@ steps:
|
|||||||
yq -i ".backend.tag = \"$TAG\"" manifests/labmap/values.yaml
|
yq -i ".backend.tag = \"$TAG\"" manifests/labmap/values.yaml
|
||||||
git add manifests/labmap/values.yaml
|
git add manifests/labmap/values.yaml
|
||||||
git commit -m "backend: update tag to $TAG" || echo "No changes"
|
git commit -m "backend: update tag to $TAG" || echo "No changes"
|
||||||
git push origin master
|
git push origin HEAD
|
||||||
|
|||||||
@ -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