Pipeline 流水线
11.6.1. cache
Java 缓存设置
image: maven:3.5.0-jdk-8 variables: MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository" cache: paths: - .m2/repository/ - target/ stages: - build - test - package build: stage: build script: mvn compile unittest: stage: test script: mvn test package: stage: package script: mvn package artifacts: paths: - target/java-project-0.0.1-SNAPSHOT.jar
Node 缓存设置
cache: paths: - node_modules - dist # variables: # GIT_STRATEGY: clone # GIT_STRATEGY: fetch # GIT_CHECKOUT: "false" stages: - build - test - deploy build-job: stage: build only: - master - testing - develo