Browse Source

first steps to CI adaption

Kai Kretschmann 7 months ago
parent
commit
e83a2b43bd
3 changed files with 46 additions and 8 deletions
  1. 20
    2
      Dockerfile
  2. 15
    6
      Jenkinsfile
  3. 11
    0
      install.sh

+ 20
- 2
Dockerfile View File

@@ -1,3 +1,21 @@
1
-FROM node:7-alpine
1
+FROM debian:stable
2
+MAINTAINER Kai Kretschmann
2 3
 
3
-RUN apk add -U subversion
4
+#RUN apt-get update -y
5
+RUN apt-get install -y mysql-server apache2 php-mysql php-gd
6
+RUN a2enmod rewrite
7
+RUN a2enmod headers
8
+RUN service apache2 restart
9
+
10
+ADD install.sh /
11
+RUN chmod 755 /install.sh
12
+
13
+EXPOSE 80
14
+
15
+CMD ["/bin/bash", "/install.sh"]
16
+
17
+# docker build -t lggr/test .
18
+# docker run -p 4000:80 lggr/test
19
+# docker container rm cea8...
20
+# docker container rm lggr/test
21
+#

+ 15
- 6
Jenkinsfile View File

@@ -1,15 +1,24 @@
1
-node('MASTER') {    
2
-
3 1
 pipeline {
4
-    agent { dockerfile true }
2
+    agent {
3
+        label 'MASTER'
4
+    }
5 5
     stages {
6
+        stage('SCM') {
7
+            steps {
8
+                cleanWs()
9
+                dir('src') {
10
+                    git 'https://github.com/kkretsch/lggr/'
11
+                }
12
+            }
13
+        }
6 14
         stage('Test') {
15
+            agent {
16
+                dockerfile true
17
+            }
7 18
             steps {
8 19
                 sh 'node --version'
9 20
                 sh 'svn --version'
10 21
             }
11 22
         }
12 23
     }
13
-}
14
-
15
-}
24
+}

+ 11
- 0
install.sh View File

@@ -0,0 +1,11 @@
1
+#!/bin/bash
2
+
3
+export DB_NAME="lggr"
4
+
5
+systemctl start mysql.service
6
+systemctl start apache2.service
7
+sleep 60
8
+
9
+mysqladmin create $DB_NAME
10
+mysql -e "GRANT ALL ON lggr.* TO lggr@'%' IDENTIFIED BY 'lggr'; FLUSH PRIVILEGES" $DB_NAME
11
+mysql $DB_NAME <doc/db.sql

Loading…
Cancel
Save
Social stuff:
Mastodon