Skip to content

ODC-7788: Contribute Pipeline related extensions from Pipelines console plugin #519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 101 additions & 1 deletion console-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,105 @@
"kind": "Pipeline"
},
"flag": "OPENSHIFT_PIPELINE"
},
"flags": {
"required": ["HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_FLAG_MODEL_EXTENSION"]
}
},
{
"type": "console.flag/model",
"properties": {
"model": {
"group": "pipelinesascode.tekton.dev",
"version": "v1alpha1",
"kind": "Repository"
},
"flag": "OPENSHIFT_PIPELINE_AS_CODE"
},
"flags": {
"required": ["HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_FLAG_MODEL_EXTENSION"]
}
},
{
"type": "console.flag/model",
"properties": {
"model": {
"group": "tekton.dev",
"version": "v1",
"kind": "Pipeline"
},
"flag": "OPENSHIFT_PIPELINE_V1BETA1"
},
"flags": {
"required": ["HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_FLAG_MODEL_EXTENSION"]
}
},
{
"type": "console.yaml-template",
"properties": {
"name": "default",
"model": {
"group": "tekton.dev",
"kind": "Pipeline",
"version": "v1"
},
"template": { "$codeRef": "yamlTemplates.newPipelineTemplate" }
},
"flags": {
"required": [
"HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_YAML_TEMPLATE_EXTENSION"
]
}
},
{
"type": "console.yaml-template",
"properties": {
"name": "default",
"model": {
"group": "tekton.dev",
"kind": "Task",
"version": "v1"
},
"template": { "$codeRef": "yamlTemplates.newTaskTemplate" }
},
"flags": {
"required": [
"HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_YAML_TEMPLATE_EXTENSION"
]
}
},
{
"type": "console.yaml-template",
"properties": {
"name": "default",
"model": {
"group": "tekton.dev",
"kind": "TaskRunModel",
"version": "v1"
},
"template": { "$codeRef": "yamlTemplates.newTaskRunTemplate" }
},
"flags": {
"required": [
"HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_YAML_TEMPLATE_EXTENSION"
]
}
},
{
"type": "console.yaml-template",
"properties": {
"name": "default",
"model": {
"group": "tekton.dev",
"kind": "PipelineResource",
"version": "v1"
},
"template": { "$codeRef": "yamlTemplates.newPipelineResourceTemplate" }
},
"flags": {
"required": [
"HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_YAML_TEMPLATE_EXTENSION"
]
}
},
{
Expand Down Expand Up @@ -1171,7 +1270,8 @@
"flags": {
"required": [
"OPENSHIFT_PIPELINE",
"HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER"
"HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER",
"HIDE_STATIC_PIPELINE_PLUGIN_DEVCONSOLE_ADD_ACTION_EXTENSION"
]
},
"properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@pipelines
# Following tests has been marked broken due to the following issue https://issues.redhat.com/browse/SRVKP-7859
@pipelines @broken-test
Feature: Pipelines overview page
As a developer, I would like to view pipeline overview page in Administrator view

Expand All @@ -23,16 +24,14 @@ Feature: Pipelines overview page
Then user can see PipelineRun status, Duration, Total runs, Number of PipelineRuns charts


# Following test has been marked broken due to the following issue https://issues.redhat.com/browse/SRVKP-7859
@regression @broken-test
@regression
Scenario: Pipeline details page from overview page task runs: P-13-TC02
When user selects "aut-pipelines-overview" in Project dropdown
When user clicks on Pipeline "pipe-one" in pipeline overview table
Then user will be redirected to Pipeline Details page with header name "pipe-one"


# Following test has been marked broken due to the following issue https://issues.redhat.com/browse/SRVKP-7859
@regression @broken-test
@regression
Scenario: Pipeline run details page from overview page task runs: P-13-TC02
When user selects "aut-pipelines-overview" in Project dropdown
When user clicks on Total Pipelineruns number of "pipe-one" in pipeline overview table
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@
"pipelineBuilder": "./components/pipeline-builder",
"catalog": "./components/catalog",
"taskDetails": "./components/tasks",
"pacComponent": "./components/pac/"
"pacComponent": "./components/pac/",
"yamlTemplates": "./components/templates"
},
"dependencies": {
"@console/pluginAPI": ">=4.15"
Expand Down
8 changes: 4 additions & 4 deletions src/components/hooks/flagHookProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,19 +102,19 @@ export const useFlagHookProvider = (setFeatureFlag: SetFeatureFlag) => {
setFeatureFlag(FLAG_HIDE_STATIC_PIPELINE_PLUGIN_PIPELINE_BUILDER, true);
setFeatureFlag(
FLAG_HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_FLAG_MODEL_EXTENSION,
false,
true,
);
setFeatureFlag(
FLAG_HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_PAGE_ROUTE_EXTENSION,
false,
true,
);
setFeatureFlag(
FLAG_HIDE_STATIC_PIPELINE_PLUGIN_CONSOLE_YAML_TEMPLATE_EXTENSION,
false,
true,
);
setFeatureFlag(
FLAG_HIDE_STATIC_PIPELINE_PLUGIN_DEVCONSOLE_ADD_ACTION_EXTENSION,
false,
true,
);
setFeatureFlag(FLAG_HIDE_STATIC_PIPELINE_PLUGIN_REPOSITORY_FORM, true);
setFeatureFlag(FLAG_HIDE_STATIC_PIPELINE_PLUGIN_PAC_FORM, true);
Expand Down
1 change: 1 addition & 0 deletions src/components/templates/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './pipelines';
76 changes: 76 additions & 0 deletions src/components/templates/pipelines.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
export const newPipelineTemplate = `
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: new-pipeline
spec:
params:
- name: paramName
type: string
resources:
- name: app-git
type: git
- name: app-image
type: image
tasks:
- name: build-app
taskRef:
name: s2i-java-11
kind: ClusterTask
resources:
inputs:
- name: source
resource: app-git
outputs:
- name: image
resource: app-image
`;

export const newPipelineResourceTemplate = `
apiVersion: tekton.dev/v1
kind: PipelineResource
metadata:
name: nginx-ex-git-resource
spec:
type: git
params:
- name: url
value: https://github.com/sclorg/nginx-ex.git
- name: revision
value: master
`;

export const newTaskTemplate = `
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: example-task
spec:
params:
- name: appName
type: string
steps:
- image: registry.redhat.io/ubi7/ubi-minimal
command:
- /bin/bash
- '-c'
- echo
- $(inputs.params.appName)
`;

export const newTaskRunTemplate = `
apiVersion: tekton.dev/v1
kind: TaskRun
metadata:
name: example-taskrun
spec:
taskSpec:
steps:
- name: echo
image: registry.redhat.io/ubi7/ubi-minimal
command:
- /bin/bash
- '-c'
- echo
- "Hello OpenShift"
`;
Loading