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

Multi VCS trunk #418

Merged
merged 28 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5e58425
Multi VCS (Azure)
peterdeme Dec 7, 2023
ced25b9
Add GitHub docs for MultiVCS
peterdeme Dec 11, 2023
1c48ec8
Update GitLab: added multiple VCSes
truszkowski Dec 11, 2023
55cb13b
removed unused png files
truszkowski Dec 11, 2023
73c8967
docs/integrations/source-control/gitlab.md:146:258 MD047/single-trail…
truszkowski Dec 11, 2023
d7e8af4
oxipng optimalizations for new *.png
truszkowski Dec 11, 2023
b3101d5
azure -> gitlab: fix copy paste
truszkowski Dec 11, 2023
895b833
Update environment screenshots for gitlab
truszkowski Dec 11, 2023
177e305
Update pipeline screenshots for gitlab
truszkowski Dec 11, 2023
add9a8a
Zoomed in pictures for GitLab
peterdeme Dec 12, 2023
099390d
Updating GitHub App link to self-referencing
peterdeme Dec 12, 2023
48d2a13
Typo
peterdeme Dec 12, 2023
de88272
Update Bitbucket screenshots
peterdeme Dec 12, 2023
d2d9bc9
Some notes about access controls
peterdeme Dec 21, 2023
0d637ac
Fix dead gitflow link
peterdeme Jan 12, 2024
294837c
MultiVCS for Bitbucket Cloud
peterdeme Jan 25, 2024
f427a4d
Update bitbucket datacenter - added multiple VCSes
truszkowski Jan 25, 2024
89db40b
optimize new png files
truszkowski Jan 25, 2024
c4aef3e
Datacenter -> Data center
truszkowski Jan 25, 2024
482720f
Minor adjustments
peterdeme Jan 25, 2024
bde2bb6
Add Blueprint docs, plus refresh schema
peterdeme Jan 26, 2024
b5acdaa
Add SaaS gitlab api host URL
peterdeme Jan 26, 2024
db7d8fa
Minor fixes
peterdeme Jan 26, 2024
c30687d
Add MultiVCS to push policy
peterdeme Jan 26, 2024
6bda599
Multi VCS: extend Stack creation and Stack settings page
peterdeme Jan 29, 2024
fcabd30
MultiVCS: update a few screenshots and text
peterdeme Feb 2, 2024
995cca5
update Gitlab & Bitbucket Datacenter: "VCS Management" -> "Source Code"
truszkowski Feb 2, 2024
936617e
Attempt to fix CI
peterdeme Feb 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified docs/assets/screenshots/CleanShot 2022-09-16 at 09.38.30.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/screenshots/CleanShot 2022-09-16 at 10.14.05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/assets/screenshots/Create_Stack_VCS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/screenshots/Gitlab_3dots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/screenshots/Gitlab_create_form.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/screenshots/Gitlab_create_stack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/screenshots/Gitlab_delete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/screenshots/Gitlab_details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/screenshots/Gitlab_pr_1.png
Binary file added docs/assets/screenshots/Gitlab_pr_2.png
Binary file added docs/assets/screenshots/Gitlab_pr_3.png
Binary file added docs/assets/screenshots/Gitlab_set_up_button.png
Binary file added docs/assets/screenshots/Gitlab_vcs_management.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file modified docs/assets/screenshots/Screenshot from 2021-06-10 16-05-39.png
Binary file modified docs/assets/screenshots/Screenshot from 2021-06-10 16-09-36.png
Binary file modified docs/assets/screenshots/Screenshot from 2021-06-11 10-50-38.png
Binary file modified docs/assets/screenshots/Screenshot from 2021-06-11 14-52-40.png
Binary file modified docs/assets/screenshots/Screenshot from 2021-06-11 15-03-21.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file modified docs/assets/screenshots/azureWebhooks3.png
Binary file added docs/assets/screenshots/azure_devops_details.png
Binary file modified docs/assets/screenshots/bitbucket-cloud-webhook-settings.png
Binary file added docs/assets/screenshots/github_install_app.png
Binary file removed docs/assets/screenshots/gitlabsetupsc.png
Diff not rendered.
Binary file removed docs/assets/screenshots/image (101).png
Diff not rendered.
Binary file removed docs/assets/screenshots/image (102).png
Diff not rendered.
Binary file removed docs/assets/screenshots/image (103).png
Diff not rendered.
Binary file removed docs/assets/screenshots/image (106).png
Diff not rendered.
Binary file removed docs/assets/screenshots/image (107).png
Diff not rendered.
Binary file modified docs/assets/screenshots/image (54).png
Binary file removed docs/assets/screenshots/image (72).png
Diff not rendered.
Binary file removed docs/assets/screenshots/image (88).png
Diff not rendered.
Binary file removed docs/assets/screenshots/image (89).png
Diff not rendered.
Binary file removed docs/assets/screenshots/image (92).png
Diff not rendered.
Binary file removed docs/assets/screenshots/image (93).png
Diff not rendered.
Binary file removed docs/assets/screenshots/image (94).png
Diff not rendered.
Binary file removed docs/assets/screenshots/setupsc.png
Diff not rendered.
9 changes: 8 additions & 1 deletion docs/concepts/blueprint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ You can configure the following resources in a Blueprint:
- Name, description, labels, [Space](../spaces/README.md)
- Behavioral settings: administrative, auto-apply, auto-destroy, hooks, runner image etc.
- [VCS configuration](../../integrations/source-control/README.md)
- Both default and Space-level VCS integrations
- Vendor configuration for your IaaC provider
- [Environment variables](../configuration/environment.md#environment-variables), both non-sensitive and sensitive
- [Mounted files](../configuration/environment.md#mounted-files)
Expand Down Expand Up @@ -217,6 +218,7 @@ stack:
# Note that this is just the name of the repository, not the full URL
repository: my-repository
provider: GITHUB # Possible values: GITHUB, GITLAB, BITBUCKET_DATACENTER, BITBUCKET_CLOUD, GITHUB_ENTERPRISE, AZURE_DEVOPS
id: "github-for-my-org" # Optional, only needed if you want to use a Space-level VCS integration. Use the "Copy ID" button to get the ID.
vendor:
terraform:
manage_state: ${{ inputs.manage_state }}
Expand Down Expand Up @@ -830,6 +832,10 @@ For simplicity, here is the current schema, but it might change in the future:
"AZURE_DEVOPS"
]
},
"id": {
"type": "string",
"description": "The id of the VCS provider."
},
"namespace": {
"type": "string"
},
Expand Down Expand Up @@ -1250,7 +1256,8 @@ For simplicity, here is the current schema, but it might change in the future:
"type": "string",
"enum": [
"TERRAFORM_FOSS",
"CUSTOM"
"CUSTOM",
"OPEN_TOFU"
]
}
}
Expand Down
34 changes: 32 additions & 2 deletions docs/concepts/policy/push-policy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ As input, Git push policy receives the following document:
"mergeable": "boolean - indicates whether the PR can be merged",
"title": "string",
"undiverged": "boolean - indicates whether the PR is up to date with the target branch"
}
},
"push": {
// For Git push events, this contains the pushed commit.
// For Pull Request events,
Expand Down Expand Up @@ -384,6 +384,21 @@ As input, Git push policy receives the following document:
"worker_pool": {
"public": "boolean - indicates whether the worker pool is public or not"
}
},
"vcs_integration": {
"id": "string - ID of the VCS integration",
"name": "string - name of the VCS integration",
"provider": "string - possible values are AZURE_DEVOPS, BITBUCKET_CLOUD, BITBUCKET_DATACENTER, GIT, GITHUB, GITHUB_ENTERPRISE, GITLAB",
"description": "string - description of the VCS integration",
"is_default": "boolean - indicates whether the VCS integration is the default one or Space-level",
"space": {
"id": "string",
"labels": ["string"],
"name": "string"
},
"labels": ["string - list of arbitrary, user-defined selectors"],
"updated_at": "number (timestamp in nanoseconds)",
"created_at": "number (timestamp in nanoseconds)"
}
}
```
Expand Down Expand Up @@ -415,7 +430,7 @@ When triggered by a _new module version_, this is the schema of the data input t
"name": "string - name of the worker pool, if it is private",
"public": "boolean - is the worker pool public"
}
}
},
"pull_request": {
"action": "string - opened, reopened, closed, merged, edited, labeled, synchronize, unlabeled",
"action_initiator": "string",
Expand All @@ -429,6 +444,21 @@ When triggered by a _new module version_, this is the schema of the data input t
"message": "string",
"tag": "string"
}
},
"vcs_integration": {
"id": "bitbucket-for-payments-team",
"name": "Bitbucket for Payments Team",
"provider": "BITBUCKET_CLOUD",
"description": "### Payments Team BB integration\n\nThis integration should be **only** used by the Payments Integrations team. If you need access, drop [Joe](https://mycorp.slack.com/users/432JOE435) a message on Slack.",
"is_default": false,
"labels": ["bitbucketcloud", "paymentsorg"],
"space": {
"id": "paymentsteamspace-01HN0BF3GMYZQ4NYVNQ1RKQ9M7",
"labels": [],
"name": "PaymentsTeamSpace"
},
"created_at": 1706187931079960000,
"updated_at": 1706274820310231000
}
}
```
Expand Down
4 changes: 3 additions & 1 deletion docs/concepts/stack/creating-a-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ Also, this is the opportunity to set a few [labels](stack-settings.md#labels). L

![](<../../assets/screenshots/Create_Stack_VCS.png>)

In this step, you will need to tell Spacelift where to look for the Terraform code for the stack - a combination of Git repository and one of its existing branches. The branch that you specify set here is what we called a _tracked_ branch. By default, anything that you push to this branch will be considered for deployment. Anything you push to a different branch will be tested for changes against the current state.
In this step, you will need to tell Spacelift where to look for the IaC code for the stack - if you have multiple integrations per VCS type, then you'll need to choose the one which includes your repository. Please note that only those VCS integrations will appear which the stack Space (set in the previous step) has access to. For example, if the stack Space is `ParentSpace` and the VCS integration Space is `ChildSpace` with inheritance enabled, it will appear. Integrations marked as default will always appear here, regardless of the stack Space. Take a look at the [source control](../../integrations/source-control/README.md) docs for more details.

The branch that you specify set here is what we called a _tracked_ branch. By default, anything that you push to this branch will be considered for deployment. Anything you push to a different branch will be tested for changes against the current state.

The project root configuration is where inside the repository Spacelift should look for the infra project source code (e.g. create a stack for a specific folder in the repository).

Expand Down
12 changes: 8 additions & 4 deletions docs/concepts/stack/stack-settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ If this sounds interesting and you want to give it a try, please refer to the [h

### Autodeploy

Indicates whether changes to the stack can be [applied](../run/README.md#applying) automatically. When autodeploy is set to _true_, any change to the [tracked branch](#repository-and-branch) will automatically be [applied](../run/README.md#applying) if the [planning](../run/README.md#planning) phase was successful and there are no plan policy warnings.
Indicates whether changes to the stack can be [applied](../run/tracked.md#applying) automatically. When autodeploy is set to _true_, any change to the tracked branch will automatically be [applied](../run/tracked.md#applying) if the [planning](../run/proposed.md#planning) phase was successful and there are no plan policy warnings.

Consider setting it to _true_ if you always do a code review before merging to the tracked branch, and/or want to rely on [plan policies](../policy/terraform-plan-policy.md) to automatically flag potential problems. If each candidate change goes through a meaningful human code review with stack [writers](../policy/stack-access-policy.md#readers-and-writers) as reviewers, having a separate step to confirm deployment may be overkill. You may also want to refer to a [dedicated section](../policy/terraform-plan-policy.md#automated-code-review) on using plan policies for automated code review.

### Autoretry

Indicates whether obsolete proposed changes will be retried automatically. When autoretry is set to _true_ and a change gets applied, all Pull Requests to the [tracked branch](#repository-and-branch) conflicting with that change will be reevaluated based on the changed state.
Indicates whether obsolete proposed changes will be retried automatically. When autoretry is set to _true_ and a change gets applied, all Pull Requests to the [tracked branch](#vcs-integration-and-repository) conflicting with that change will be reevaluated based on the changed state.

This saves you from manually retrying runs on Pull Requests when the state changes. This way it also gives you more confidence, that the proposed changes will actually be the actual changes you get after merging the Pull Request.

Expand Down Expand Up @@ -143,7 +143,7 @@ echo "::command arg1 arg2"
Below is a list of supported commands. See the more detailed doc after this table.

| Command | Description |
|---------------------------|----------------------------------------------------------|
| ------------------------- | -------------------------------------------------------- |
| [`::add-mask`](#add-mask) | Adds a set of values that should be masked in log output |

#### ::add-mask
Expand Down Expand Up @@ -231,7 +231,11 @@ Example matches:

As you can see in the example matches, these are the regex rules that you are already accustomed to.

### Repository and branch
### VCS integration and repository

![](<../../assets/screenshots/stack_settings_vcs_page.png>)

We have two types of integrations types: default and Space-level. Default integrations will be always available for all stacks, however Space-level integrations will be available only for stacks that are in the same Space as the integration or have access to it [via inheritance](../spaces/access-control.md#inheritance). Read more about VCS integrations in the [source control](../../integrations/source-control/README.md) page.

_Repository_ and _branch_ point to the location of the source code for a stack. The repository must either belong to the GitHub account linked to Spacelift (its choice may further be limited by the way the Spacelift GitHub app has been installed) or to the GitLab server integrated with your Spacelift account. For more information about these integrations, please refer to our [GitHub](../../integrations/source-control/github.md) and [GitLab](../../integrations/source-control/gitlab.md) documentation respectively.

Expand Down
2 changes: 1 addition & 1 deletion docs/integrations/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ Choose API Keys menu and click on Add new API key

The API key creation form will allow you to specify an arbitrary key name, along with the _Admin_ setting and the list of _teams_. If the key is given admin privileges, it has full access to the Spacelift API and won't be subject to [access policies](../concepts/policy/stack-access-policy.md).

For non-administrative keys, you may want to add a **virtual** list of teams that the key should "belong to" so that existing access policies based on [GitHub teams](source-control/github.md#team-based-access) or [SAML assertions](single-sign-on/README.md#setting-up-the-integration) can work with your API keys just as they do with regular users.
For non-administrative keys, you may want to add a **virtual** list of teams that the key should "belong to" so that existing access policies based on [GitHub teams](source-control/github.md#access-controls) or [SAML assertions](single-sign-on/README.md) can work with your API keys just as they do with regular users.

Without further ado, let's create a non-administrative API key with virtual membership in two teams: _Developers_ and _DevOps:_

Expand Down
Loading
Loading