Closed bchenSyd closed 6 years ago
Actually, as far as I understand this, you can specify multiple jobs, just by inserting them without stage
property.
# From the examples
jobs:
include:
- stage: test
script: ./test 1
- # stage name not required, will continue to use `test`
script: ./test 2
- stage: deploy
script: ./deploy
So the equivalent of your code, should, I suppose, be:
jobs:
include:
- stage: stage1
script: script1
script: script2
- stage: stage2
script: script3
script: script4
I do agree though, that it could be done better. I love how circleci
implemented this using deployment
property instead of jobs
and assigning specifics there.
deployment:
production:
branch: production
commands:
- cmd1
- cmd2
I dont thinks its a valid ymal file
jobs:
include:
- stage: stage1
script: script1
script: script2
- stage: stage2
script: script3
script: script4
sorry, correct yaml file:
jobs:
include:
- stage: stage1
script: script1
script: script2
- stage: stage2
script: script3
script: script4
Valid, but script: script2
will overwrite script: script1
and script: script4
will overwrite script: script3
As Stages is now released and GA, I'm going to close this issue.
If you have any feedback on improvements we should consider, please feel free to add a discussion in our new Community forum: https://travis-ci.community/c/product
Happy building
Josh
I can understand how build stage is current designed. It's just not intuitive. the structure suggests that one stage can only contain one script, and if you want more than one scripts in one stage, you need to define a new script following current stage, whilst it should be defined within the stage, isn't it?
would below configuration makes more sense?