From 38e32ad7906991ba1ac7901b16dceb99f4819335 Mon Sep 17 00:00:00 2001 From: Matheo Coquet Date: Mon, 11 Mar 2024 18:53:41 +0100 Subject: [PATCH 1/3] build(makefile): add update rule --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7e22848..c258e57 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ NAME = arcade BUILD_PATH = build -all: +all: update @cmake -S . -B build cmake --build $(BUILD_PATH) @cp $(BUILD_PATH)/src/$(NAME) . @@ -24,5 +24,9 @@ re: fclean all tests_run: echo "pass" -.PHONY: all clean fclean re tests_run +update: + @git submodule init + @git submodule update + +.PHONY: all clean fclean re tests_run update DEFAULT_GOAL := all From cb84ced44514f1e881cc8d4cc9f9981d3295250e Mon Sep 17 00:00:00 2001 From: Matheo Coquet Date: Mon, 11 Mar 2024 19:14:42 +0100 Subject: [PATCH 2/3] config: update submodule config to http clone --- .gitmodules | 2 +- Jenkinsfile | 24 +++++++++++++++++++----- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.gitmodules b/.gitmodules index 3063baf..9e25602 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "common"] path = common - url = git@github.com:G-Epitech/MAYBDF-ArcadeShared.git + url = https://github.com/G-Epitech/MAYBDF-ArcadeShared.git diff --git a/Jenkinsfile b/Jenkinsfile index 47e4a21..eaeff67 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,12 +1,20 @@ pipeline { - agent { - docker { - image 'epitechcontent/epitest-docker' - } - } + agent any stages { + stage('Project setup') { + steps { + sh 'make update' + } + } + stage('Project compilation') { + agent { + docker { + image 'epitechcontent/epitest-docker' + } + } + steps { sh 'make clean' sh 'make' @@ -15,6 +23,12 @@ pipeline { } stage('Project tests') { + agent { + docker { + image 'epitechcontent/epitest-docker' + } + } + steps { sh 'make tests_run' } From 2fe4b7aa0bd826e49110327a9c80edab96c1dd87 Mon Sep 17 00:00:00 2001 From: Matheo Coquet Date: Mon, 11 Mar 2024 19:20:50 +0100 Subject: [PATCH 3/3] config: remove git cache before jenkins project setup --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index eaeff67..f09f005 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,6 +4,7 @@ pipeline { stages { stage('Project setup') { steps { + sh 'git rm --cached common' sh 'make update' } }