New trigger conditons for actions and pipelines (March 2020)
Buddy is built around a couple of simple rules. The most important are:
- Stability
- Data security
- Simple configuration
- Speed
This week we focus on the last point with new trigger conditions for your actions and pipelines. For example, you can now configure your actions to build CSS only if there were changes in .saas files since the last execution.
Until today, trigger conditions could be based on two things:
Now, we're adding another two:
- Day of week and hour
- Revision status in another pipeline
Run pipelines/actions on specific days and hours
Let's assume that our company works Monday to Friday from 9 AM to 6 PM. During the week, the company employs the Continuous Deployment workflow, which means that all commits to the master branch are automatically deployed to the production server. However, if the pipeline is triggered outside working hours, the deployment needs to be confirmed by a senior developer. This is a healthy solution which lets developers tinker with code, run tests and prepare builds, but saves the company from trouble in case an over-caffeinated dev decides to merge his groundbreaking feature at 3 o'clock in the morning.
The delivery process looks like this:
Image loading...
The confirmation step is handled by adding an extra action called Wait for approval before the deployment. To make sure the action is turned off during the working hours, all we need to do is uncheck them in the condition settings:
Image loading...
Run pipelines/actions only if another pipeline in the same revision finished successfully
The most common project setup involves one pipeline to a staging server where all changes are tested, and one pipeline to the production server with the live version of the application. A good idea is to ensure that the revision which is going to be released to production has passed all testing steps on the staging server.
Image loading...
In this case, what we need to do is to set a trigger condition that will check the status of the execution in the selected pipeline
Image loading...
Once configured, Buddy will check if the status of the revision in the Staging server. The parent pipeline will only run if the execution has successfully finished.
What's next
In the weeks to come, it will be possible to connect various modes of trigger conditions using logical operators (AND
, OR
).
Jarek Dylewski
Customer Support
A journalist and an SEO specialist trying to find himself in the unforgiving world of coders. Gamer, a non-fiction literature fan and obsessive carnivore. Jarek uses his talents to convert the programming lingo into a cohesive and approachable narration.