浏览代码

first steps to CI adaption

master
Kai Kretschmann 1年前
父节点
当前提交
e83a2b43bd
共有 3 个文件被更改,包括 46 次插入8 次删除
  1. 20
    2
      Dockerfile
  2. 15
    6
      Jenkinsfile
  3. 11
    0
      install.sh

+ 20
- 2
Dockerfile 查看文件

@@ -1,3 +1,21 @@
FROM node:7-alpine
FROM debian:stable
MAINTAINER Kai Kretschmann
RUN apk add -U subversion
#RUN apt-get update -y
RUN apt-get install -y mysql-server apache2 php-mysql php-gd
RUN a2enmod rewrite
RUN a2enmod headers
RUN service apache2 restart
ADD install.sh /
RUN chmod 755 /install.sh
EXPOSE 80
CMD ["/bin/bash", "/install.sh"]
# docker build -t lggr/test .
# docker run -p 4000:80 lggr/test
# docker container rm cea8...
# docker container rm lggr/test
#

+ 15
- 6
Jenkinsfile 查看文件

@@ -1,15 +1,24 @@
node('MASTER') {
pipeline {
agent { dockerfile true }
agent {
label 'MASTER'
}
stages {
stage('SCM') {
steps {
cleanWs()
dir('src') {
git 'https://github.com/kkretsch/lggr/'
}
}
}
stage('Test') {
agent {
dockerfile true
}
steps {
sh 'node --version'
sh 'svn --version'
}
}
}
}

}
}

+ 11
- 0
install.sh 查看文件

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

正在加载...
取消
保存
Social stuff:
Mastodon