【发布时间】:2021-04-22 16:55:32
【问题描述】:
我有一个项目在前端使用 Angular,在后端使用 Spring Boot。
目前,前端和后端位于两个独立的存储库中,我在其中准备了特定的 travis.yaml 文件,例如 Spring Boot 应用程序:
language: java
services: docker
addons:
sonarcloud:
organization: "mixeway" # the key of the org you chose at step #3
token:
secure: $SONAR_TOKEN
script:
- mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar -Dmaven.test.skip=true -Dsonar.projectKey=Mixeway_MixewayBackend
- mvn package -Dmaven.test.skip=true
- docker build --build-arg JAR_FILE=target/mixeway-0.9.jar -t mixeway/backend:0.9 .
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker push mixeway/backend:0.9
Angular travis.yaml 非常相似(除了 Angular 应用程序的构建时间要长几倍)。我想将两个存储库合并为一个,后端和前端的代码在一个存储库中。我希望有两个独立的管道,因此后端代码的更改不会执行用于构建前端图像的管道。
这可能吗?如果有,怎么做?
【问题讨论】:
标签: continuous-integration travis-ci monorepo