我试图建立一个位桶式管道,以便可以部署到三个环境(开发,生产,测试)。
我有这个,但似乎无法正常工作
image: maven:3.3.9
pipelines:
default:
- step:
name: Build and Test
script:
- mvn clean install
- mvn package
- step:
name: Deploy to production
script:
- -Dspring.profiles.active=production
- mvn clean install
- mvn deploy
- step:
name: Deploy to development
script:
- -Dspring.profiles.active=develop
- mvn clean install
- mvn deploy
- step:
name: Deploy to testing
script:
- -Dspring.profiles.active=test
- mvn clean install
- mvn deploy
答案 0 :(得分:0)
我认为您只需要在每一步中添加一行即可表明您想要使用哪种部署(测试,分段或生产),例如:
- step:
name: Deploy to prod
deployment: production