environment_staged_changes
Creates, updates, deletes, gets or lists an environment_staged_changes resource.
Overview​
| Name | environment_staged_changes |
| Type | Resource |
| Id | railway.environments.environment_staged_changes |
Fields​
The following fields are returned by SELECT queries:
- get
One EnvironmentPatch row.
| Name | Datatype | Description |
|---|---|---|
id | string | |
environment_id | string | |
applied_at | string (date-time) | |
applied_by | object | AppliedByMember object |
created_at | string (date-time) | |
last_applied_error | string | |
message | string | |
patch | object | |
status | string | (APPLYING, COMMITTED, FAILED, STAGED) |
updated_at | string (date-time) |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | environment_id | Get the latest staged commit for a single environment. Backed by the Railway GraphQL query environmentStagedChanges. | |
commit | exec | environment_id | commit_message, skip_deploys | Commits the staged changes for a single environment. Backed by the Railway GraphQL mutation environmentPatchCommitStaged. |
stage | exec | environment_id, input | merge | Sets the staged patch for a single environment. Backed by the Railway GraphQL mutation environmentStageChanges. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
environment_id | string | |
commit_message | string | |
input | object | |
merge | string | Merge the input patch into the existing staged patch. Boolean passed as a string, for example 'true'. |
skip_deploys | string | Skip deploys for services affected by this patch. Boolean passed as a string, for example 'true'. |
SELECT examples​
- get
Get the latest staged commit for a single environment. Backed by the Railway GraphQL query environmentStagedChanges.
SELECT
id,
environment_id,
applied_at,
applied_by,
created_at,
last_applied_error,
message,
patch,
status,
updated_at
FROM railway.environments.environment_staged_changes
WHERE environment_id = '{{ environment_id }}' -- required
;
Lifecycle Methods​
- commit
- stage
Commits the staged changes for a single environment. Backed by the Railway GraphQL mutation environmentPatchCommitStaged.
EXEC railway.environments.environment_staged_changes.commit
@environment_id='{{ environment_id }}', --required
@commit_message='{{ commit_message }}',
@skip_deploys='{{ skip_deploys }}'
;
Sets the staged patch for a single environment. Backed by the Railway GraphQL mutation environmentStageChanges.
EXEC railway.environments.environment_staged_changes.stage
@environment_id='{{ environment_id }}', --required
@input='{{ input }}', --required
@merge='{{ merge }}'
;