diff --git a/.drone.yml b/.drone.yml index 2f691c2..815c081 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,13 +2,20 @@ kind: pipeline type: docker name: DAFLPipeline +trigger: + event: + - push + steps: +# build CONTAINER for app-build on cirrusci IMAGE - name: app-build image: cirrusci/flutter:stable commands: - flutter doctor - - flutter build - + - cd ./Sources/dafl_project_flutter/ + - flutter build apk + +# build CONTAINER for sonar on cirrusci IMAGE - name: code-analysis image: cirrusci/flutter:stable environment: @@ -24,29 +31,4 @@ steps: - export PATH=$SONAR_SCANNER_HOME/bin:$PATH - export SONAR_SCANNER_OPTS="-server" - sonar-scanner -D sonar.projectKey=DAFLMusic -D sonar.sources=. -D sonar.host.url=https://codefirst.iut.uca.fr/sonar - depends_on: [ app-build ] - -- name: web-server - image: plugins/docker - settings: - dockerfile: Sources/Dockerfile - context: Sources/ - registry: hub.codefirst.iut.uca.fr - repo: hub.codefirst.iut.uca.fr/felix.mielcarek/dafl_music - username: - from_secret: secret-registry-username - password: - from_secret: secret-registry-password - -- name: deploy-container - image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest - environment: - IMAGENAME: hub.codefirst.iut.uca.fr/felix.mielcarek/dafl_music:latest - CONTAINERNAME: dafl-container - COMMAND: create - OVERWRITE: true - username: - from_secret: secret-registry-username - password: - from_secret: secret-registry-password - depends_on: [ web-server ] \ No newline at end of file + depends_on: [ app-build ] \ No newline at end of file diff --git a/Sources/Dockerfile b/Sources/Dockerfile deleted file mode 100644 index 4b345c3..0000000 --- a/Sources/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM plugins/docker -RUN apk update -RUN apk add apache2 -RUN apk add apache2-utils -EXPOSE 80 -CMD [“apache2ctl”, “-D”, “FOREGROUND”] \ No newline at end of file diff --git a/Sources/api_redirect/.gitkeep b/Sources/api_redirect/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/Sources/api_redirect/Dockerfile b/Sources/api_redirect/Dockerfile new file mode 100644 index 0000000..9b7bb3d --- /dev/null +++ b/Sources/api_redirect/Dockerfile @@ -0,0 +1,4 @@ +FROM httpd:2.4 +COPY ./public-html/ /usr/local/apache2/htdocs/ +CMD echo 'ServerName 127.0.0.1' >> /etc/httpd/conf/httpd.conf +CMD systemctl reload httpd \ No newline at end of file diff --git a/Sources/api_redirect/public-html/callback/index.html b/Sources/api_redirect/public-html/callback/index.html new file mode 100644 index 0000000..70c379b --- /dev/null +++ b/Sources/api_redirect/public-html/callback/index.html @@ -0,0 +1 @@ +Hello world \ No newline at end of file diff --git a/Sources/api_redirect/public-html/index.html b/Sources/api_redirect/public-html/index.html new file mode 100644 index 0000000..5462420 --- /dev/null +++ b/Sources/api_redirect/public-html/index.html @@ -0,0 +1,5 @@ + + +

Hello World !

+ + \ No newline at end of file