Skip to content

Workflow ​

Workflow is a resource that belongs to Project and allows performing automated tasks when a matching event happens.

When the matching event happens, called triggering event, workflow creates a Pipeline with appropriate arguments that perform the automated tasks. As an optimization and to prevent doing unnecessary work, if a pipeline is in the queue and has not started yet, workflow updates the pipeline's arguments. This is useful for the cases where you push new commits rapidly to your GitHub repository.

INFO

Pipelines have their own cost apart from the services. Please look at Pipeline documentation about pricing and cost.

To view the workflows of a project:

  • Open a project by choosing it in Projects page,
  • Use Workflows link in the sidebar located at left.

GitHub Workflows ​

While workflow is designed to support other kind of events, currently only support for GitHub is implemented. GitHub workflow is able to listen two different events emitted by GitHub to Yelken:

  • Commit Push
  • Pull Request (PR) Open

You can configure the behavior of Yelken for these events. For push event, you can specify which branch Yelken should create a pipeline for. As you push commits to your repository, GitHub notifies Yelken about the event. If the referenced branch is the specified one in the workflow, Yelken creates a pipeline or updates an existing pipeline with arguments like commit hash and committer.

In addition to push events, you can also configure workflow to create a pipeline and deploy the built container image to a service when you open a PR targeting the branch specified in commit event. If you enable listening PR events, there are 3 actions you can choose from when you open a PR:

  1. Create a new environment with a new service.

    Yelken will create a new environment and service in that environment. This provides great isolation by ensuring that service cannot interact any other resources in your other environments.

    When you close or merge the PR, Yelken will also delete the environment and service.

  2. Create a new service inside an existing environment

    If you want your service to access existing resources like a pre populated database, this option enables that.

    When you close or merge the PR, Yelken will only delete the created service.

  3. Update an existing service

    You may also want to update an existing service.

When you create a service from a GitHub repository, under the hood, Yelken also creates a workflow beside the service and configures it with the repository you have selected. By default, it sets the branch, for which commits will be listened, to default branch of your repository. On the other hand, it does not enable listening the Pull Request events. If you would like to enable Pull Requests events for your workflow, you can update the workflow in workflow's details page.

While Yelken creates a workflow for you when you create a service from GitHub repository, you can also create a GitHub workflow manually by using Create Workflow button in the workflows page. You need to provide similar information while creating a service, except that you also need to provide information about how commit push and PR events should be handled.

Deleting Workflow ​

Inside the workflow's details page, use the context button shown as three vertical dots to open context menu and select Delete button. It will require a confirmation from you.