Skip to content
Snippets Groups Projects
Commit 5ce6d2b1 authored by OZGCloud's avatar OZGCloud
Browse files

jenkins build agend docker container um dependency check erweitert für daten caching

parent 2d9ce677
No related branches found
No related tags found
No related merge requests found
FROM ubuntu:22.04 FROM ubuntu:22.04
ARG MAVEN_VERSION=3.8.6 ARG MAVEN_VERSION=3.8.8
ARG OPENJDK_VERSION=17 ARG OPENJDK_VERSION=17
ARG NODEJS_VERSION=v14.15.1 ARG NODEJS_VERSION=v14.15.1
ARG KUBECTL_VERSION=v1.25.0 ARG KUBECTL_VERSION=v1.25.0
...@@ -8,8 +8,6 @@ ARG HELM_VERSION=3 ...@@ -8,8 +8,6 @@ ARG HELM_VERSION=3
ENV LANG C.UTF-8 ENV LANG C.UTF-8
COPY requirements.txt requirements.txt
RUN apt update \ RUN apt update \
&& apt upgrade -y \ && apt upgrade -y \
&& apt install -y \ && apt install -y \
...@@ -32,7 +30,8 @@ RUN apt update \ ...@@ -32,7 +30,8 @@ RUN apt update \
libasound2 \ libasound2 \
libxtst6 \ libxtst6 \
xauth \ xauth \
xvfb xvfb \
unzip
RUN mkdir -p /usr/share/maven \ RUN mkdir -p /usr/share/maven \
&& wget https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz -O /tmp/maven.tar.gz \ && wget https://dlcdn.apache.org/maven/maven-3/${MAVEN_VERSION}/binaries/apache-maven-${MAVEN_VERSION}-bin.tar.gz -O /tmp/maven.tar.gz \
...@@ -57,13 +56,6 @@ RUN wget https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-${HEL ...@@ -57,13 +56,6 @@ RUN wget https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-${HEL
RUN helm plugin install https://github.com/quintush/helm-unittest RUN helm plugin install https://github.com/quintush/helm-unittest
RUN pip3 install -r requirements.txt ;\
ansible-galaxy collection install community.general ;\
ansible-galaxy collection install kubernetes.core ;\
ansible-galaxy collection install cloud.common ;\
ansible-galaxy collection install ansible.posix ;\
ansible --version
RUN wget https://get.docker.com -O get-docker.sh \ RUN wget https://get.docker.com -O get-docker.sh \
&& chmod +x get-docker.sh \ && chmod +x get-docker.sh \
&& ./get-docker.sh \ && ./get-docker.sh \
...@@ -71,6 +63,11 @@ RUN wget https://get.docker.com -O get-docker.sh \ ...@@ -71,6 +63,11 @@ RUN wget https://get.docker.com -O get-docker.sh \
RUN mkdir /run/sshd RUN mkdir /run/sshd
RUN wget https://github.com/jeremylong/DependencyCheck/releases/download/v8.2.1/dependency-check-8.2.1-release.zip -O dependency-check.zip \
&& unzip dependency-check.zip \
&& mkdir /dependency-check-data \
&& dependency-check/bin/dependency-check.sh -d /dependency-check-data --updateonly
EXPOSE 22 EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"] CMD ["/usr/sbin/sshd", "-D"]
\ No newline at end of file
# Wichtig
Damit das Docker Image gebaut werden kann, muss sich die aktuelle `requirements.txt` aus dem provisioning Repo im `jenkins-build-agent` Verzeichnis befinden.
# Image bauen # Image bauen
`docker build -t docker.ozg-sh.de/jenkins-build-agent .` `docker build -t docker.ozg-sh.de/jenkins-build-agent .`
docker.ozg-sh.de/jenkins-build-agent docker.ozg-sh.de/jenkins-build-agent
Aktuell wird wohl das hier genutzt lauf Jenkinsfiles:
docker build -t docker.ozg-sh.de/jenkins-build-agent:node-14-15-1 .
docker push docker.ozg-sh.de/jenkins-build-agent:node-14-15-1
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment