diff --git a/checkstyle-runner/Dockerfile b/checkstyle-runner/Dockerfile new file mode 100644 index 0000000..4792f71 --- /dev/null +++ b/checkstyle-runner/Dockerfile @@ -0,0 +1,16 @@ +FROM java:8-jdk + +WORKDIR /checkstyle + +ADD tubs_checks.xml /checkstyle + +ENV CHECKSTYLE_VERSION=7.6.1 + +RUN curl -sLO https://sourceforge.net/projects/checkstyle/files/checkstyle/${CHECKSTYLE_VERSION}/checkstyle-${CHECKSTYLE_VERSION}-all.jar && mv checkstyle-${CHECKSTYLE_VERSION}-all.jar checkstyle.jar + +# gitlab runner does not use entrypoint like this +# https://docs.gitlab.com/runner/executors/docker.html#the-entrypoint +#ENTRYPOINT ["java","-jar","checkstyle.jar","-c","tubs_checks.xml"] + +# default option, use file names to check +#CMD ["-v"] \ No newline at end of file diff --git a/checkstyle-runner/gitlab-ci.yml b/checkstyle-runner/gitlab-ci.yml new file mode 100644 index 0000000..eebf662 --- /dev/null +++ b/checkstyle-runner/gitlab-ci.yml @@ -0,0 +1,8 @@ +image: y0067212/checkstyle-ips + +checkstyle: + script: + - java -jar checkstyle.jar -c tubs_checks.xml . + artifacts: + paths: + - checkstyle/ diff --git a/checkstyle-runner/tubs_checks.xml b/checkstyle-runner/tubs_checks.xml new file mode 100644 index 0000000..d1b866b --- /dev/null +++ b/checkstyle-runner/tubs_checks.xml @@ -0,0 +1,205 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/notes.md b/notes.md index d4adce9..4501d05 100644 --- a/notes.md +++ b/notes.md @@ -44,3 +44,19 @@ ## (optional) sync script - (one-way) sync students and groups from [Stud.IP REST API](http://docs.studip.de/develop/Entwickler/RESTAPI) to [Gitlab REST API](https://docs.gitlab.com/ce/api/) + +# Replicate (TODO: ansible playbook) + +- install gitlab +- install docker +- copy gitlab.rb +- partially protected +- default project limit = 0 +- shared runner for checkstyle + +- protected runner for + + + setting protected tags + + running jplag + +- script for creating repos and groups