mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
remove debug logs, update comments, other nitpicks
This commit is contained in:
@@ -21,7 +21,7 @@ export const registerTeamCityConnectionRouter = async (server: FastifyZodProvide
|
||||
updateSchema: UpdateTeamCityConnectionSchema
|
||||
});
|
||||
|
||||
// The below endpoints are not exposed and for Infisical App use
|
||||
// The following endpoints are for internal Infisical App use only and not part of the public API
|
||||
server.route({
|
||||
method: "GET",
|
||||
url: `/:connectionId/projects`,
|
||||
@@ -51,12 +51,9 @@ export const registerTeamCityConnectionRouter = async (server: FastifyZodProvide
|
||||
},
|
||||
onRequest: verifyAuth([AuthMode.JWT]),
|
||||
handler: async (req) => {
|
||||
console.log("HIT1");
|
||||
const { connectionId } = req.params;
|
||||
const projects = await server.services.appConnection.teamcity.listProjects(connectionId, req.permission);
|
||||
|
||||
console.log(projects);
|
||||
|
||||
return projects;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -11,6 +11,7 @@ import {
|
||||
} from "@app/services/secret-sync/teamcity/teamcity-sync-types";
|
||||
|
||||
// Note: Most variables won't be returned with a value due to them being a "password" type (starting with "env.").
|
||||
// TeamCity API returns empty string for password-type variables for security reasons.
|
||||
const listTeamCityVariables = async ({ instanceUrl, accessToken, project, buildConfig }: TTeamCityListVariables) => {
|
||||
const { data } = await request.get<TTeamCityListVariablesResponse>(
|
||||
buildConfig
|
||||
@@ -28,7 +29,7 @@ const listTeamCityVariables = async ({ instanceUrl, accessToken, project, buildC
|
||||
return Object.fromEntries(
|
||||
data.property.map((variable) => [
|
||||
variable.name.startsWith("env.") ? variable.name.substring(4) : variable.name,
|
||||
{ ...variable, value: variable.value || "" } // This will almost always be empty string
|
||||
{ ...variable, value: variable.value || "" } // Password values will be empty strings from the API for security
|
||||
])
|
||||
);
|
||||
};
|
||||
@@ -72,7 +73,7 @@ const deleteTeamCityVariable = async ({
|
||||
return request.delete(
|
||||
buildConfig
|
||||
? `${instanceUrl}/app/rest/buildTypes/${buildConfig}/parameters/${key}`
|
||||
: `${instanceUrl}/app/rest/projects/${project}/parameters/${key}`,
|
||||
: `${instanceUrl}/app/rest/projects/id:${project}/parameters/${key}`,
|
||||
{
|
||||
headers: {
|
||||
Authorization: `Bearer ${accessToken}`
|
||||
@@ -162,7 +163,7 @@ export const TeamCitySyncFns = {
|
||||
} catch (error) {
|
||||
throw new SecretSyncError({
|
||||
error,
|
||||
secretKey: variable.name
|
||||
secretKey: key
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ Infisical supports connecting to TeamCity using an Access Token to securely sync
|
||||
You should now see your newly created token in the list of access tokens.
|
||||

|
||||
</Step>
|
||||
<Step title="Setup Vercel Connection in Infisical">
|
||||
<Step title="Setup TeamCity Connection in Infisical">
|
||||
<Tabs>
|
||||
<Tab title="Infisical UI">
|
||||
1. Navigate to App Connections
|
||||
|
||||
@@ -105,6 +105,7 @@ export const TeamCitySyncFields = () => {
|
||||
onChange(selectedOption?.id ?? "");
|
||||
}}
|
||||
options={buildTypes}
|
||||
isClearable={true}
|
||||
placeholder="Select a build configuration..."
|
||||
getOptionLabel={(option) => option.name}
|
||||
getOptionValue={(option) => option.id}
|
||||
|
||||
Reference in New Issue
Block a user