如何为同一个工作Gitlab-CI获取两个图像

时间:2018-01-31 06:07:02

标签: node.js maven gitlab gitlab-ci gitlab-ci-runner

我想为maven项目设置gitlab-ci,它还需要使用npm构建

我的工作如下

deploy:jdk8:
  stage: test
  script:
    - 'npm install '
    - 'mvn compile -Dmaven.test.skip=true'
    - 'mvn package -B -Dmaven.test.skip=true -Dskip.web.build=true'
  only:
    - master
  # Archive up the built documentation site.
  artifacts:
    paths:
    - target
  image: maven:3.3.9-jdk-8

在下面的工作中,我需要mvn和npm实例,但我只能声明一个图像/作业我该怎么办?

1 个答案:

答案 0 :(得分:0)

我建议您拆开作业并使用artifacts传递构建结果以运行图像以进行测试等。