3 * Copyright (C) 2009-2024 SonarSource SA
4 * mailto:info AT sonarsource DOT com
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 3 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 import { BasicSeparator, Title, TutorialStep, TutorialStepList } from 'design-system';
21 import * as React from 'react';
22 import { translate } from '../../../helpers/l10n';
23 import { AlmKeys, AlmSettingsInstance } from '../../../types/alm-settings';
24 import { Component } from '../../../types/types';
25 import { LoggedInUser } from '../../../types/users';
26 import AllSet from '../components/AllSet';
27 import GithubCFamilyExampleRepositories from '../components/GithubCFamilyExampleRepositories';
28 import YamlFileStep from '../components/YamlFileStep';
29 import { BuildTools, TutorialModes } from '../types';
30 import AnalysisCommand from './AnalysisCommand';
31 import RepositoryVariables from './RepositoryVariables';
34 REPOSITORY_VARIABLES = 1,
39 export interface BitbucketPipelinesTutorialProps {
40 almBinding?: AlmSettingsInstance;
43 currentUser: LoggedInUser;
44 mainBranchName: string;
45 willRefreshAutomatically?: boolean;
48 export default function BitbucketPipelinesTutorial(props: BitbucketPipelinesTutorialProps) {
49 const { almBinding, baseUrl, currentUser, component, willRefreshAutomatically, mainBranchName } =
52 const [done, setDone] = React.useState<boolean>(false);
55 <Title>{translate('onboarding.tutorial.with.bitbucket_ci.title')}</Title>
57 <TutorialStepList className="sw-mb-8">
59 title={translate('onboarding.tutorial.with.bitbucket_pipelines.variables.title')}
62 almBinding={almBinding}
65 currentUser={currentUser}
68 <TutorialStep title={translate('onboarding.tutorial.with.bitbucket_pipelines.yaml.title')}>
69 <YamlFileStep setDone={setDone}>
72 {buildTool === BuildTools.CFamily && (
73 <GithubCFamilyExampleRepositories
74 className="sw-my-4 sw-w-abs-600"
75 ci={TutorialModes.BitbucketPipelines}
81 mainBranchName={mainBranchName}
90 <BasicSeparator className="sw-my-10" />
92 alm={AlmKeys.BitbucketCloud}
93 willRefreshAutomatically={willRefreshAutomatically}