mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 18:15:53 +00:00
Add support for service variables to Railway integration, add docs for Railway
This commit is contained in:
@@ -355,10 +355,7 @@ const getAppsRailway = async ({ accessToken }: { accessToken: string }) => {
|
||||
}
|
||||
`;
|
||||
|
||||
const variables = {
|
||||
// userId: '<USER_ID_GOES_HERE>', // Replace with the desired user ID or remove if not needed
|
||||
// teamId: '<TEAM_ID_GOES_HERE>', // Replace with the desired team ID or remove if not needed
|
||||
};
|
||||
const variables = {};
|
||||
|
||||
const { data: { data: { projects: { edges }}} } = await request.post(INTEGRATION_RAILWAY_API_URL, {
|
||||
query,
|
||||
@@ -367,6 +364,7 @@ const getAppsRailway = async ({ accessToken }: { accessToken: string }) => {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${accessToken}`,
|
||||
'Content-Type': 'application/json',
|
||||
'Accept-Encoding': 'application/json'
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@@ -1179,6 +1179,7 @@ const syncSecretsRailway = async ({
|
||||
accessToken: string;
|
||||
}) => {
|
||||
try {
|
||||
|
||||
const query = `
|
||||
mutation UpsertVariables($input: VariableCollectionUpsertInput!) {
|
||||
variableCollectionUpsert(input: $input)
|
||||
@@ -1188,6 +1189,7 @@ const syncSecretsRailway = async ({
|
||||
const input = {
|
||||
projectId: integration.appId,
|
||||
environmentId: integration.targetEnvironmentId,
|
||||
...(integration.targetServiceId ? { serviceId: integration.targetServiceId } : {}),
|
||||
replace: true,
|
||||
variables: secrets
|
||||
};
|
||||
@@ -1201,6 +1203,7 @@ const syncSecretsRailway = async ({
|
||||
headers: {
|
||||
'Authorization': `Bearer ${accessToken}`,
|
||||
'Content-Type': 'application/json',
|
||||
'Accept-Encoding': 'application/json'
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user