commit 845b8934908a0e0f66e25eae4b26efe64248dd77 Author: Thomas Bellembois Date: Mon Sep 5 14:22:40 2022 +0200 First commit. diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..3da9658 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,20 @@ +kind: pipeline +type: docker +name: build + +trigger: + event: + - push + +steps: + - name: docker-build + image: plugins/docker + settings: + dockerfile: Dockerfile + context: . + registry: hub.codefirst.iut.uca.fr + repo: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dronesonarplugin-python37 + username: + from_secret: SECRET_REGISTRY_USERNAME + password: + from_secret: SECRET_REGISTRY_PASSWORD diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c519a5f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.7-buster + +RUN pip install nose coverage parameterized +RUN apt -y update \ + && apt -y install unzip wget nodejs \ + && rm -rf /var/lib/{apt,dpkg,cache,log} + +RUN mkdir /downloads/sonarqube -p \ + && cd /downloads/sonarqube \ + && wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.2.0.1873-linux.zip \ + && unzip sonar-scanner-cli-4.2.0.1873-linux.zip \ + && mv sonar-scanner-4.2.0.1873-linux /opt/sonar-scanner + +RUN echo "sonar.host.url=http://sonarqube" > /opt/sonar-scanner/conf/sonar-scanner.properties \ + && echo "sonar.sourceEncoding=UTF-8" \ No newline at end of file