- Home
- Integration and extensions
- Humanitec Pipelines
- Examples
- API-triggered Pipelines
-
- Overview
-
- Overview
- Deploy your Application
- Manage your Java application
- Migrate an Application
- Provision Amazon S3 Buckets
- Deploy an Amazon S3 Resource to production
- Set up the reference architecture in your cloud
- Scaffold a new Workload and create staging and prod Environments
- Update Resource Definitions for related Applications
- Provision a Redis cluster on AWS using Terraform
- Perform daily developer activities (debug, rollback, diffs, logs)
- Deploy ephemeral Environments
-
-
API-triggered Pipelines
On this page
Run tests before cloning to production #
In some environments, continuously deploying all changes from development to production may not be desirable. It may be more important to promote on a manually (or externally) triggered schedule.
The following Pipeline
can be triggered over the API and will execute tests using GitHub Actions before cloning and deploying.
This Pipeline can now be executed through API requests or by clicking the Run button in the Humanitec Platform Orchestrator UI.
pipeline.yaml
(view on GitHub)
:
name: Promotion
on:
pipeline_call:
inputs: {}
permissions:
application: developer
env-types:
production: deployer
# we don't want deployments to development happening while we are running tests there
concurrency:
group: blocking-${{ pipeline.app.id }}-development
jobs:
main:
steps:
- uses: actions/humanitec/github-workflow@v1
with:
repo: my-github-organization/my-github-repository
ref: main
workflow: ".github/workflows/push.yml"
# Read access token from a secret Application value
access_token: "${{ app.values.github-token }}"
inputs:
environment: development
- uses: actions/humanitec/clone@v1
id: clone
with:
from_env_id: development
to_env_id: production
- uses: actions/humanitec/deploy@v1
with:
env_id: production
set_id: ${{ steps.clone.outputs.set_id }}
comment: Copy of development