Try to build the frontend and the backend and see if its update
This commit is contained in:
parent
9a4d812970
commit
6258127fb0
@ -39,11 +39,13 @@ steps:
|
|||||||
password:
|
password:
|
||||||
from_secret: DOCKER_PASSWORD
|
from_secret: DOCKER_PASSWORD
|
||||||
|
|
||||||
update-values:
|
update-values-frontend:
|
||||||
name: Update my-apps image tag
|
name: Update frontend tag in values.yaml
|
||||||
image: alpine:3.19
|
image: alpine:3.19
|
||||||
when:
|
when:
|
||||||
event: [ push ]
|
event: [ push ]
|
||||||
|
path:
|
||||||
|
include: [ frontend/** ]
|
||||||
environment:
|
environment:
|
||||||
GIT_USERNAME:
|
GIT_USERNAME:
|
||||||
from_secret: GIT_USERNAME
|
from_secret: GIT_USERNAME
|
||||||
@ -53,9 +55,33 @@ 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
|
||||||
- yq -i '.image.tag = "${CI_COMMIT_SHA:0:7}"' manifests/labmap/values.yaml
|
- yq -i '.frontend.tag = "${CI_COMMIT_SHA:0:7}"' manifests/labmap/values.yaml
|
||||||
- git add manifests/labmap/values.yaml
|
- git add manifests/labmap/values.yaml
|
||||||
- "git commit -m 'labmap: update image tag to ${CI_COMMIT_SHA:0:7}' || echo 'No changes'"
|
- "git commit -m 'frontend: update tag to ${CI_COMMIT_SHA:0:7}' || echo 'No changes'"
|
||||||
- git push origin master
|
- git push origin master
|
||||||
|
|
||||||
|
update-values-backend:
|
||||||
|
name: Update backend tag in values.yaml
|
||||||
|
image: alpine:3.19
|
||||||
|
when:
|
||||||
|
event: [ push ]
|
||||||
|
path:
|
||||||
|
include: [ backend/** ]
|
||||||
|
environment:
|
||||||
|
GIT_USERNAME:
|
||||||
|
from_secret: GIT_USERNAME
|
||||||
|
GIT_TOKEN:
|
||||||
|
from_secret: GIT_TOKEN
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache git yq
|
||||||
|
- git config --global user.name "woodpecker-bot"
|
||||||
|
- git config --global user.email "ci@dvirlabs.com"
|
||||||
|
- git clone "https://${GIT_USERNAME}:${GIT_TOKEN}@git.dvirlabs.com/dvirlabs/my-apps.git"
|
||||||
|
- cd my-apps
|
||||||
|
- yq -i '.backend.tag = "${CI_COMMIT_SHA:0:7}"' manifests/labmap/values.yaml
|
||||||
|
- git add manifests/labmap/values.yaml
|
||||||
|
- "git commit -m 'backend: update tag to ${CI_COMMIT_SHA:0:7}' || echo 'No changes'"
|
||||||
|
- git push origin master
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ DATA_FILE = "diagram.json"
|
|||||||
|
|
||||||
@app.get("/")
|
@app.get("/")
|
||||||
def root():
|
def root():
|
||||||
return {"message": "Check if the server is running"}
|
return {"message": "Check if the backend is running"}
|
||||||
|
|
||||||
@app.get("/diagram/fetch")
|
@app.get("/diagram/fetch")
|
||||||
def fetch_diagram():
|
def fetch_diagram():
|
||||||
|
|||||||
@ -4,4 +4,4 @@ function App() {
|
|||||||
return <Diagram />;
|
return <Diagram />;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default App;
|
export default App;
|
||||||
Loading…
x
Reference in New Issue
Block a user