rename gitlab scaffolder actions
Signed-off-by: Dominik Pfaffenbauer <dominik@pfaffenbauer.at>
This commit is contained in:
@@ -20,9 +20,9 @@ Configure the action:
|
||||
// packages/backend/src/plugins/scaffolder.ts
|
||||
|
||||
import {
|
||||
createGitlabProjectVariable,
|
||||
createGitlabProjectAccessToken,
|
||||
createGitlabProjectDeployToken,
|
||||
createGitlabProjectAccessTokenAction,
|
||||
createGitlabProjectAccessTokenAction,
|
||||
createGitlabProjectDeployTokenAction,
|
||||
} from '@backstage/plugin-scaffolder-backend-module-gitlab';
|
||||
|
||||
// Create BuiltIn Actions
|
||||
@@ -36,13 +36,13 @@ const builtInActions = createBuiltinActions({
|
||||
// Add Gitlab Actions
|
||||
const actions = [
|
||||
...builtInActions,
|
||||
createGitlabProjectVariable({
|
||||
createGitlabProjectAccessTokenAction({
|
||||
integrations: integrations,
|
||||
}),
|
||||
createGitlabProjectAccessToken({
|
||||
createGitlabProjectAccessTokenAction({
|
||||
integrations: integrations,
|
||||
}),
|
||||
createGitlabProjectDeployToken({
|
||||
createGitlabProjectDeployTokenAction({
|
||||
integrations: integrations,
|
||||
}),
|
||||
];
|
||||
@@ -116,7 +116,7 @@ spec:
|
||||
|
||||
- id: gitlab-deploy-token
|
||||
name: Create Deploy Token
|
||||
action: gitlab:create-project-deploy-token
|
||||
action: gitlab:pdt:create
|
||||
input:
|
||||
repoUrl: ${{ parameters.repoUrl }}
|
||||
projectId: "${{ steps['publish'].output.projectId }}"
|
||||
@@ -126,7 +126,7 @@ spec:
|
||||
|
||||
- id: gitlab-access-token
|
||||
name: Gitlab Access Token
|
||||
action: gitlab:create-project-access-token
|
||||
action: gitlab:pat:create
|
||||
input:
|
||||
repoUrl: ${{ parameters.repoUrl }}
|
||||
projectId: "${{ steps['publish-manifest'].output.projectId }}"
|
||||
@@ -136,7 +136,7 @@ spec:
|
||||
|
||||
- id: gitlab-project-variable
|
||||
name: Manifest CI/CD Variable
|
||||
action: gitlab:create-project-variable
|
||||
action: gitlab:pv:create
|
||||
input:
|
||||
repoUrl: ${{ parameters.repoUrl }}
|
||||
projectId: "${{ steps['publish'].output.projectId }}"
|
||||
|
||||
@@ -7,7 +7,7 @@ import { ScmIntegrationRegistry } from '@backstage/integration';
|
||||
import { TemplateAction } from '@backstage/plugin-scaffolder-node';
|
||||
|
||||
// @public
|
||||
export const createGitlabProjectAccessToken: (options: {
|
||||
export const createGitlabProjectAccessTokenAction: (options: {
|
||||
integrations: ScmIntegrationRegistry;
|
||||
}) => TemplateAction<{
|
||||
repoUrl: string;
|
||||
@@ -19,7 +19,7 @@ export const createGitlabProjectAccessToken: (options: {
|
||||
}>;
|
||||
|
||||
// @public
|
||||
export const createGitlabProjectDeployToken: (options: {
|
||||
export const createGitlabProjectDeployTokenAction: (options: {
|
||||
integrations: ScmIntegrationRegistry;
|
||||
}) => TemplateAction<{
|
||||
repoUrl: string;
|
||||
@@ -31,7 +31,7 @@ export const createGitlabProjectDeployToken: (options: {
|
||||
}>;
|
||||
|
||||
// @public
|
||||
export const createGitlabProjectVariable: (options: {
|
||||
export const createGitlabProjectVariableAction: (options: {
|
||||
integrations: ScmIntegrationRegistry;
|
||||
}) => TemplateAction<{
|
||||
repoUrl: string;
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ import { getToken } from '../util';
|
||||
* @param options - Templating configuration.
|
||||
* @public
|
||||
*/
|
||||
export const createGitlabProjectAccessToken = (options: {
|
||||
export const createGitlabProjectAccessTokenAction = (options: {
|
||||
integrations: ScmIntegrationRegistry;
|
||||
}) => {
|
||||
const { integrations } = options;
|
||||
@@ -36,7 +36,7 @@ export const createGitlabProjectAccessToken = (options: {
|
||||
scopes: string[];
|
||||
token?: string;
|
||||
}>({
|
||||
id: 'gitlab:create-project-access-token',
|
||||
id: 'gitlab:pat:create',
|
||||
schema: {
|
||||
input: {
|
||||
required: ['projectId', 'repoUrl'],
|
||||
+2
-2
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createGitlabProjectDeployToken } from './createProjectDeployToken';
|
||||
import { createGitlabProjectDeployTokenAction } from './createGitlabProjectDeployTokenAction';
|
||||
import { ScmIntegrations } from '@backstage/integration';
|
||||
import { ConfigReader } from '@backstage/config';
|
||||
import { getVoidLogger } from '@backstage/backend-common';
|
||||
@@ -51,7 +51,7 @@ describe('gitlab:create-deploy-token', () => {
|
||||
});
|
||||
|
||||
const integrations = ScmIntegrations.fromConfig(config);
|
||||
const action = createGitlabProjectDeployToken({ integrations });
|
||||
const action = createGitlabProjectDeployTokenAction({ integrations });
|
||||
const mockContext = {
|
||||
input: {
|
||||
repoUrl: 'gitlab.com?repo=repo&owner=owner',
|
||||
+2
-2
@@ -27,7 +27,7 @@ import { InputError } from '@backstage/errors';
|
||||
* @param options - Templating configuration.
|
||||
* @public
|
||||
*/
|
||||
export const createGitlabProjectDeployToken = (options: {
|
||||
export const createGitlabProjectDeployTokenAction = (options: {
|
||||
integrations: ScmIntegrationRegistry;
|
||||
}) => {
|
||||
const { integrations } = options;
|
||||
@@ -39,7 +39,7 @@ export const createGitlabProjectDeployToken = (options: {
|
||||
scopes: string[];
|
||||
token?: string;
|
||||
}>({
|
||||
id: 'gitlab:create-project-deploy-token',
|
||||
id: 'gitlab:pdt:create',
|
||||
schema: {
|
||||
input: {
|
||||
required: ['projectId', 'repoUrl'],
|
||||
+2
-2
@@ -25,7 +25,7 @@ import { Gitlab } from '@gitbeaker/node';
|
||||
* @param options - Templating configuration.
|
||||
* @public
|
||||
*/
|
||||
export const createGitlabProjectVariable = (options: {
|
||||
export const createGitlabProjectVariableAction = (options: {
|
||||
integrations: ScmIntegrationRegistry;
|
||||
}) => {
|
||||
const { integrations } = options;
|
||||
@@ -41,7 +41,7 @@ export const createGitlabProjectVariable = (options: {
|
||||
environmentScope: string;
|
||||
token?: string;
|
||||
}>({
|
||||
id: 'gitlab:create-project-variable',
|
||||
id: 'gitlab:pv:create',
|
||||
schema: {
|
||||
input: {
|
||||
required: [
|
||||
@@ -19,6 +19,6 @@
|
||||
* @packageDocumentation
|
||||
*/
|
||||
|
||||
export * from './actions/createProjectDeployToken';
|
||||
export * from './actions/createProjectAccessToken';
|
||||
export * from './actions/createProjectVariable';
|
||||
export * from './actions/createGitlabProjectDeployTokenAction';
|
||||
export * from './actions/createGitlabProjectAccessTokenAction';
|
||||
export * from './actions/createGitlabProjectVariableAction';
|
||||
|
||||
Reference in New Issue
Block a user