Merge pull request #13252 from backstage/freben/api-well-ok-then

When the 🧹 s go marching in
This commit is contained in:
Fredrik Adelöw
2022-08-23 13:55:58 +02:00
committed by GitHub
273 changed files with 2469 additions and 1529 deletions
-52
View File
@@ -11,8 +11,6 @@ import { Entity } from '@backstage/catalog-model';
import { OAuthApi } from '@backstage/core-plugin-api';
import { RouteRef } from '@backstage/core-plugin-api';
// Warning: (ae-missing-release-tag) "ActionsGetWorkflowResponseData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ActionsGetWorkflowResponseData = {
id: string;
@@ -37,16 +35,12 @@ export type ActionsGetWorkflowResponseData = {
timing: Timing2;
};
// Warning: (ae-missing-release-tag) "ActionsListWorkflowRunsForRepoResponseData" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ActionsListWorkflowRunsForRepoResponseData {
// (undocumented)
builds: ActionsGetWorkflowResponseData[];
}
// Warning: (ae-missing-release-tag) "BUILD" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface BUILD {
// (undocumented)
@@ -55,8 +49,6 @@ export interface BUILD {
startTime: string;
}
// Warning: (ae-missing-release-tag) "CLOUDBUILD_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const CLOUDBUILD_ANNOTATION = 'google.com/cloudbuild-project-slug';
@@ -79,8 +71,6 @@ export type CloudbuildApi = {
}) => Promise<any>;
};
// Warning: (ae-missing-release-tag) "cloudbuildApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const cloudbuildApiRef: ApiRef<CloudbuildApi>;
@@ -107,8 +97,6 @@ export class CloudbuildClient implements CloudbuildApi {
reRunWorkflow(options: { projectId: string; runId: string }): Promise<void>;
}
// Warning: (ae-missing-release-tag) "cloudbuildPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
const cloudbuildPlugin: BackstagePlugin<
{
@@ -120,27 +108,19 @@ const cloudbuildPlugin: BackstagePlugin<
export { cloudbuildPlugin };
export { cloudbuildPlugin as plugin };
// Warning: (ae-missing-release-tag) "EntityCloudbuildContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const EntityCloudbuildContent: () => JSX.Element;
// Warning: (ae-missing-release-tag) "EntityLatestCloudbuildRunCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const EntityLatestCloudbuildRunCard: (props: {
branch: string;
}) => JSX.Element;
// Warning: (ae-missing-release-tag) "EntityLatestCloudbuildsForBranchCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const EntityLatestCloudbuildsForBranchCard: (props: {
branch: string;
}) => JSX.Element;
// Warning: (ae-missing-release-tag) "FETCHSOURCE" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface FETCHSOURCE {
// (undocumented)
@@ -149,27 +129,19 @@ export interface FETCHSOURCE {
startTime: string;
}
// Warning: (ae-missing-release-tag) "isCloudbuildAvailable" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
const isCloudbuildAvailable: (entity: Entity) => boolean;
export { isCloudbuildAvailable };
export { isCloudbuildAvailable as isPluginApplicableToEntity };
// Warning: (ae-missing-release-tag) "LatestWorkflowRunCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const LatestWorkflowRunCard: (props: { branch: string }) => JSX.Element;
// Warning: (ae-missing-release-tag) "LatestWorkflowsForBranchCard" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const LatestWorkflowsForBranchCard: (props: {
branch: string;
}) => JSX.Element;
// Warning: (ae-missing-release-tag) "Options" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface Options {
// (undocumented)
@@ -182,8 +154,6 @@ export interface Options {
substitutionOption: string;
}
// Warning: (ae-missing-release-tag) "PullTiming" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface PullTiming {
// (undocumented)
@@ -192,8 +162,6 @@ export interface PullTiming {
startTime: string;
}
// Warning: (ae-missing-release-tag) "ResolvedStorageSource" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface ResolvedStorageSource {
// (undocumented)
@@ -204,8 +172,6 @@ export interface ResolvedStorageSource {
object: string;
}
// Warning: (ae-missing-release-tag) "Results" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface Results {
// (undocumented)
@@ -214,21 +180,15 @@ export interface Results {
buildStepOutputs: string[];
}
// Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const Router: () => JSX.Element;
// Warning: (ae-missing-release-tag) "Source" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface Source {
// (undocumented)
storageSource: StorageSource;
}
// Warning: (ae-missing-release-tag) "SourceProvenance" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface SourceProvenance {
// (undocumented)
@@ -237,8 +197,6 @@ export interface SourceProvenance {
resolvedStorageSource: {};
}
// Warning: (ae-missing-release-tag) "Step" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface Step {
// (undocumented)
@@ -263,8 +221,6 @@ export interface Step {
waitFor: string[];
}
// Warning: (ae-missing-release-tag) "StorageSource" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface StorageSource {
// (undocumented)
@@ -273,8 +229,6 @@ export interface StorageSource {
object: string;
}
// Warning: (ae-missing-release-tag) "Substitutions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface Substitutions {
// (undocumented)
@@ -289,8 +243,6 @@ export interface Substitutions {
SHORT_SHA: string;
}
// Warning: (ae-missing-release-tag) "Timing" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface Timing {
// (undocumented)
@@ -299,8 +251,6 @@ export interface Timing {
startTime: string;
}
// Warning: (ae-missing-release-tag) "Timing2" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface Timing2 {
// (undocumented)
@@ -309,8 +259,6 @@ export interface Timing2 {
FETCHSOURCE: FETCHSOURCE;
}
// Warning: (ae-missing-release-tag) "Volume" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export interface Volume {
// (undocumented)
@@ -20,6 +20,7 @@ import {
} from '../api/types';
import { createApiRef } from '@backstage/core-plugin-api';
/** @public */
export const cloudbuildApiRef = createApiRef<CloudbuildApi>({
id: 'plugin.cloudbuild.service',
});
+16
View File
@@ -14,10 +14,12 @@
* limitations under the License.
*/
/** @public */
export interface ActionsListWorkflowRunsForRepoResponseData {
builds: ActionsGetWorkflowResponseData[];
}
/** @public */
export type ActionsGetWorkflowResponseData = {
id: string;
status: string;
@@ -41,6 +43,7 @@ export type ActionsGetWorkflowResponseData = {
timing: Timing2;
};
/** @public */
export interface Step {
name: string;
args: string[];
@@ -54,16 +57,19 @@ export interface Step {
pullTiming: PullTiming;
}
/** @public */
export interface Timing2 {
BUILD: BUILD;
FETCHSOURCE: FETCHSOURCE;
}
/** @public */
export interface SourceProvenance {
resolvedStorageSource: {};
fileHashes: {};
}
/** @public */
export interface Options {
machineType: string;
substitutionOption: string;
@@ -71,6 +77,7 @@ export interface Options {
dynamicSubstitutions: boolean;
}
/** @public */
export interface Substitutions {
COMMIT_SHA: string;
SHORT_SHA: string;
@@ -79,45 +86,54 @@ export interface Substitutions {
REVISION_ID: string;
}
/** @public */
export interface Results {
buildStepImages: string[];
buildStepOutputs: string[];
}
/** @public */
export interface BUILD {
startTime: string;
endTime: string;
}
/** @public */
export interface FETCHSOURCE {
startTime: string;
endTime: string;
}
/** @public */
export interface StorageSource {
bucket: string;
object: string;
}
/** @public */
export interface Source {
storageSource: StorageSource;
}
/** @public */
export interface Volume {
name: string;
path: string;
}
/** @public */
export interface Timing {
startTime: string;
endTime: string;
}
/** @public */
export interface PullTiming {
startTime: string;
endTime: string;
}
/** @public */
export interface ResolvedStorageSource {
bucket: string;
object: string;
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import React, { useEffect } from 'react';
import { useWorkflowRuns, WorkflowRun } from '../useWorkflowRuns';
import { WorkflowRunsTable } from '../WorkflowRunsTable';
@@ -72,6 +73,7 @@ const WidgetContent = ({
);
};
/** @public */
export const LatestWorkflowRunCard = (props: { branch: string }) => {
const { branch = 'master' } = props;
const { entity } = useEntity();
@@ -100,6 +102,7 @@ export const LatestWorkflowRunCard = (props: { branch: string }) => {
);
};
/** @public */
export const LatestWorkflowsForBranchCard = (props: { branch: string }) => {
const { branch = 'master' } = props;
const { entity } = useEntity();
@@ -13,4 +13,5 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export { LatestWorkflowRunCard, LatestWorkflowsForBranchCard } from './Cards';
@@ -23,9 +23,11 @@ import { WorkflowRunsTable } from './WorkflowRunsTable';
import { CLOUDBUILD_ANNOTATION } from './useProjectName';
import { MissingAnnotationEmptyState } from '@backstage/core-components';
/** @public */
export const isCloudbuildAvailable = (entity: Entity) =>
Boolean(entity.metadata.annotations?.[CLOUDBUILD_ANNOTATION]);
/** @public */
export const Router = () => {
const { entity } = useEntity();
@@ -17,6 +17,7 @@
import useAsync from 'react-use/lib/useAsync';
import { Entity } from '@backstage/catalog-model';
/** @public */
export const CLOUDBUILD_ANNOTATION = 'google.com/cloudbuild-project-slug';
export const useProjectName = (entity: Entity) => {
+4
View File
@@ -23,6 +23,7 @@ import {
createComponentExtension,
} from '@backstage/core-plugin-api';
/** @public */
export const cloudbuildPlugin = createPlugin({
id: 'cloudbuild',
apis: [
@@ -39,6 +40,7 @@ export const cloudbuildPlugin = createPlugin({
},
});
/** @public */
export const EntityCloudbuildContent = cloudbuildPlugin.provide(
createRoutableExtension({
name: 'EntityCloudbuildContent',
@@ -47,6 +49,7 @@ export const EntityCloudbuildContent = cloudbuildPlugin.provide(
}),
);
/** @public */
export const EntityLatestCloudbuildRunCard = cloudbuildPlugin.provide(
createComponentExtension({
name: 'EntityLatestCloudbuildRunCard',
@@ -57,6 +60,7 @@ export const EntityLatestCloudbuildRunCard = cloudbuildPlugin.provide(
}),
);
/** @public */
export const EntityLatestCloudbuildsForBranchCard = cloudbuildPlugin.provide(
createComponentExtension({
name: 'EntityLatestCloudbuildsForBranchCard',