We're using pipelines to run our test suite, and we have a bitbucket-pipelines.yml file like so:
image: java:8
clone:
depth: 1
definitions:
caches:
gradle: ~/.gradle
gradlewrapper: ~/.gradle/wrapper
runTaggedTests: &runTaggedTests
- step:
caches:
- gradle
- gradlewrapper
script:
- cd tests
- TESTHOST=$HOST.domain.com bash ./gradlew test -PincludeTags=$TAG
runAllTests: &runAllTests
- parallel:
- step: *runTaggedTests
variables:
TAG: testTag1
- step: *runTaggedTests
variables:
TAG: testTag2
pipelines:
custom: # triggered manually or via schedule
test-env1:
- step: *runAllTests
variables:
HOST: test-env1
test-env2:
- step: *runAllTests
variables:
HOST: test-env1
However this pipeline fails because the step is defined as a list. I think I can do this using pipes, but I'm wondering if there's a simple way to fix the definitions above to work, as I'd rather fix this file (which is familiar to all of our devs) rather than introduce custom pipes (which are unfamiliar to all of our devs) if I can.
Also tried this:
image: java:8
clone:
depth: 1
definitions:
caches:
gradle: ~/.gradle
gradlewrapper: ~/.gradle/wrapper
runTaggedTests: &runTaggedTests
- step:
caches:
- gradle
- gradlewrapper
script:
- cd tests
- TESTHOST=$HOST.domain.com bash ./gradlew test -PincludeTags=$TAG
runAllTests: &runAllTests
- parallel:
- step:
<<: *runTaggedTests
variables:
TAG: testTag1
- step:
<<: *runTaggedTests
variables:
TAG: testTag2
pipelines:
custom: # triggered manually or via schedule
testenv1:
- step:
<<: *runAllTests
variables:
HOST: testenv1
but still no dice (this one fails with "There is an error in your bitbucket-pipelines.yml at [pipelines > custom > testenv1 > 0 > parallel > 0]. To be precise: The step section is empty or null.")
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.