Integrating Waypoint with Jenkins
Warning
This content is part of the legacy version of Waypoint that is no longer actively maintained. For additional information on the new vision of Waypoint, check out this blog post and the HCP Waypoint documentation.
Using Waypoint to deploy an application from within Jenkins is similar to how you might deploy an application from your own workspace.
Your Jenkins runner must have Waypoint installed to execute it in a step.
This can be accomplished by installing Waypoint on the runner
using the standard installation instructions such as from the Waypoint
apt
repository. In addition, any dependencies such as authentication details or anything
else required by Waypoint plugins must be available in the
execution environment.
Note that this example assumes use of a declarative pipeline.
Note: The Waypoint server authentication variables here are inlined but it is recommended to set the secret environment variables in a secure fashion such as credentials binding
Workspaces
This example assumes the use of a single default workspace. If this was in a job triggered by a GitHub commit or pull request and may be an ephemeral development environment, you may want to interpolate the relevant Git ref for the workspace parameter using something like the git parameter plugin, as demonstrated below:
Example