Commit 9accb730 authored by Jean-Francois Rey's avatar Jean-Francois Rey
Browse files

try to use cache between mergeData and buildDocker

parent 71b84763
...@@ -71,10 +71,10 @@ mergeData: ...@@ -71,10 +71,10 @@ mergeData:
script: script:
- 'cd R && Rscript main_forecast_plotly.R "merge"' - 'cd R && Rscript main_forecast_plotly.R "merge"'
- "curl --request POST --form token=$TRIGGERTOKEN --form ref=master https://gitlab.paca.inrae.fr/api/v4/projects/105/trigger/pipeline" - "curl --request POST --form token=$TRIGGERTOKEN --form ref=master https://gitlab.paca.inrae.fr/api/v4/projects/105/trigger/pipeline"
artifacts: cache:
key: data-cache
paths: paths:
- R/list_figures.rds - R/list_figures.rds
expire_in: 1 week
## Build docker image of the R shiny app ## Build docker image of the R shiny app
## using DockerFile and register it in the ## using DockerFile and register it in the
...@@ -89,10 +89,13 @@ buildImageDocker: ...@@ -89,10 +89,13 @@ buildImageDocker:
DOCKER_DRIVER: overlay2 DOCKER_DRIVER: overlay2
services: services:
- docker:19.03.0-dind - docker:19.03.0-dind
cache:
key: data-cache
before_script: before_script:
- 'apk add --update curl' #- 'apk add --update curl'
- 'curl --header "PRIVATE-TOKEN: $PTOKEN" -o artifacts.zip "https://gitlab.paca.inrae.fr/api/v4/projects/105/jobs/artifacts/master/download?job=mergeData"' #- 'curl --header "PRIVATE-TOKEN: $PTOKEN" -o artifacts.zip "https://gitlab.paca.inrae.fr/api/v4/projects/105/jobs/artifacts/master/download?job=mergeData"'
- "unzip -o artifacts.zip && mv R/list_figures.rds www/list_figures.rds" #- "unzip -o artifacts.zip && mv R/list_figures.rds www/list_figures.rds"
- "cp R/list_figures.rds www/list_figures.rds"
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
stage: build_img stage: build_img
rules: rules:
......
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