Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support selfhosted spacelift urls (#5) #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jstrese
Copy link

@jstrese jstrese commented May 12, 2024

This change addresses #5.

With this change we introduce the spacelift_url variable. The default value is app.spacelift.io. When using the default value, no changes should be noticed from previous versions.

When spacelift_url is set to the non-default value, a new policy file will be applied (assets/policy-custom.rego):

  • The templatefile function will replace ${spacelift_url} in the OPA file with the value of var.spacelift_url
  • URLs in this custom OPA file use the following formats
    • ${spacelift_url}/module/
    • ${spacelift_url}/stack/

Testing
Two new tests have been introduced

  1. Test setting spacelift_url to a non-default value
  2. Negative test for an invalid custom spacelift_url

Other Changes

  1. The hard-coded space_id in tests was changed to var.spacelift_space_id. This allows non-spacelifters to test.

@michalg9 michalg9 requested a review from a team September 6, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant