spaceforge 1.1.1__tar.gz → 1.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {spaceforge-1.1.1 → spaceforge-1.1.3}/PKG-INFO +1 -1
- {spaceforge-1.1.1 → spaceforge-1.1.3}/plugins/envsubst/plugin.py +21 -24
- {spaceforge-1.1.1 → spaceforge-1.1.3}/plugins/envsubst/plugin.yaml +36 -39
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/_version_scm.py +3 -3
- spaceforge-1.1.3/spaceforge/templates/binary_install.sh.j2 +57 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge.egg-info/PKG-INFO +1 -1
- spaceforge-1.1.1/spaceforge/templates/binary_install.sh.j2 +0 -22
- {spaceforge-1.1.1 → spaceforge-1.1.3}/.github/workflows/ci.yml +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/.github/workflows/release.yml +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/.gitignore +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/LICENSE +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/MANIFEST.in +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/README.md +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/go.mod +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/plugins/enviroment_manager/plugin.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/plugins/enviroment_manager/plugin.yaml +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/plugins/enviroment_manager/requirements.txt +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/plugins/infracost/plugin.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/plugins/infracost/plugin.yaml +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/plugins/sops/plugin.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/plugins/sops/plugin.yaml +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/plugins/sops/requirements.txt +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/plugins/wiz/plugin.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/plugins/wiz/plugin.yaml +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/pyproject.toml +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/setup.cfg +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/setup.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/README.md +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/__init__.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/__main__.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/_version.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/cls.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/conftest.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/generator.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/plugin.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/runner.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/schema.json +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/templates/ensure_spaceforge_and_run.sh.j2 +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/test_cls.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/test_generator.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/test_generator_binaries.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/test_generator_core.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/test_generator_hooks.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/test_generator_parameters.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/test_plugin.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/test_plugin_file_operations.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/test_plugin_hooks.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/test_plugin_inheritance.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/test_runner.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/test_runner_cli.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/test_runner_core.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge/test_runner_execution.py +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge.egg-info/SOURCES.txt +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge.egg-info/dependency_links.txt +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge.egg-info/entry_points.txt +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge.egg-info/not-zip-safe +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge.egg-info/requires.txt +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/spaceforge.egg-info/top_level.txt +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/templates.go +0 -0
- {spaceforge-1.1.1 → spaceforge-1.1.3}/test.sh +0 -0
|
@@ -1,31 +1,28 @@
|
|
|
1
|
-
import
|
|
2
|
-
import os
|
|
3
|
-
|
|
4
|
-
from spaceforge import SpaceforgePlugin, Parameter, Variable, Context, Policy, Binary
|
|
1
|
+
from spaceforge import SpaceforgePlugin, Context, Binary
|
|
5
2
|
|
|
6
3
|
|
|
7
4
|
class EnvsubstPlugin(SpaceforgePlugin):
|
|
8
5
|
"""
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
6
|
+
# Plugin Envsubst
|
|
7
|
+
This plugin allows the use of environment variables in Kubernetes manifests.
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
You can define your parameterized Kubernetes manifest as seen below:
|
|
11
|
+
|
|
12
|
+
```yaml
|
|
13
|
+
apiVersion: v1
|
|
14
|
+
kind: Pod
|
|
15
|
+
metadata:
|
|
16
|
+
name: my-pod
|
|
17
|
+
spec:
|
|
18
|
+
containers:
|
|
19
|
+
- name: my-container
|
|
20
|
+
image: my-image
|
|
21
|
+
env:
|
|
22
|
+
- name: MY_ENV_VAR
|
|
23
|
+
value: ${MY_ENV_VAR}
|
|
24
|
+
```
|
|
25
|
+
This expects the environment variable `MY_ENV_VAR` to be defined in the Kubernetes Spacelift stack.
|
|
29
26
|
"""
|
|
30
27
|
|
|
31
28
|
# Plugin metadata
|
|
@@ -2,6 +2,42 @@ name: Envsubst
|
|
|
2
2
|
version: 1.0.0
|
|
3
3
|
description: |-
|
|
4
4
|
# Plugin Envsubst
|
|
5
|
+
This plugin allows the use of environment variables in Kubernetes manifests.
|
|
6
|
+
|
|
7
|
+
## Usage
|
|
8
|
+
You can define your parameterized Kubernetes manifest as seen below:
|
|
9
|
+
|
|
10
|
+
```yaml
|
|
11
|
+
apiVersion: v1
|
|
12
|
+
kind: Pod
|
|
13
|
+
metadata:
|
|
14
|
+
name: my-pod
|
|
15
|
+
spec:
|
|
16
|
+
containers:
|
|
17
|
+
- name: my-container
|
|
18
|
+
image: my-image
|
|
19
|
+
env:
|
|
20
|
+
- name: MY_ENV_VAR
|
|
21
|
+
value: ${MY_ENV_VAR}
|
|
22
|
+
```
|
|
23
|
+
This expects the environment variable `MY_ENV_VAR` to be defined in the Kubernetes Spacelift stack.
|
|
24
|
+
author: Spacelift Team
|
|
25
|
+
labels:
|
|
26
|
+
- kubernetes
|
|
27
|
+
- environment
|
|
28
|
+
contexts:
|
|
29
|
+
- name_prefix: ZZZZZ-envsubst
|
|
30
|
+
description: Main context for Envsubst
|
|
31
|
+
env: []
|
|
32
|
+
mounted_files:
|
|
33
|
+
- path: /mnt/workspace/plugins/envsubst/plugin.py
|
|
34
|
+
content: |-
|
|
35
|
+
from spaceforge import SpaceforgePlugin, Context, Binary
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class EnvsubstPlugin(SpaceforgePlugin):
|
|
39
|
+
"""
|
|
40
|
+
# Plugin Envsubst
|
|
5
41
|
This plugin allows the use of environment variables in Kubernetes manifests.
|
|
6
42
|
|
|
7
43
|
## Usage
|
|
@@ -21,45 +57,6 @@ description: |-
|
|
|
21
57
|
value: ${MY_ENV_VAR}
|
|
22
58
|
```
|
|
23
59
|
This expects the environment variable `MY_ENV_VAR` to be defined in the Kubernetes Spacelift stack.
|
|
24
|
-
author: Spacelift Team
|
|
25
|
-
labels:
|
|
26
|
-
- kubernetes
|
|
27
|
-
- environment
|
|
28
|
-
contexts:
|
|
29
|
-
- name_prefix: ZZZZZ-envsubst
|
|
30
|
-
description: Main context for Envsubst
|
|
31
|
-
env: []
|
|
32
|
-
mounted_files:
|
|
33
|
-
- path: /mnt/workspace/plugins/envsubst/plugin.py
|
|
34
|
-
content: |-
|
|
35
|
-
import json
|
|
36
|
-
import os
|
|
37
|
-
|
|
38
|
-
from spaceforge import SpaceforgePlugin, Parameter, Variable, Context, Policy, Binary
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
class EnvsubstPlugin(SpaceforgePlugin):
|
|
42
|
-
"""
|
|
43
|
-
# Plugin Envsubst
|
|
44
|
-
This plugin allows the use of environment variables in Kubernetes manifests.
|
|
45
|
-
|
|
46
|
-
## Usage
|
|
47
|
-
You can define your parameterized Kubernetes manifest as seen below:
|
|
48
|
-
|
|
49
|
-
```yaml
|
|
50
|
-
apiVersion: v1
|
|
51
|
-
kind: Pod
|
|
52
|
-
metadata:
|
|
53
|
-
name: my-pod
|
|
54
|
-
spec:
|
|
55
|
-
containers:
|
|
56
|
-
- name: my-container
|
|
57
|
-
image: my-image
|
|
58
|
-
env:
|
|
59
|
-
- name: MY_ENV_VAR
|
|
60
|
-
value: ${MY_ENV_VAR}
|
|
61
|
-
```
|
|
62
|
-
This expects the environment variable `MY_ENV_VAR` to be defined in the Kubernetes Spacelift stack.
|
|
63
60
|
"""
|
|
64
61
|
|
|
65
62
|
# Plugin metadata
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '1.1.
|
|
32
|
-
__version_tuple__ = version_tuple = (1, 1,
|
|
31
|
+
__version__ = version = '1.1.3'
|
|
32
|
+
__version_tuple__ = version_tuple = (1, 1, 3)
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'gba72947b8'
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
set -e
|
|
4
|
+
|
|
5
|
+
export PATH="/mnt/workspace/plugins/plugin_binaries:$PATH"
|
|
6
|
+
if command -v {{binary.name}}; then
|
|
7
|
+
echo "{{binary.name}} is already installed."
|
|
8
|
+
return
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
echo "Installing {{binary.name}}..."
|
|
12
|
+
mkdir -p {{static_binary_directory}}
|
|
13
|
+
|
|
14
|
+
ARCH="$(arch)"
|
|
15
|
+
if [ "$ARCH" = "x86_64" ]; then
|
|
16
|
+
URL="{{amd64_url}}"
|
|
17
|
+
elif [ "$ARCH" = "arm64" ]; then
|
|
18
|
+
URL="{{arm64_url}}"
|
|
19
|
+
else
|
|
20
|
+
echo "Error: Unsupported architecture '$ARCH'"
|
|
21
|
+
exit 1
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
case "$URL" in
|
|
25
|
+
*.tar.gz|*.tar.bz2|*.zip)
|
|
26
|
+
TMP_DIR=$(mktemp -d)
|
|
27
|
+
trap 'rm -rf "$TMP_DIR"' EXIT
|
|
28
|
+
|
|
29
|
+
ARCHIVE="$TMP_DIR/archive"
|
|
30
|
+
curl "$URL" -o "$ARCHIVE" -fL
|
|
31
|
+
|
|
32
|
+
case "$URL" in
|
|
33
|
+
*.tar.gz)
|
|
34
|
+
tar -xzf "$ARCHIVE" -C "$TMP_DIR" || { echo "Error: Failed to extract archive"; exit 1; }
|
|
35
|
+
;;
|
|
36
|
+
*.tar.bz2)
|
|
37
|
+
tar -xjf "$ARCHIVE" -C "$TMP_DIR" || { echo "Error: Failed to extract archive"; exit 1; }
|
|
38
|
+
;;
|
|
39
|
+
*.zip)
|
|
40
|
+
unzip -o "$ARCHIVE" -d "$TMP_DIR" || { echo "Error: Failed to extract archive"; exit 1; }
|
|
41
|
+
;;
|
|
42
|
+
esac
|
|
43
|
+
|
|
44
|
+
FOUND_BINARY=$(find "$TMP_DIR" -type f -name "{{binary.name}}" | head -n 1)
|
|
45
|
+
if [ -z "$FOUND_BINARY" ]; then
|
|
46
|
+
echo "Error: Could not find binary '{{binary.name}}' in extracted archive"
|
|
47
|
+
exit 1
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
mv "$FOUND_BINARY" "{{binary_path}}"
|
|
51
|
+
;;
|
|
52
|
+
*)
|
|
53
|
+
curl "$URL" -o "{{binary_path}}" -fL
|
|
54
|
+
;;
|
|
55
|
+
esac
|
|
56
|
+
|
|
57
|
+
chmod +x "{{binary_path}}"
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
|
|
3
|
-
set -e
|
|
4
|
-
|
|
5
|
-
export PATH="/mnt/workspace/plugins/plugin_binaries:$PATH"
|
|
6
|
-
if command -v {{binary.name}}; then
|
|
7
|
-
echo "{{binary.name}} is already installed."
|
|
8
|
-
return
|
|
9
|
-
fi
|
|
10
|
-
|
|
11
|
-
echo "Installing {{binary.name}}..."
|
|
12
|
-
mkdir -p {{static_binary_directory}}
|
|
13
|
-
cd {{static_binary_directory}}
|
|
14
|
-
|
|
15
|
-
if [ "$(arch)" = "x86_64" ]; then
|
|
16
|
-
curl {{amd64_url}} -o {{binary_path}} -L
|
|
17
|
-
else
|
|
18
|
-
curl {{arm64_url}} -o {{binary_path}} -L
|
|
19
|
-
fi
|
|
20
|
-
|
|
21
|
-
chmod +x {{binary_path}}
|
|
22
|
-
cd /mnt/workspace/source/$TF_VAR_spacelift_project_root
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|