mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Add Aashish to README
This commit is contained in:
@@ -86,7 +86,7 @@ const getApps = async ({
|
||||
});
|
||||
break;
|
||||
case INTEGRATION_CIRCLECI:
|
||||
apps = await getAppsCircleci({
|
||||
apps = await getAppsCircleCI({
|
||||
accessToken,
|
||||
});
|
||||
break;
|
||||
@@ -333,11 +333,17 @@ const getAppsFlyio = async ({ accessToken }: { accessToken: string }) => {
|
||||
return apps;
|
||||
};
|
||||
|
||||
const getAppsCircleci = async ({ accessToken }: { accessToken: string }) => {
|
||||
// in place of accessToken we have to send Circle-Token i.e. Personal API token from CircleCi
|
||||
/**
|
||||
* Return list of projects for CircleCI integration
|
||||
* @param {Object} obj
|
||||
* @param {String} obj.accessToken - access token for CircleCI API
|
||||
* @returns {Object[]} apps -
|
||||
* @returns {String} apps.name - name of CircleCI apps
|
||||
*/
|
||||
const getAppsCircleCI = async ({ accessToken }: { accessToken: string }) => {
|
||||
let apps: any;
|
||||
try {
|
||||
let res = (
|
||||
const res = (
|
||||
await axios.get(
|
||||
`${INTEGRATION_CIRCLECI_API_URL}/v1.1/projects`,
|
||||
{
|
||||
@@ -353,15 +359,12 @@ const getAppsCircleci = async ({ accessToken }: { accessToken: string }) => {
|
||||
return {
|
||||
name: a?.reponame
|
||||
}
|
||||
})
|
||||
});
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
Sentry.setUser(null);
|
||||
Sentry.captureException(err);
|
||||
throw new Error("Failed to get Render services");
|
||||
throw new Error("Failed to get CircleCI projects");
|
||||
}
|
||||
|
||||
console.log("hello apps");
|
||||
|
||||
return apps;
|
||||
};
|
||||
|
||||
@@ -124,7 +124,7 @@ const syncSecrets = async ({
|
||||
});
|
||||
break;
|
||||
case INTEGRATION_CIRCLECI:
|
||||
await syncSecretsCircleci({
|
||||
await syncSecretsCircleCI({
|
||||
integration,
|
||||
secrets,
|
||||
accessToken,
|
||||
@@ -1185,7 +1185,14 @@ const syncSecretsFlyio = async ({
|
||||
}
|
||||
};
|
||||
|
||||
const syncSecretsCircleci = async ({
|
||||
/**
|
||||
* Sync/push [secrets] to CircleCI project
|
||||
* @param {Object} obj
|
||||
* @param {IIntegration} obj.integration - integration details
|
||||
* @param {Object} obj.secrets - secrets to push to integration (object where keys are secret keys and values are secret values)
|
||||
* @param {String} obj.accessToken - access token for CircleCI integration
|
||||
*/
|
||||
const syncSecretsCircleCI = async ({
|
||||
integration,
|
||||
secrets,
|
||||
accessToken,
|
||||
@@ -1206,7 +1213,7 @@ const syncSecretsCircleci = async ({
|
||||
|
||||
const { slug } = circleciOrganizationDetail;
|
||||
|
||||
// inject secrets to CircleCI (one by one)
|
||||
// sync secrets to CircleCI
|
||||
Object.keys(secrets).forEach(
|
||||
async (key) =>
|
||||
await axios.post(
|
||||
|
||||
@@ -125,6 +125,15 @@ const INTEGRATION_OPTIONS = [
|
||||
clientId: '',
|
||||
docsLink: ''
|
||||
},
|
||||
{
|
||||
name: 'Circle CI',
|
||||
slug: 'circleci',
|
||||
image: 'Circle CI.png',
|
||||
isAvailable: true,
|
||||
type: 'pat',
|
||||
clientId: '',
|
||||
docsLink: ''
|
||||
},
|
||||
{
|
||||
name: 'Azure Key Vault',
|
||||
slug: 'azure-key-vault',
|
||||
@@ -152,15 +161,6 @@ const INTEGRATION_OPTIONS = [
|
||||
type: '',
|
||||
clientId: '',
|
||||
docsLink: ''
|
||||
},
|
||||
{
|
||||
name: 'Circle CI',
|
||||
slug: 'circleci',
|
||||
image: 'Circle CI.png',
|
||||
isAvailable: true,
|
||||
type: 'pat',
|
||||
clientId: '',
|
||||
docsLink: ''
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ export default function CircleCICreateIntegrationPage() {
|
||||
isError={apiKeyErrorText !== '' ?? false}
|
||||
>
|
||||
<Input
|
||||
placeholder='rnd_xxx'
|
||||
placeholder=''
|
||||
value={apiKey}
|
||||
onChange={(e) => setApiKey(e.target.value)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user