You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.5 KiB
50 lines
1.5 KiB
kind: pipeline
|
|
type: docker
|
|
name: ScienceQuestAPI
|
|
|
|
trigger:
|
|
branch:
|
|
- Springboot
|
|
event:
|
|
- push
|
|
|
|
steps:
|
|
- name: build-app
|
|
image: maven:3-eclipse-temurin-21-alpine
|
|
commands:
|
|
- cd SpringBootProject/
|
|
- sed -i -e "s/localhost/postgres_server/g" src/main/resources/application.properties
|
|
- echo 'server.port=80' >> src/main/resources/application.properties
|
|
- mvn clean package
|
|
|
|
- name: deploy-container-postgresql
|
|
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
|
|
environment:
|
|
IMAGENAME: postgres:16-alpine
|
|
CONTAINERNAME: postgres_server
|
|
COMMAND: create
|
|
OVERWRITE: true
|
|
PRIVATE: true
|
|
CODEFIRST_CLIENTDRONE_ENV_POSTGRES_PASSWORD:
|
|
from_secret: postgres_password_secret
|
|
CODEFIRST_CLIENTDRONE_ENV_POSTGRES_DB: ScienceQuest
|
|
CODEFIRST_CLIENTDRONE_ENV_POSTGRES_USER: ScienceQuest
|
|
|
|
- name: deploy-container-adminer
|
|
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
|
|
environment:
|
|
IMAGENAME: adminer:latest
|
|
CONTAINERNAME: adminer
|
|
COMMAND: create
|
|
OVERWRITE: true
|
|
PRIVATE: false
|
|
CODEFIRST_CLIENTDRONE_ENV_ADMINER_DEFAULT_SERVER: postgres_server
|
|
|
|
- name: run-app
|
|
image: openjdk:21-slim
|
|
depends_on: [build-app,deploy-container-postgresql]
|
|
settings:
|
|
context: SpringBootProject/
|
|
commands:
|
|
- java -jar target/sae-0.0.1-SNAPSHOT.jar
|