Skip to content
Snippets Groups Projects
Commit e5d2bed8 authored by Szymon Tomasz Datko's avatar Szymon Tomasz Datko
Browse files

Added few tools, aliases and updated .gitlab-ci.yml to prod version

parent 32f900cc
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -11,26 +11,26 @@ ...@@ -11,26 +11,26 @@
# Job definition for automated Docker image building # Job definition for automated Docker image building
# #
create_image: create_image:
stage: build stage: build
# #
# Select proper runner node # Select proper runner node
# #
tags: tags:
- docker-build - docker-image-build
# #
# This section is unused, but required by Gitlab-CI # This section is unused, but required by Gitlab-CI
# #
script: script:
- echo 'Create Docker image' - echo 'Create Docker image'
# #
# Set parameters for image building # Set parameters for image building
# #
variables: variables:
TO: 'docker.cern.ch/security-services/code-checking:latest' TO: 'docker.cern.ch/security-services/code-checking:latest'
DOCKER_INFO: 'true' # Display Docker informations DOCKER_INFO: 'true' # Display Docker informations
DOCKER_LOGIN_SERVER: 'docker.cern.ch' DOCKER_LOGIN_SERVER: 'docker.cern.ch'
DOCKER_LOGIN_USERNAME: $_DOCKER_USERNAME DOCKER_LOGIN_USERNAME: $_DOCKER_USERNAME
DOCKER_LOGIN_PASSWORD: $_DOCKER_PASSWORD DOCKER_LOGIN_PASSWORD: $_DOCKER_PASSWORD
...@@ -18,6 +18,13 @@ MAINTAINER "CERN IT-DI-CSO <computer.security@cern.ch>" ...@@ -18,6 +18,13 @@ MAINTAINER "CERN IT-DI-CSO <computer.security@cern.ch>"
ENV basedir /opt ENV basedir /opt
#
# Create space for extra aliases
#
RUN touch /etc/profile.d/cso-aliases.sh
RUN chmod +x /etc/profile.d/cso-aliases.sh
# #
# Enable extra repositories # Enable extra repositories
# #
...@@ -32,10 +39,36 @@ RUN yum -y groups mark convert ...@@ -32,10 +39,36 @@ RUN yum -y groups mark convert
RUN yum -y groupinstall 'Development Tools' RUN yum -y groupinstall 'Development Tools'
#
# Install Java development packages
#
RUN yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel
#
# Install Perl development packages
#
RUN yum -y install perl perl-devel
# #
# Install Python development packages # Install Python development packages
# #
RUN yum -y install python-devel python-flake8 python-pep8 RUN yum -y install python python-devel
RUN yum -y install python-flake8 python-pep8
#
# Install Ruby development packages
#
RUN yum -y install ruby ruby-devel
#
# Install Python PIP
#
RUN yum -y install python-pip
RUN pip install --upgrade pip
# #
...@@ -53,27 +86,40 @@ RUN yum -y install expat expat-devel ...@@ -53,27 +86,40 @@ RUN yum -y install expat expat-devel
RUN yum -y install flex flex-devel RUN yum -y install flex flex-devel
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Install dependencies for PMD and FindBugs # Install CppLint
# #
RUN yum -y install java RUN pip install cpplint
# #
# Install RATS # Install FindBugs
# #
WORKDIR $basedir WORKDIR $basedir
RUN wget https://rough-auditing-tool-for-security.googlecode.com/files/rats-2.4.tgz RUN wget http://prdownloads.sourceforge.net/findbugs/findbugs-3.0.1.tar.gz
RUN tar -xzf rats-2.4.tgz RUN tar -xzf findbugs-3.0.1.tar.gz
WORKDIR $basedir/rats-2.4 RUN echo "alias findbugs='/opt/findbugs-3.0.1/bin/findbugs'" >> /etc/profile.d/cso-aliases.sh
RUN ./configure && make && make install
# #
# Install PyLint # Install FlawFinder
# #
RUN yum -y install pylint WORKDIR $basedir
RUN wget http://www.dwheeler.com/flawfinder/flawfinder-1.31.tar.gz
RUN tar -xzf flawfinder-1.31.tar.gz
WORKDIR $basedir/flawfinder-1.31
RUN make install
#
# Install Perl::Critic
#
RUN yum -y install perl-Perl-Critic
# #
...@@ -83,10 +129,37 @@ WORKDIR $basedir ...@@ -83,10 +129,37 @@ WORKDIR $basedir
RUN wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F5.5.1/pmd-bin-5.5.1.zip RUN wget https://github.com/pmd/pmd/releases/download/pmd_releases%2F5.5.1/pmd-bin-5.5.1.zip
RUN unzip pmd-bin-5.5.1.zip RUN unzip pmd-bin-5.5.1.zip
RUN echo "alias cpd='/opt/pmd-bin-5.5.1/bin/run.sh cpd'" >> /etc/profile.d/cso-aliases.sh
RUN echo "alias pmd='/opt/pmd-bin-5.5.1/bin/run.sh pmd'" >> /etc/profile.d/cso-aliases.sh
# #
# Install FindBugs # Install PyChecker
#
RUN yum -y install pychecker
#
# Install PyLint
#
RUN yum -y install pylint
#
# Install RATS
# #
WORKDIR $basedir WORKDIR $basedir
RUN wget http://prdownloads.sourceforge.net/findbugs/findbugs-3.0.1.tar.gz RUN wget https://rough-auditing-tool-for-security.googlecode.com/files/rats-2.4.tgz
RUN tar -xzf findbugs-3.0.1.tar.gz RUN tar -xzf rats-2.4.tgz
WORKDIR $basedir/rats-2.4
RUN ./configure && make && make install
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Finish
#
WORKDIR /
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment