Add Jenkinsfile
Add rudimentary jenkinsfile to run the linter and build the project when
we open a new CR.
Add multistage builds in jami-web Dockerfile
Change-Id: Ifa3bbe20f14f944ec30ca10aa1a42fca6b3c2940
diff --git a/Jenkinsfile b/Jenkinsfile
new file mode 100644
index 0000000..9cd6094
--- /dev/null
+++ b/Jenkinsfile
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2022 Savoir-faire Linux Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation; either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this program. If not, see
+ * <https://www.gnu.org/licenses/>.
+ */
+
+// Requirements:
+// - gerrit-trigger plugin
+// - Docker plugin
+
+pipeline {
+ agent any
+ stages {
+ stage('Build jami-daemon') {
+ steps {
+ dir("daemon") {
+ sh "docker build --build-arg config_args=\"--with-nodejs\" -t jami-daemon ."
+ }
+ }
+ }
+ stage('Lint & Test') {
+ steps {
+ script {
+ docker.build("jami-web:${env.BUILD_ID}", "--target test .")
+ }
+ }
+ }
+ stage('Build') {
+ steps {
+ script {
+ docker.build("jami-web:${env.BUILD_ID}", "--target build .")
+ }
+ }
+ }
+ }
+}