Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f88fe43c12 | ||
|
|
48694a6bab |
No files matched your search
+1
-1
@@ -35,4 +35,4 @@ website/vendor
|
||||
*.winfile eol=crlf
|
||||
|
||||
# Compilation outputs
|
||||
/plugins/kms/assets/boundary-plugin*
|
||||
/plugins/kms/assets/*/*/boundary-plugin*
|
||||
+1
-1
@@ -7,7 +7,7 @@ archives:
|
||||
before:
|
||||
hooks:
|
||||
- 'go mod download'
|
||||
- './scripts/plugins.sh'
|
||||
- './scripts/plugins-all.sh'
|
||||
builds:
|
||||
- # Binary naming only required for Terraform CLI 0.12
|
||||
binary: '{{ .ProjectName }}_v{{ .Version }}_x5'
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
## 1.0.9 (June 6, 2022)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* The bug fix released in 1.0.8 to resolve the `plugin is nil` error only worked for
|
||||
Linux AMD64. This was due to a build issue where the plugin binaries were only built for
|
||||
Linux AMD64. Other platforms would receive an error similar to:
|
||||
|
||||
Error: error reading wrappers from "recovery_kms_hcl":
|
||||
Error configuring kms: error fetching kms plugin rpc client:
|
||||
fork/exec boundary-plugin-kms-awskms.gz: exec format error
|
||||
([Issue](https://github.com/hashicorp/terraform-provider-boundary/issues/209)),
|
||||
([PR](https://github.com/hashicorp/terraform-provider-boundary/pull/216)).
|
||||
|
||||
## 1.0.8 (June 1, 2022)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -44,7 +44,7 @@ install-go: ~/.go/bin/go
|
||||
./ci/goinstall.sh
|
||||
|
||||
dev:
|
||||
./scripts/plugins.sh
|
||||
GOOS=${GOOS} GOARCH=${GOARCH} ./scripts/plugins.sh
|
||||
mkdir -p $(INSTALL_PATH)
|
||||
go build -o $(INSTALL_PATH)/terraform-provider-boundary main.go
|
||||
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
package kms_plugin_assets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
"io/fs"
|
||||
"path"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
const contentDir = "assets"
|
||||
|
||||
// content is our static web server content.
|
||||
//go:embed assets
|
||||
var content embed.FS
|
||||
|
||||
func FileSystem() fs.FS {
|
||||
// Remove the root
|
||||
f, err := fs.Sub(content, contentDir)
|
||||
dir := path.Join(contentDir, runtime.GOOS, runtime.GOARCH)
|
||||
f, err := fs.Sub(content, dir)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
This directory contains assets for kms plugins. This file in particular exists
|
||||
so that the Go embed package does not throw errors when importing this module
|
||||
outside of the main tree.
|
||||
@@ -0,0 +1,3 @@
|
||||
This directory contains assets for darwin amd64 kms plugins. This file
|
||||
in particular exists so that the Go embed package does not throw errors
|
||||
when importing this module outside of the main tree.
|
||||
@@ -0,0 +1,3 @@
|
||||
This directory contains assets for darwin arm64 kms plugins. This file
|
||||
in particular exists so that the Go embed package does not throw errors
|
||||
when importing this module outside of the main tree.
|
||||
@@ -0,0 +1,3 @@
|
||||
This directory contains assets for freebsd 386 kms plugins. This file
|
||||
in particular exists so that the Go embed package does not throw errors
|
||||
when importing this module outside of the main tree.
|
||||
@@ -0,0 +1,3 @@
|
||||
This directory contains assets for freebsd amd64 kms plugins. This file
|
||||
in particular exists so that the Go embed package does not throw errors
|
||||
when importing this module outside of the main tree.
|
||||
@@ -0,0 +1,3 @@
|
||||
This directory contains assets for freebsd arm kms plugins. This file
|
||||
in particular exists so that the Go embed package does not throw errors
|
||||
when importing this module outside of the main tree.
|
||||
@@ -0,0 +1,3 @@
|
||||
This directory contains assets for linux 386 kms plugins. This file
|
||||
in particular exists so that the Go embed package does not throw errors
|
||||
when importing this module outside of the main tree.
|
||||
@@ -0,0 +1,3 @@
|
||||
This directory contains assets for linux amd64 kms plugins. This file
|
||||
in particular exists so that the Go embed package does not throw errors
|
||||
when importing this module outside of the main tree.
|
||||
@@ -0,0 +1,3 @@
|
||||
This directory contains assets for linux arm kms plugins. This file
|
||||
in particular exists so that the Go embed package does not throw errors
|
||||
when importing this module outside of the main tree.
|
||||
@@ -0,0 +1,3 @@
|
||||
This directory contains assets for linux arm64 kms plugins. This file
|
||||
in particular exists so that the Go embed package does not throw errors
|
||||
when importing this module outside of the main tree.
|
||||
@@ -0,0 +1,3 @@
|
||||
This directory contains assets for windows 386 kms plugins. This file
|
||||
in particular exists so that the Go embed package does not throw errors
|
||||
when importing this module outside of the main tree.
|
||||
@@ -0,0 +1,3 @@
|
||||
This directory contains assets for windows amd64 kms plugins. This file
|
||||
in particular exists so that the Go embed package does not throw errors
|
||||
when importing this module outside of the main tree.
|
||||
@@ -0,0 +1,9 @@
|
||||
package kms_plugin_assets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//go:embed assets/darwin/amd64
|
||||
var content embed.FS
|
||||
@@ -0,0 +1,9 @@
|
||||
package kms_plugin_assets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//go:embed assets/darwin/arm64
|
||||
var content embed.FS
|
||||
@@ -0,0 +1,9 @@
|
||||
package kms_plugin_assets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//go:embed assets/freebsd/386
|
||||
var content embed.FS
|
||||
@@ -0,0 +1,9 @@
|
||||
package kms_plugin_assets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//go:embed assets/freebsd/amd64
|
||||
var content embed.FS
|
||||
@@ -0,0 +1,9 @@
|
||||
package kms_plugin_assets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//go:embed assets/freebsd/arm
|
||||
var content embed.FS
|
||||
@@ -0,0 +1,9 @@
|
||||
package kms_plugin_assets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//go:embed assets/linux/386
|
||||
var content embed.FS
|
||||
@@ -0,0 +1,9 @@
|
||||
package kms_plugin_assets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//go:embed assets/linux/amd64
|
||||
var content embed.FS
|
||||
@@ -0,0 +1,9 @@
|
||||
package kms_plugin_assets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//go:embed assets/linux/arm
|
||||
var content embed.FS
|
||||
@@ -0,0 +1,9 @@
|
||||
package kms_plugin_assets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//go:embed assets/linux/arm64
|
||||
var content embed.FS
|
||||
@@ -0,0 +1,9 @@
|
||||
package kms_plugin_assets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//go:embed assets/windows/386
|
||||
var content embed.FS
|
||||
@@ -0,0 +1,9 @@
|
||||
package kms_plugin_assets
|
||||
|
||||
import (
|
||||
"embed"
|
||||
)
|
||||
|
||||
// content is our static kms plugin content.
|
||||
//go:embed assets/windows/amd64
|
||||
var content embed.FS
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# This script builds the required plugins for all supported distributions.
|
||||
set -e
|
||||
|
||||
# Get the parent directory of where this script is.
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
||||
export DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
|
||||
|
||||
platforms="darwin/arm64 darwin/amd64 freebsd/386 freebsd/amd64 freebsd/arm linux/386 linux/amd64 linux/arm linux/arm64 windows/386 windows/amd64"
|
||||
|
||||
cd $DIR/scripts;
|
||||
for platform in ${platforms}
|
||||
do
|
||||
split=(${platform//\// })
|
||||
goos=${split[0]}
|
||||
goarch=${split[1]}
|
||||
GOOS=${goos} GOARCH=${goarch} ./plugins.sh
|
||||
done
|
||||
+15
-5
@@ -3,6 +3,16 @@
|
||||
# This script builds the required plugins.
|
||||
set -e
|
||||
|
||||
if [[ -z "$GOOS" ]]; then
|
||||
echo "Must provide GOOS in environment" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "GOARCH" ]]; then
|
||||
echo "Must provide GOARCH in environment" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BINARY_SUFFIX=""
|
||||
if [ "${GOOS}x" = "windowsx" ]; then
|
||||
BINARY_SUFFIX=".exe"
|
||||
@@ -13,16 +23,16 @@ SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done
|
||||
export DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )"
|
||||
|
||||
echo "==> Building kms plugins..."
|
||||
rm -f $DIR/plugins/kms/assets/boundary-plugin-kms*
|
||||
echo "==> Building kms plugins for ${GOOS}-${GOARCH}..."
|
||||
rm -f $DIR/plugins/kms/assets/${GOOS}/${GOARCH}/boundary-plugin-kms-*
|
||||
for CURR_PLUGIN in $(ls $DIR/plugins/kms/mains); do
|
||||
echo "==> Building $CURR_PLUGIN plugin..."
|
||||
cd $DIR/plugins/kms/mains/$CURR_PLUGIN;
|
||||
go build -v -o $DIR/plugins/kms/assets/boundary-plugin-kms-${CURR_PLUGIN}${BINARY_SUFFIX} .;
|
||||
go build -v -o $DIR/plugins/kms/assets/${GOOS}/${GOARCH}/boundary-plugin-kms-${CURR_PLUGIN}${BINARY_SUFFIX} .;
|
||||
cd $DIR;
|
||||
done;
|
||||
cd $DIR/plugins/kms/assets;
|
||||
for CURR_PLUGIN in $(ls boundary-plugin*); do
|
||||
cd $DIR/plugins/kms/assets/${GOOS}/${GOARCH};
|
||||
for CURR_PLUGIN in $(ls boundary-plugin-kms-*); do
|
||||
echo "==> gzip $CURR_PLUGIN plugin..."
|
||||
gzip -f -9 $CURR_PLUGIN;
|
||||
done;
|
||||
|
||||
Reference in new issue
Block a user