-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Stages: Flexible and practical Continuous Delivery pipelines #11
Comments
@joshk - I have a somewhat related question. Do you consider introducing a new tagging system that would trigger only part of the build pipeline? The usecase I have in mind is very simple: run unit tests, if they pass run the docs build. But for pure docs PRs, no need to do the first step so a |
Hi @bsipocz Hmmmm, that is an interesting idea. Not at the moment, but it might be something for us to consider later. I think this might be a bit of an edge use case, although we might be surprised by what people need and want. 😄 |
That sounds interesting! The following feature would be very useful to me: My build has a number of jobs (7 total). I want to run all of them on my release branch. However, I only want to run a subset of them on my feature branches to speed up the Travis run and to save resources. According to support (thanks @joepvd !) this is not possible right now but might be in the future 😉 Would that be useful for other people, too? |
@larsxschneider I love this idea, and definitely think it is a valid use case! |
...it was about time! 😅 All kidding aside, in my opinion this is THE missing feature of Travis which will also tempt all Jenkins lovers to give Travis another try. I would strongly suggest to have a look at the great job that the GitLab guys have done with pipelines and environments (no, I'm not part of the GitLab team). |
Hi, it's looking good so far! In the example, the unit tests are bash scripts. For us, though, the unit tests are in multiple services, each with their own GH repo, and they currently trigger CI builds. The issue we have with this is that it doesn't report CI failures back to the GH issue that triggered it. I'm thinking about replacing the CI step with a pipeline repo, but I still don't see how to get around this issue. So lets say I set it up like this:
Then when someone submits a PR in I'm expecting that this is how almost everyone is going to want to use it. Multiple repos that act as event triggers for the pipeline, and the pipeline should report back to them with its result. Eg even if you're not deploying, once you split your project into multiple repos, to use the pipeline to coordinate across those repos, they'll see their unit tests as just the first stage in their pipeline repo. Also, shout out to y'all for working on this, I'm a huge Travis fan, and was worried I'd have to find a different CI or write a lot of wrapper code in order to get this kind of feature. Also, thx to @BanzaiMan for pointing me at it ❤️ |
Nice one! Is it possible to somehow "name" the jobs so that the job's intent is also revealed in the UI? |
Hi everyone! Build Stages are now in Public Beta 🚀 https://blog.travis-ci.com/2017-05-11-introducing-build-stages Looking forward to hearing what you all think! |
This looks really nice! The one thing I'd love though is conditional stages. The same |
First: Wow! This looks really really cool. With that said, I think I found a bug? Maybe? My build stages aren't respected correctly if I specify a ruby version at the top level (config, build log), only if I specify it inside the job itself (config, build log). That is to say, language: ruby
rvm: '2.4'
cache:
bundler: true
jobs:
include:
- stage: prepare cache
script: true
- stage: test
script: bundle show
- stage: test
script: bundle show
- stage: test
script: bundle show gives me four "Test" jobs and one "Prepare Cache" job, in that order, while inlining the language: ruby
cache:
bundler: true
jobs:
include:
- stage: prepare cache
script: true
rvm: '2.4'
- stage: test
script: bundle show
rvm: '2.4'
- stage: test
script: bundle show
rvm: '2.4'
- stage: test
script: bundle show
rvm: '2.4' I would have expected them to be equivalent? |
Deployment is a central piece of every Continuous Delivery pipeline. Some organization or projects do not want to go with the Continuous Deployment model as it doesn't fit their workflow. That means they'd rather decide when to deploy on demand instead of deploying with every change. Are you planning to support the definition of a stage that can be triggered manually through the UI? |
Python docker test/build/deploy fails for unknown reasons when converted to build stages. Should a separate issue be created? When debugged and each step run in the tmate shell, everything works as expected. |
Thanks for the feedback, everyone! We are collecting all your input, and we will conduct another planning phase after a certain amount of time, and evaluate your ideas, concerns, and feature requests. So, your input is very valuable to us. @pimterry This makes sense. The @hawkrives I see how this is confusing, and looks as if both configs should be equivalent. The reason why they're not is that @bmuschko Yes, that is one of the additions on our list. In fact, it was mentioned in the original, very first whiteboarding session, and it has had an impact on the specific config format that we have chosen for build stages. @soaxelbrooke Yes, it would make sense to either open a separate issue, or email support@travis-ci.org with details. Again, thank you all! |
Hi guys! Great feature! I've just started to playing with it and have got an issue with build matrix: |
@popravich Hello. For individual issues, please open a separate issue at https://github.com/travis-ci/travis-ci/issues/new, or send email to support@travis-ci.com. Thanks. |
I’d love it if the |
@jeffbyrnes If you do not want
Do you mean that you don't want to see the message at all? |
I'm seeing the same behavior as @hawkrives: there is no way to declare stages that execute before the build matrix. Any top-level keys that trigger any sort of build matrix ( The only solution I've found is to avoid the build matrix, manually enumerating each job of the matrix within my Is there a way to share build cache between jobs with different environments? For example, can I populate the yarn cache in a stage using |
imho the syntax is rather complex and hard to grasp comparing to gitlab-ci. i already had serious headache trying to understand how to use matrix. and to make even worse stages and matrix can be also combined! travis syntax endorses that all my scripts get nested several levels deep of indentation. for example, let's take deploy-github-releases example:
perhaps some syntax addon to write section names from root level instead typing in the actual script? jobs:
include:
- script: &.test1
- script: &.test2
- stage: GitHub Release
script: echo "Deploying to npm ..."
deploy: &.deploy
.test1: |
echo "Running unit tests (1)"
.test2: |
echo "Running unit tests (2)"
.deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
skip_cleanup: true
on:
tags: true
ps: [deploy-github-releases] lacks |
@cspotcode Could you elaborate on how you would like to mix the build matrix and the stages, where you might want to execute some of it before the matrix? As for the cache question, what is "an environment" when you say:
The answer to your question, I believe, is "no", because |
@BanzaiMan "An environment" means all of the things that make the cache names different: node version, ruby version, environment variables, OS, etc. I agree that sharing cache between node 6 and 7 may not work in general, which is why the default behavior is to have different caches. I'm asking if there is a way to override that behavior in situations where a developer knows that sharing cache will safely afford them a performance benefit without causing problems. EDIT fixed a typo |
@flovilmart As mentioned before, for particular use case issues, please open a separate issue at https://github.com/travis-ci/travis-ci/issues/new. Thanks. |
Hi, Is there a list of YAML keys I have to remove from config (and move to |
@webknjaz I am not sure if such a list should exist. This feature is meant to be compatible with the existing configuration, and if you had to do extra work, then there might be a bug. In travis-ci/travis-ci#7754 (comment), I identified |
Is there any way I can make certain parts of the matrix be in one stage, and others in another? Kind of like how |
Hey there, as tweeted here it would be super nice, if it would be possible to skip stages on certain branches. Something like this: jobs:
include:
- stage: test
rvm: 2.3.1
script: bundle exec rspec
- stage: test
rvm: 2.4.1
script: bundle exec rspec
- stage: deploy
rvm: 2.3.1
branches:
- master
- production My use case is, that I want to test if something breaks in the latest version of Ruby, while still keeping my main test suite in line with the version that is run in the respective production environment and only deploy with that version. However, the I know there are workarounds, but I'd like the stages features to support that natively (I only want to deploy if all test stages are green) |
functionality already requested and approved, yet no ETA: |
I have an issue with my travis syntax when I try to integrate that new feature
|
perhaps describing the issue you are facing would help |
travis linter simply fails, I don‘t see why. |
Sharing files via stages, definetely should be done differently then via external systems. In the gitlab-ci it is done really simply, by 'artifacts' property in yml. Here should be same. |
The linter is sadly out of date at the moment. Many of the recent keys are not recognized. We have plans to improve this aspect of our services, but it will be a little while. Sharing storage has been raised as a missing feature many times before, and we recognize that it is critical. |
@BanzaiMan Thanks it works now. First I had real syntax issues and I tried with the linter to fix it but then got stuck at that key jobs. But it works like a charm now. :) |
This seems to be a very interesting feature. It will be very nice if I can see the status of these individual stages in my github pull request page. |
Just have time to test the new feature and loving it so far! Kudos to Travis team. From my tests I have found an undocumented feature. I could name the stage from the build matrix by adding a top-level
|
By canceling all but one job in the pipeline I've gotten a job stuck in the yellow "created" state. https://travis-ci.org/cucumber/cucumber-jvm/builds/254134986?utm_source=github_status Steps to reproduce:
I would expect the build to be either marked canceled or failed. |
I've put the coverity_scan plugin in a stage. See here: https://github.com/Griffon26/vhde/blob/master/.travis.yml#L61 Should that work? I assumed so, because I can also override the global apt plugin settings in a stage. When the job runs the coverity scan is skipped and I see no logging whatsoever related to the coverity scan plugin: https://travis-ci.org/Griffon26/vhde/jobs/254260753 |
@shepmaster Thanks for the additional input. I've added your example to our internal tracking issue. @roperto Thanks for the suggestion. It seems to me that your usecase would be covered by adding more filtering/condition capabilities, which is something that is on our list. @colby-swandale Sorry for the late response. If you still have this issue/question it might be best to get in touch with support via email support@travis-ci.com @EmilDafinov @alorma @seivan Thanks for the suggestion. Yes, allowing a name and/or description for jobs has been suggested a few times, and it's on our list of things to consider. @webknjaz Thanks for the suggestion on improving the message for allowed failures on our UI. I'll forward this to our UI/web team. @ghedamat @webknjaz Yes, you are right. Jobs in later stages end up in a @aontas @ELD It sounds like your setup should be very possible. If you're still having this issue could you please get in touch with support via email? support@travis-ci.com @ELD Thanks for the suggestion of a @23Skidoo Thanks for the suggestions. There are no plans to introduce a more complicated pipeline setup at this time. However, we're collecting usecases and thoughts to be considered in a future iteration. If you could outline your case more that would be valuable input. Making cache slugs more customizable is on our list. @envygeeks Thanks for the suggestions. Listing stage names, and specifying their order is one improvement pretty high on our list. I'm not sure I understand what you mean by "global matrixes were respected when it comes to env" ... could you elaborate? Also, the example linked by @skeggse should work. If you still have this issue, could you get in touch with support via email? support@travis-ci.com @timofurrer Development on this has not started, yet, no, sorry. We're still in the planning phase for the most part. Also, thanks for the pointer about the missing message. I'll forward that to our UI/web team. @SkySkimmer Thanks for the detailed writeup on your case. Do I understand this correctly that you'd need either more flexibility in using our built-in cache feature (i.e. customize cache slugs according to your needs), or need a different way of sharing build artifacts between jobs? @jsmaniac Thanks for documenting this. I'll open a ticket to consider adding this to our documentation. @pawamoy Thanks for the report, and for the suggestion. I'll open a ticket about the bug, and add your suggestion for a separate color to our list of things to consider. @bsideup Thanks for the suggestion. This has come up a few times, and it's high on our list of things to consider for the next iteration. @leighmcculloch @asifdxtreme Thanks for the suggestion. I understand integrating with the GitHub UI in more detail would be desirable. However, the GitHub commit status API has a couple issues for us, and we're essentially hitting their limits, and as far as I understand they're trying to figure out improvements. So this might not be the best time for us to make such a huge change. I'll still add your suggestion to our list of things to re-evaluate this later. @szpak Thanks for the report about the stage not being canceled. From your report it seems this clearly is a bug, I suspect a race'y condition between the component that cancels, and the component that schedules jobs. I'll open a ticket for this. @stianst Thanks for the feedback! The ability to share artifacts between jobs on different stages more easily is definitely on our list. The ability to name jobs also is on the list of things to be considered. @bkimminich Thanks for the suggestion. I can see how this makes sense in your usecase. I've added it to our list, and we'll consider this in a future iteration. I'm not sure about the outcome of that evaluation, yet, but I'm certain we won't prioritize it before work on a new travis.yml parser (and format specification) has been completed, so in any case this might not happen for a while. @maciejtreder Improved support for sharing artifacts between stages is pretty high on our list. @thedrow If I understand your case correctly then, yes, at the moment you'd need to specify these jobs individually. If you still have this issue, could you please email support? support@travis-ci.com @weitjong Hah, this is interesting, thanks for documenting this here. I would not have expected this to work, but I can now see how this works accidentally. I'd recommend not relying on it too much for the time being, even though it might actually make sense to add it as an official feature. @mpkorstanje Thanks a lot for the report. This clearly is a bug. I'll open a ticket for this and look into it. @Griffon26 From what I can tell I would guess this should work, but it might be something specific to coverity_scan. I'd recommend getting in touch with support via email support@travis-ci.com. |
To use the cache to share artifacts I would need a way to share cache between arbitrary jobs (maybe this is what you mean by customize cache slugs) and also some idea of what happens when the cache is modified by parallel jobs. |
Can I ask why there https://travis-ci.org/nette/application/builds/256732761 is not stage "Code Coverage" from allow_failures? |
as you included only 2 jobs to autogenerated matrix and let unexisting job to fail |
@dg |
Update: I revoke my question for now - just saw that I had a great mixup with matrix, python versions, and jobs. Still, it is quite confusing how these features can be combined. This is a great feature. However, I am struggling to get it to work. The way jobs and matrix expand into stages is a mystery to me. The documentation does not really help to this end. I am able to produce this build: https://travis-ci.org/blue-yonder/sqlalchemy_exasol/builds/257765684 What I want are stages with two build jobs each (one Exasol5 one Exasol6 - see matrix), and one Python version used in each stage (either 2 or 3). Ignore for a second that the build is failing - I have a version in the commit history where the builds worked. First, I'd like to see the stages well aligned. Where am I holding it wrong? |
I'd like it if later stages ran once failed jobs from earlier stages are restarted and pass. e.g. If I have two stages, "Test" and "Deploy", and "Test" is composed of 4 jobs, and one of those 4 fail, I can restart it. But if it then passes, the "Deploy" stage doesn't automatically run, and I have to manually start it. |
I'm locking this issue for the time being. Most of the bug reports and feature requests are now understood. Thanks. |
Accidentally closed this by referring to one comment here in a pull request. Thanks @ljharb for the pointer! ❤️
|
We have shipped "Build Stages Iteration 2", fixing several bugs, and introducing "Build Stages Order" as well as "Conditional Builds, Stages, and Jobs". See our blog post for details: https://blog.travis-ci.com/2017-09-12-build-stages-order-and-conditions We have also opened a new beta feature feedback issue here: #28 |
From simple deployment pipelines, to complex testing groups, the world is your CI and CD oyster with Build Stages.
Build Stages allows you and your team to compose groups of Jobs which are only started once the previous Stage has finished.
You can mix Linux and Mac VMs together, or split them into different Stages. Since each Stage is configurable, there are endless Build pipeline possibilities!
This feature will be available for general beta testing soon... watch this space 😄
We love to hear feedback, it's the best way for us to improve and shape Travis CI. Please leave all thoughts/comments/ideas related to this feature here.
Happy Testing!
The text was updated successfully, but these errors were encountered: