1 | /*
|
2 | * Copyright © 2019 Atomist, Inc.
|
3 | *
|
4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | * you may not use this file except in compliance with the License.
|
6 | * You may obtain a copy of the License at
|
7 | *
|
8 | * http://www.apache.org/licenses/LICENSE-2.0
|
9 | *
|
10 | * Unless required by applicable law or agreed to in writing, software
|
11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 | * See the License for the specific language governing permissions and
|
14 | * limitations under the License.
|
15 | */
|
16 |
|
17 | import { AnyOptions } from "@atomist/automation-client";
|
18 | import { SoftwareDeliveryMachineConfiguration } from "@atomist/sdm";
|
19 |
|
20 | /**
|
21 | * Configuration determining how to run in local mode
|
22 | */
|
23 | export interface LocalSoftwareDeliveryMachineOptions {
|
24 |
|
25 | /**
|
26 | * Base of expanded directory tree the local client will work with:
|
27 | * The projects the SDM can operate on. Defaulting rule handled in
|
28 | * sdm-local.
|
29 | * Under this we find /<org>/<repo>
|
30 | */
|
31 | repositoryOwnerParentDirectory?: string;
|
32 |
|
33 | /**
|
34 | * Use local seeds (in whatever git state) vs cloning if possible?
|
35 | * Default will be true
|
36 | */
|
37 | preferLocalSeeds?: boolean;
|
38 |
|
39 | /**
|
40 | * Whether to merge autofixes automatically
|
41 | */
|
42 | mergeAutofixes?: boolean;
|
43 |
|
44 | /**
|
45 | * Whether to merge pull request branches automatically.
|
46 | * For instance, if you run a BuildAwareTransform (like Upgrade Spring Boot in the spring seed SDM),
|
47 | * it'll make a branch and then run the build on it; when the build passes,
|
48 | * the SDM will commit the change into your default branch in your working directory.
|
49 | */
|
50 | mergePullRequests?: boolean;
|
51 |
|
52 | /**
|
53 | * Name of host to use for creating local url
|
54 | */
|
55 | hostname?: string;
|
56 | }
|
57 |
|
58 | /**
|
59 | * Configuration that takes SoftwareDeliveryMachineOptions inside the sdm key.
|
60 | */
|
61 | export interface LocalSoftwareDeliveryMachineConfiguration extends SoftwareDeliveryMachineConfiguration {
|
62 | local: LocalSoftwareDeliveryMachineOptions & AnyOptions;
|
63 | }
|