I have a .travis.yml defined like this , and I have env vars defined in settings
language: go
go: 1.14.x
services:
- docker
branches:
only:
# - master
- develop
- /^release-[0-9]+\..*$/
stages:
# - unit-test # Not implemented yet
- build
- build ppc
# - test-e2e # Not implemented yet
# - Git Clone 2.3
- FVT 2.3
- Git Clone my
- FVT Deploy my
- FVT Test Install
- FVT Test Functions
- FVT Test Uninstall
- manifest
jobs:
include:
# Build and push image for all architectures
- stage: build
if: env(STAGE_BUILD) = true
env: ARCH=linux
os: linux
script:
- make docker/registry/login
- make unittest
- make build
- stage: FVT 2.3
if: branch = release-2.3
script:
- make fvt
- stage: Git Clone my
if: branch NOT IN (my-feature, release-2.3)
env:
script:
- make fvt-git-clone-my
- stage: FVT Deploy my
if: env(STAGE_DEPLOY) = true AND branch NOT IN (my-feature, release-2.3)
script:
- make fvt-deploy-my
- stage: FVT Test Install
if: env(STAGE_FUNCTION) = true AND branch NOT IN (my-feature, release-2.3)
env: CMD=installTest
script:
- make installTest
- stage: FVT Test Functions
if: env(STAGE_FUNCTION) = true AND branch NOT IN (my-feature, release-2.3)
env: CMD=functionTest
script:
- make functionTest
- stage: FVT Test Uninstall
if: env(STAGE_FUNCTION) = true AND branch NOT IN (my-feature, release-2.3)
env: CMD=uninstallTest
script:
- make uninstallTest
$ export STAGE_FUNCTION=true
$ export STAGE_DEPLOY=true
$ export STAGE_BUILD=true
But the build
stage is always ignored by Travis. And other stages are all executed.