Skip to content

Commit

Permalink
fix(Oracle): Fixed Oracle object storage selection (#8588)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Woo <kevinawoo@gmail.com>
  • Loading branch information
rajkdale and kevinawoo committed Oct 2, 2020
1 parent cccfdb3 commit d38e7c5
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/scripts/modules/core/src/artifact/ArtifactIconService.ts
Expand Up @@ -15,6 +15,7 @@ import ivyFileIcon from './icons/ivy-artifact.svg';
import jenkinsFileIcon from './icons/jenkins-file-artifact.svg';
import mavenFileIcon from './icons/maven-artifact.svg';
import httpFileIcon from './icons/http-artifact.svg';
import oracleObjectIcon from './icons/oracle-object-artifact.svg';

interface IArtifactIcon {
type: RegExp;
Expand Down Expand Up @@ -55,3 +56,4 @@ ArtifactIconService.registerType(ArtifactTypePatterns.IVY_FILE, ivyFileIcon);
ArtifactIconService.registerType(ArtifactTypePatterns.JENKINS_FILE, jenkinsFileIcon);
ArtifactIconService.registerType(ArtifactTypePatterns.MAVEN_FILE, mavenFileIcon);
ArtifactIconService.registerType(ArtifactTypePatterns.HTTP_FILE, httpFileIcon);
ArtifactIconService.registerType(ArtifactTypePatterns.ORACLE_OBJECT, oracleObjectIcon);
1 change: 1 addition & 0 deletions app/scripts/modules/core/src/artifact/ArtifactTypes.ts
Expand Up @@ -20,6 +20,7 @@ export const ArtifactTypePatterns: IArtifactTypePatterns = {
MAVEN_FILE: /maven\/file/,
HTTP_FILE: /http\/file/,
FRONT50_PIPELINE_TEMPLATE: /front50\/pipelineTemplate/,
ORACLE_OBJECT: /oracle\/object/,
};

export const excludeAllTypesExcept = (...types: RegExp[]) =>
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/scripts/modules/core/src/help/help.contents.ts
Expand Up @@ -129,6 +129,10 @@ const helpContents: { [key: string]: string } = {
<p>The S3 object name, in the form <code>s3://bucket/path/to/file.yml</code>.</p>`,
'pipeline.config.expectedArtifact.defaultS3.reference': `
<p>The S3 object name, <i>optionally</i> appending the version. An example: <code>s3://bucket/file.yml#123948581</code></p>`,
'pipeline.config.expectedArtifact.oracle.name': `
<p>The Oracle object artifact name, in the form <code>oci://bucket/path/file.yml</code>.</p>`,
'pipeline.config.expectedArtifact.defaultOracle.reference': `
<p>The Oracle object artifact name, <i>optionally</i> appending the version. An example: <code>oci://bucket/file.yml#9ce463aa-d843-4438-b206-5365cd643e2e</code></p>`,
'pipeline.config.expectedArtifact.docker.name': `
<p>The Docker image name you want to trigger on changes to. By default, this does <i>not</i> include the image tag or digest, only the registry and image repository.</p>`,
'pipeline.config.expectedArtifact.defaultDocker.reference': `
Expand Down
Expand Up @@ -15,6 +15,7 @@ import { JenkinsMatch, JenkinsDefault } from './jenkins/JenkinsArtifactEditor';
import { KubernetesMatch, KubernetesDefault } from './kubernetes/KubernetesArtifactEditor';
import { MavenMatch, MavenDefault } from './maven/MavenArtifactEditor';
import { S3Match, S3Default } from './s3/S3ArtifactEditor';
import { OracleMatch, OracleDefault } from './oracle/OracleArtifactEditor';

export const artifactKindConfigs: IArtifactKindConfig[] = [
Base64Match,
Expand Down Expand Up @@ -45,6 +46,8 @@ export const artifactKindConfigs: IArtifactKindConfig[] = [
MavenDefault,
S3Match,
S3Default,
OracleMatch,
OracleDefault,
KubernetesMatch,
KubernetesDefault,
];
Expand Down
@@ -0,0 +1,38 @@
import { ArtifactTypePatterns } from 'core/artifact';
import { IArtifactKindConfig } from 'core/domain';

import { singleFieldArtifactEditor } from '../singleFieldArtifactEditor';

export const OracleMatch: IArtifactKindConfig = {
label: 'Oracle',
typePattern: ArtifactTypePatterns.ORACLE_OBJECT,
type: 'oracle/object',
description: 'An oracle object.',
key: 'oracle',
isDefault: false,
isMatch: true,
editCmp: singleFieldArtifactEditor(
'name',
'oracle/object',
'reference',
'oci://bucket/file-path',
'pipeline.config.expectedArtifact.oracle.name',
),
};

export const OracleDefault: IArtifactKindConfig = {
label: 'Oracle',
typePattern: ArtifactTypePatterns.ORACLE_OBJECT,
type: 'oracle/object',
description: 'An oracle object.',
key: 'oracle',
isDefault: true,
isMatch: false,
editCmp: singleFieldArtifactEditor(
'reference',
'oracle/object',
'Reference',
'oci://bucket/file-path',
'pipeline.config.expectedArtifact.defaultOracle.reference',
),
};

0 comments on commit d38e7c5

Please sign in to comment.