Add different stages for different events. (#67)
* add different stages for different events. * Simplify the image build parameters for build stage. * add master branch as condition for full stage.
This commit is contained in:
Родитель
1741e3a5d1
Коммит
198fc3115e
|
@ -17,7 +17,14 @@ env:
|
|||
|
||||
jobs:
|
||||
include:
|
||||
- stage: rake full
|
||||
- stage: build
|
||||
if: type = pull_request
|
||||
install: true
|
||||
script:
|
||||
- docker build --build-arg BUILD_TERRAFORM_VERSION=${TERRAFORM_VERSION} -t ${IMAGE_NAME} .
|
||||
- docker run ${IMAGE_NAME} rake build
|
||||
- stage: full
|
||||
if: type = push AND branch = master
|
||||
install: true
|
||||
script:
|
||||
- docker build --build-arg BUILD_TERRAFORM_VERSION=${TERRAFORM_VERSION} --build-arg BUILD_ARM_SUBSCRIPTION_ID=$ARM_SUBSCRIPTION_ID --build-arg BUILD_ARM_CLIENT_ID=$ARM_CLIENT_ID --build-arg BUILD_ARM_CLIENT_SECRET=$ARM_CLIENT_SECRET --build-arg BUILD_ARM_TENANT_ID=$ARM_TENANT_ID -t ${IMAGE_NAME} .
|
||||
|
|
Загрузка…
Ссылка в новой задаче