Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
@backstage/plugin-scaffolder-backend-module-gitlab
Advanced tools
Welcome to the Gitlab Module for Scaffolder.
Here you can find all Gitlab related features to improve your scaffolder:
# From your Backstage root directory
yarn --cwd packages/backend add @backstage/plugin-scaffolder-backend-module-gitlab
Then ensure that both the scaffolder and this module are added to your backend:
// In packages/backend/src/index.ts
const backend = createBackend();
// ...
backend.add(import('@backstage/plugin-scaffolder-backend'));
backend.add(import('@backstage/plugin-scaffolder-backend-module-gitlab'));
After that you can use the actions in your template:
apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: gitlab-demo
title: Gitlab DEMO
description: Scaffolder Gitlab Demo
spec:
owner: backstage/techdocs-core
type: service
parameters:
- title: Fill in some steps
required:
- name
properties:
name:
title: Name
type: string
description: Unique name of the component
ui:autofocus: true
ui:options:
rows: 5
- title: Choose a location
required:
- repoUrl
properties:
repoUrl:
title: Repository Location
type: string
ui:field: RepoUrlPicker
ui:options:
allowedHosts:
- gitlab.com
steps:
- id: fetch
name: Fetch
action: fetch:template
input:
url: https://github.com/TEMPLATE
values:
name: ${{ parameters.name }}
- id: createGitlabGroup
name: Ensure Gitlab group exists
action: gitlab:group:ensureExists
input:
repoUrl: ${{ parameters.repoUrl }}
path:
- path
- to
- group
- id: publish
name: Publish
action: publish:gitlab
input:
description: This is ${{ parameters.name }}
repoUrl: ${{ parameters.repoUrl }}?owner=${{ steps.createGitlabGroup.output.groupId }}
sourcePath: pimcore
defaultBranch: main
- id: gitlab-deploy-token
name: Create Deploy Token
action: gitlab:projectDeployToken:create
input:
repoUrl: ${{ parameters.repoUrl }}
projectId: "${{ steps['publish'].output.projectId }}"
name: ${{ parameters.name }}-secret
username: ${{ parameters.name }}-secret
scopes: ['read_registry']
- id: gitlab-access-token
name: Gitlab Project Access Token
action: gitlab:projectAccessToken:create
input:
repoUrl: ${{ parameters.repoUrl }}
projectId: "${{ steps['publish-manifest'].output.projectId }}"
name: ${{ parameters.name }}-access-token
accessLevel: 40
scopes: ['read_repository', 'write_repository']
- id: gitlab-project-variable
name: Gitlab Project Variable
action: gitlab:projectVariable:create
input:
repoUrl: ${{ parameters.repoUrl }}
projectId: "${{ steps['publish'].output.projectId }}"
key: 'VARIABLE_NAME'
value: "${{ steps['gitlab-access-token'].output.access_token }}"
variableType: 'env_var'
masked: true
variableProtected: false
raw: false
environmentScope: '*'
- id: register
name: Register
action: catalog:register
input:
repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }}
catalogInfoPath: '/catalog-info.yaml'
- id: gitlabIssue
name: Issues
action: gitlab:issues:create
input:
repoUrl: ${{ parameters.repoUrl }}
token: ${{ secrets.USER_OAUTH_TOKEN }}
projectId: 1111111
title: Test Issue
assignees:
- 2222222
description: This is the description of the issue
confidential: true
createdAt: 2022-09-27 18:00:00.000
dueDate: 2024-09-28 12:00:00.000
epicId: 3333333
labels: phase1:label1,phase2:label2
output:
links:
- title: Repository
url: ${{ steps['publish'].output.remoteUrl }}
- title: Link to new issue
url: ${{ steps['gitlabIssue'].output.issueUrl }}
FAQs
Unknown package
The npm package @backstage/plugin-scaffolder-backend-module-gitlab receives a total of 40,809 weekly downloads. As such, @backstage/plugin-scaffolder-backend-module-gitlab popularity was classified as popular.
We found that @backstage/plugin-scaffolder-backend-module-gitlab demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.