Skip to content
Snippets Groups Projects
Commit c114362d authored by Marica Antonacci's avatar Marica Antonacci
Browse files

Move python script to ansible role

parent bf606632
No related branches found
No related tags found
No related merge requests found
Pipeline #85039 passed
...@@ -25,5 +25,4 @@ docker-build: ...@@ -25,5 +25,4 @@ docker-build:
rules: rules:
- if: $CI_COMMIT_BRANCH - if: $CI_COMMIT_BRANCH
changes: changes:
- $DOCKERFILES_DIR/*.py
- $DOCKERFILES_DIR/Dockerfile - $DOCKERFILES_DIR/Dockerfile
\ No newline at end of file
File moved
...@@ -5,6 +5,11 @@ ...@@ -5,6 +5,11 @@
- debug: - debug:
var: paas_ci_test.endpoints_to_scan var: paas_ci_test.endpoints_to_scan
- name: Copy script to run
copy:
src: files/script.py
dest: {{ paas_ci_scan_script_path }}
- name: Run scan - name: Run scan
command: "python3 {{ paas_ci_scan_script_path }} {{ paas_ci_test.endpoints_to_scan }} {{ paas_ci_workdir + '/dep.json'}} {{ paas_ci_workdir }}" command: "python3 {{ paas_ci_scan_script_path }} {{ paas_ci_test.endpoints_to_scan }} {{ paas_ci_workdir + '/dep.json'}} {{ paas_ci_workdir }}"
......
...@@ -3,11 +3,9 @@ FROM jenkins/ssh-agent:4.1.0 ...@@ -3,11 +3,9 @@ FROM jenkins/ssh-agent:4.1.0
ARG ORCHENT_VERSION=1.2.9 ARG ORCHENT_VERSION=1.2.9
RUN DEBIAN_FRONTEND=noninteractive apt-get update \ RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get install -y wget git ansible python3-pip iproute2 iputils-ping \ && apt-get install -y wget git ansible python3-pip \
&& wget https://github.com/indigo-dc/orchent/releases/download/v${ORCHENT_VERSION}/orchent_${ORCHENT_VERSION}_amd64.deb \ && wget https://github.com/indigo-dc/orchent/releases/download/v${ORCHENT_VERSION}/orchent_${ORCHENT_VERSION}_amd64.deb \
&& dpkg -i orchent_${ORCHENT_VERSION}_amd64.deb \ && dpkg -i orchent_${ORCHENT_VERSION}_amd64.deb \
&& apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get clean && rm -rf /var/lib/apt/lists/*
RUN pip install gvm-tools jq yq RUN pip install gvm-tools jq yq
\ No newline at end of file
COPY script.py /opt/scan.py
\ No newline at end of file
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