|
|
|
# This file creates our 2 docker containers
|
|
|
|
kind: pipeline
|
|
|
|
name: Dockers_Builder
|
|
|
|
|
|
|
|
|
|
|
|
# Creation of the DB docker
|
|
|
|
steps:
|
|
|
|
# database container deployment
|
|
|
|
- name: deploy-container-mysql
|
|
|
|
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: ./Dockerfile
|
|
|
|
environment:
|
|
|
|
IMAGENAME: mysql:latest
|
|
|
|
CONTAINERNAME: mysql
|
|
|
|
COMMAND: create
|
|
|
|
#OVERWRITE: true
|
|
|
|
PRIVATE: true
|
|
|
|
CODEFIRST_CLIENTDRONE_ENV_MYSQL_ROOT_PASSWORD:
|
|
|
|
from_secret: MYSQL_ROOT_PASSWORD
|
|
|
|
CODEFIRST_CLIENTDRONE_ENV_MYSQL_DATABASE:
|
|
|
|
from_secret: MYSQL_DATABASE
|
|
|
|
CODEFIRST_CLIENTDRONE_ENV_MYSQL_USER:
|
|
|
|
from_secret: MYSQL_USER_TOM
|
|
|
|
CODEFIRST_CLIENTDRONE_ENV_MYSQL_PASSWORD:
|
|
|
|
from_secret: MYSQL_PASSWORD_TOM
|
|
|
|
ADMINS: thomaschazot2,mathildejean3,lilianbreton,luciebedouret,albanguilhot,cedricbouhours
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# docker image build
|
|
|
|
- name: container-api
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
dockerfile: ./api-rest/Dockerfile
|
|
|
|
context: .
|
|
|
|
registry: hub.codefirst.iut.uca.fr
|
|
|
|
repo: hub.codefirst.iut.uca.fr/bob_parteam/bob_party/api
|
|
|
|
username:
|
|
|
|
from_secret: SECRET_REGISTRY_USERNAME
|
|
|
|
password:
|
|
|
|
from_secret: SECRET_REGISTRY_PASSWORD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#container deployment
|
|
|
|
- name: deploy-api-containers
|
|
|
|
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
|
|
|
|
environment:
|
|
|
|
IMAGENAME: hub.codefirst.iut.uca.fr/bob_parteam/bob_party/api:latest
|
|
|
|
CONTAINERNAME: api-bobParty
|
|
|
|
COMMAND: create
|
|
|
|
OVERWRITE: true
|
|
|
|
#PRIVATE: true
|
|
|
|
CODEFIRST_CLIENTDRONE_ENV_DB_SERVER:
|
|
|
|
from_secret: db_server
|
|
|
|
CODEFIRST_CLIENTDRONE_ENV_MYSQL_USER:
|
|
|
|
from_secret: MYSQL_USER_TOM
|
|
|
|
CODEFIRST_CLIENTDRONE_ENV_MYSQL_PASSWORD:
|
|
|
|
from_secret: MYSQL_PASSWORD_TOM
|
|
|
|
CODEFIRST_CLIENTDRONE_ENV_MYSQL_ROOT_PASSWORD:
|
|
|
|
from_secret: MYSQL_ROOT_PASSWORD
|
|
|
|
CODEFIRST_CLIENTDRONE_ENV_MYSQL_DATABASE:
|
|
|
|
from_secret: MYSQL_DATABASE
|
|
|
|
ADMINS: thomaschazot2,mathildejean3,lilianbreton,luciebedouret,albanguilhot,cedricbouhours
|
|
|
|
depends_on: [ deploy-container-mysql, container-api ]
|
|
|
|
|
|
|
|
# docker image build
|
|
|
|
- name: container-server
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
dockerfile: ./bob_party/Dockerfile
|
|
|
|
context: .
|
|
|
|
registry: hub.codefirst.iut.uca.fr
|
|
|
|
repo: hub.codefirst.iut.uca.fr/bob_parteam/bob_party/server
|
|
|
|
username:
|
|
|
|
from_secret: SECRET_REGISTRY_USERNAME
|
|
|
|
password:
|
|
|
|
from_secret: SECRET_REGISTRY_PASSWORD
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#container deployment
|
|
|
|
- name: deploy-server-containers
|
|
|
|
image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
|
|
|
|
environment:
|
|
|
|
IMAGENAME: hub.codefirst.iut.uca.fr/bob_parteam/bob_party/server:latest
|
|
|
|
CONTAINERNAME: server-bobParty
|
|
|
|
COMMAND: create
|
|
|
|
OVERWRITE: true
|
|
|
|
#PRIVATE: true
|
|
|
|
ADMINS: thomaschazot2,mathildejean3,lilianbreton,luciebedouret,albanguilhot,cedricbouhours
|
|
|
|
depends_on: [ container-server ]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# # docker image build
|
|
|
|
# - name: docker-build-and-push
|
|
|
|
# image: plugins/docker
|
|
|
|
# settings:
|
|
|
|
# dockerfile: Dockerfile
|
|
|
|
# context: .
|
|
|
|
# registry: hub.codefirst.iut.uca.fr
|
|
|
|
# repo: hub.codefirst.iut.uca.fr/thomas.chazot2/bobparty
|
|
|
|
# username:
|
|
|
|
# from_secret: SECRET_REGISTRY_USERNAME_TOM
|
|
|
|
# password:
|
|
|
|
# from_secret: SECRET_REGISTRY_PASSWORD_TOM
|
|
|
|
|
|
|
|
# #container deployment
|
|
|
|
# - name: deploy-bob_party-container
|
|
|
|
# image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
|
|
|
|
# environment:
|
|
|
|
# IMAGENAME: hub.codefirst.iut.uca.fr/thomas.chazot2/bobparty:latest
|
|
|
|
# CONTAINERNAME: bob_party_container
|
|
|
|
# COMMAND: create
|
|
|
|
# OVERWRITE: true
|
|
|
|
# ADMINS: thomaschazot2,mathildejean3,lilianbreton,luciebedouret,albanguilhot,cedricbouhours,thomasbellembois
|