Commit 3ceb10f8 authored by FORESTIER Fabien's avatar FORESTIER Fabien
Browse files

Remove deploy jobs from the CI as a dedicated project has been created

parent 67156724
Pipeline #3742 passed with stage
in 6 seconds
stages:
- sonar-analysis
- build
- deploy
variables:
SONAR_URL: https://sonarqube.forge.grandlyon.com
......@@ -9,7 +8,7 @@ variables:
sonarqube:
stage: sonar-analysis
only:
- development
- master
before_script:
- export PATH=$PATH:/usr/local/bin/sonar-scanner-3.2.0.1227-linux/bin/
- export NODE_PATH=$NODE_PATH:`npm root -g`
......@@ -36,6 +35,7 @@ build_development:
- docker-compose build
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker-compose push
- "curl -X POST -F token=$CI_JOB_TOKEN -F ref=master -F variables[TAG]=${TAG} https://forge.grandlyon.com/api/v4/projects/325/trigger/pipeline"
build_release:
stage: build
......@@ -49,39 +49,3 @@ build_release:
- docker-compose build
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker-compose push
deploy_development:
stage: deploy
only:
- development
script:
- export TAG=dev
- export CSV_CATALOG_DOWNLOAD_SERVICE_BIND_PORT=4040
- export CSV_CATALOG_DOWNLOAD_SERVICE_CACHE_VOLUME=catalog-cache-${TAG}
- docker volume create ${CSV_CATALOG_DOWNLOAD_SERVICE_CACHE_VOLUME}
- export CSV_CATALOG_DOWNLOAD_SERVICE_CONFIG_FILE_PATH=${PWD}/config.yaml
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker-compose pull
- docker-compose --project-name csv-catalog-download-service-${TAG} up -d --force-recreate
environment:
name: development
deploy_staging:
stage: deploy
only:
- development
when: manual
script:
- export TAG=staging
- export CSV_CATALOG_DOWNLOAD_SERVICE_BIND_PORT=4140
- export CSV_CATALOG_DOWNLOAD_SERVICE_CACHE_VOLUME=catalog-cache-${TAG}
- docker volume create ${CSV_CATALOG_DOWNLOAD_SERVICE_CACHE_VOLUME}
- export CSV_CATALOG_DOWNLOAD_SERVICE_CONFIG_FILE_PATH=${PWD}/config.yaml
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- TAG=dev docker-compose pull
- export REGISTRY_PATH=web-et-numerique/web-et-numerique-internet/data.grandlyon.com/web-portal/components/services/csv-catalog-downloader
- docker tag $CI_REGISTRY/$REGISTRY_PATH:dev $CI_REGISTRY/$REGISTRY_PATH:${TAG}
- docker push $CI_REGISTRY/$REGISTRY_PATH:${TAG}
- docker-compose --project-name csv-catalog-download-service-${TAG} up -d --force-recreate
environment:
name: staging
# Authentication service
## Installation
This service has been developed with the [Flask](https://flask.palletsprojects.com/) framework. It requires [Python](https://www.python.org/) in order to run.
Once Python installed on your computer, you will need to install the project's dependencies. Go to the root of the project and run the following command.
```bash
pip install -r requirements.txt
```
## Environment variables
In order to run the code, some environment variables are needed. They are specified in the `template.env` file at the root of the project.
For a local deployment:
1. `cp template.env .env`
2. Edit .env according to the chosen configuration
The values will be read from the file by default when running with docker. If you run the service outside of docker you can export those variables.
## Running the app without docker
<!-- ############### To be completed ######################-->
## Running the app with docker
```bash
# build
docker-compose build
# deploy
docker-compose up [-d]
# build and deploy
docker-compose up --build [-d]
```
<!-- ## Test
```bash
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
``` -->
\ No newline at end of file
TAG=<version of the service that will be deployed or build>
CSV_CATALOG_DOWNLOAD_SERVICE_BIND_PORT=<port on which the application will be running>
CSV_CATALOG_DOWNLOAD_SERVICE_CACHE_VOLUME=<name of the docker volume to be mounted>
CSV_CATALOG_DOWNLOAD_SERVICE_CONFIG_FILE_PATH=<path to the config file>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment