https://github.com/swisscom/waypoint-plugin-cloudfoundry
A plugin for Hashicorp Waypoint that allows to deploy artifacts on Cloud Foundry
https://github.com/swisscom/waypoint-plugin-cloudfoundry
hashicorp-waypoint waypoint waypoint-plugin
Last synced: about 1 year ago
JSON representation
A plugin for Hashicorp Waypoint that allows to deploy artifacts on Cloud Foundry
- Host: GitHub
- URL: https://github.com/swisscom/waypoint-plugin-cloudfoundry
- Owner: swisscom
- License: mit
- Created: 2021-04-09T15:29:23.000Z (about 5 years ago)
- Default Branch: develop
- Last Pushed: 2023-04-07T11:54:51.000Z (about 3 years ago)
- Last Synced: 2025-04-15T10:18:12.682Z (about 1 year ago)
- Topics: hashicorp-waypoint, waypoint, waypoint-plugin
- Language: Go
- Homepage:
- Size: 273 KB
- Stars: 7
- Watchers: 16
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# waypoint-plugin-cloudfoundry
Plugin for waypoint that adds support for the Cloud Foundry platform.
## Usage
Check out the project in the `example` folder to get an idea of how exactly to use the platform.
### Cloud Foundry deployment
```hcl
deploy {
use "cloudfoundry" {
organisation = "cf organisation"
space = "waypoint-test"
# App name can be overwritten, otherwise the application name from above is used.
# app_name = "hello-world"
# Make sure to create and rename this file, if needed
# it should contain username:password as base64 encoded string
docker_encoded_auth = file(abspath("./docker_encoded_credentials.secret"))
# Defines an Health Check configuration
health_check {
type = "http" # required
endpoint = "/health" # required if type = "http"
timeout = 60
invocation_timeout = 60
}
}
```
### Cloud Foundry release
```hcl
release {
use "cloudfoundry" {
domain = "cfapp.swisscom.com"
# Hostname can be specifically set, if it is different than the app name
# hostname = my-example-app-url
# To stop old instances of the app after release
# stopOldInstances = true
}
}
```
## Initial setup
### Mac OS
Install go:
`brew install go`
Install protoc-gen-go:
`go get google.golang.org/protobuf/cmd/protoc-gen-go`
Build:
`make`
Install locally (make sure the folder $HOME/.config/waypoint/plugins/ exists, if not create beforehand):
`make install`
## Building with Docker
To build plugins for release you can use the `build-docker` Makefile target, this will
build your plugin for all architectures and create zipped artifacts which can be uploaded
to an artifact manager such as GitHub releases.
The built artifacts will be output in the `./releases` folder.
```shell
make build-docker
rm -rf ./releases
docker build --output releases --progress=plain .
#1 [internal] load .dockerignore
#1 transferring context: 2B done
#1 DONE 0.0s
#...
#14 [export_stage 1/1] COPY --from=build /go/plugin/bin/*.zip .
#14 DONE 0.1s
#15 exporting to client
#15 copying files 36.45MB 0.1s done
#15 DONE 0.1s
```
## Building and releasing with GitHub Actions
The action has two main phases:
1. **Build** - This phase builds the plugin binaries for all the supported architectures. It is triggered when pushing
to a branch or on pull requests.
1. **Release** - This phase creates a new GitHub release containing the built plugin. It is triggered when pushing tags
which starting with `v`, for example `v0.1.0`.