Giter VIP home page Giter VIP logo

vscode-tekton's Introduction

Tekton Pipelines

Visual Studio Marketplace Downloads Build Status License

Tekton Pipelines extension provides an end-to-end developer experience for interaction with Tekton.

Using this extension:


Getting Started

Features

For more detail information around specific commands & features, please read the plugin features detailed guide.

Tutorial

Follow Tekton Pipeline Extension tutorial inspired by original tutorial that uses OpenShift Developer Console, tkn and oc command line tools.

Commands

Tekton Pipelines extension supports a number of commands & actions for interacting with Tekton Pipelines; these are accessible via the command menu (Cmd+Shift+P ⌘⇧P on macOS or Ctrl+Shift+P ⌃⇧P on Windows and Linux) and may be bound to keys in the normal way.

  • Tekton: About - Provides the tkn tool version.
  • Tekton: Show Output Channel - Shows commands running under the hood and their output.
  • Tekton: Refresh View - Refreshes the Tekton Pipeline View.

Actions available for a Tekton Pipeline/Task/ClusterTask

  • Pipeline -> Start - Start a Pipeline with user indicated resources, parameters and service account.
  • Pipeline -> Restart - Restart the last Pipeline run.
  • Pipeline/Task/ClusterTask -> List - List all Pipelines in a Cluster.
  • Pipeline -> Describe - Prints the JSON of a selected Pipeline.
  • Pipeline/Task/ClusterTask -> Delete - Delete the selected Pipeline.

Actions available for a Tekton PipelineRun

  • PipelineRun/TaskRun -> List - List all PipelineRuns/TaskRuns in a Pipeline/Task
  • PipelineRun/TaskRun -> Describe - Describe the selected PipelineRun/TaskRun
  • PipelineRun/TaskRun -> Logs - Print Logs from the selected PipelineRun/TaskRun
  • PipelineRun/TaskRun -> Delete - Delete the selected PipelineRun/TaskRun
  • PipelineRun -> Cancel - Cancel the selected PipelineRun

Icons Representation

Pipeline Node
Task Node
ClusterTask Node
PipelineResource Node
PipelineRun/TaskRun Running
PipelineRun Failed
TaskRun Failed
Condition Failed
PipelineRun Pending
TaskRun Pending
Condition Pending

Extension Configuration Settings

  • Tekton Pipelines: Show Channel On Output - Show Tekton Pipelines output channel when new text added to output stream.
  • Tekton Pipelines: Output verbosity level - Output verbosity level (value between 0 and 9) for Tekton Pipeline Start, Push and Watch commands in output channel and integrated terminal.
  • Tekton Pipelines: Show reference resource notification - Enable/disable to check Task and ClusterTask Reference Resource.
  • Tekton Pipelines: Show logs on pipeline start - Show pipelineRun follow logs while starting pipeline.

Dependencies

CLI Tools

  • This extension uses the Tekton CLI: tkn.
  • This extension is designed to work with Tekton Pipelines 0.11+.

Note: We support v1beta1 API. Previous version v1alpha1 may work, but we cannot guarantee that all features will work properly. If you have v1alpha1 pipelines/tasks please use migrating document to migrate to v1beta1.

Release notes

See the change log.

Contributing

This is an open source project open to anyone. This project welcomes contributions and suggestions!

For information on getting started, refer to the CONTRIBUTING instructions.

Download the most recent tekton-pipelines-<version>.vsix file and install it by following the instructions here.

Feedback

If you discover an issue please file a bug and we will fix it as soon as possible.

If you want to chat with us, you can contact us on the #ide-integration channel of the tektoncd Slack. Please click this link to join the tektoncd Slack.

License

MIT, See LICENSE for more information.

Data and telemetry

The Red Hat OpenShift Toolkit for Visual Studio Code collects anonymous usage data and sends it to Red Hat servers to help improve our products and services. Read our privacy statement to learn more. This extension respects the redhat.telemetry.enabled setting which you can learn more about at https://github.com/redhat-developer/vscode-redhat-telemetry#how-to-disable-telemetry-reporting

vscode-tekton's People

Contributors

apupier avatar danielhelfand avatar dependabot[bot] avatar dgolovin avatar evidolob avatar fbricon avatar gorkem avatar jkopriva avatar jrichter1 avatar kameshsampath avatar lstocchi avatar maitrella avatar mohitsuman avatar odockal avatar onyiny-ang avatar sudhirverma avatar vdemeester avatar vinamra28 avatar xbabalov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vscode-tekton's Issues

Create Jenkins project to publish to marketplace

Create project on internal Jenkins instance that would build extension package, upload it to internal server for verification and then ask confirmation before publishing. This way we would verify exactly the same bits we are about to publish to marketplace.

Add action to start a pipeline based on existing resources

Add action to be able to start a pipeline and select the PipelineResources that already exist in the namespace. The flow should allow user to select resources from a dropdown list that is filtered based on the resource type that the pipeline requires.

Add action to create resources

Add actions in order to create PipelineResources. The flow should get input from the user regarding the type of pipeline resource to be created and the values required for each pipeline resource type

Fail gracefully if tekton APIs are not available

Check if Tekton APIs are available on the cluster and display a message that indicates that Tekton is not available.

Additionally we should also cover the case where tekton is installed but the current user does not have the privileges to interact with tekton resources.

Creating Pipeline from Tasks

/feature

The plugin should have an ability to create pipeline by choosing the list of tasks via the explorer.

Tekton Pipeline Explorer always shows tasks form 'default' namespace/project

Tasks belong to namespace/project. Tekton Pipelines Explorer does not show projects, so content for Tasks node should rely on current context. That means it should show tasks for current namespace printed out with tkn list task command without -n workspace_name option. To switch namespace Clusters View or cli tool should be used.

Correct Pipeline Race Condition

There is a race condition where a pipeline resource event is received before a pipeline event is received and therefore not yet created in the tree. This prevents the pipeline resource from being added to the tree.

Run a pipeline

The user should be able to start PipelineRuns for any Pipeline definition they have created

Update context menu item names to make them shorter

Now context menu items for nodes in Tekton Pipelines Veiw have long redundant names. When context menu requested for Pipleline almost every item includes 'Pipelines' in its name:

  • Describe Pipelines
  • Start Pipeline
    Should be:
  • Describe
  • Start

Switch to latest tkn cli

This extension will cause tkn 0.3.0 to be downloaded; but tkn is now 0.5.0. We should update the tkn metadata

Support for snippets

add support for snippets that allows to create tekton resource yamls quickly.

Refresh tekton tree automatically

The Tekton Pipelines tree currently requires a manual refresh to display the latest state of the pipelines and pipelineruns. This would leave the user thinking the pipeilnerun is running for a long time.

pr-status

Stream pipelinerun and taskrun logs

When user selects Show pipeilnerun logs, the logs should stream and follow if the pipeline is still running. Currently it shows the available logs and exits.

Configure the extension to use my local dev tkn?

Thanks for making this!! :D ❤️

I tried to install it today but ran into trouble because though I do have tkn installed (built from source), the extension thought it was not installed (p.s. I really like the design, how the extension uses the cli, very cool!) b/c the version was "dev" and not v0.3.0

What I did was:

  1. Installed the latest build (Nov 3?) (instructions from https://github.com/redhat-developer/vscode-tekton#warning-nightly-builds-are-by-definition-unstable-install-at-you-own-risk)
  2. Tried to run > Tekton: About
  3. Got the error: "Cannot find A CLI for interacting with Tekton v0.3.0."
  4. Hit the "help" button
  5. A terminal popped up, when I tried to run tkn it wasn't found, and also I didnt recognize the $PATH, it doesn't seem to be the one I usually see when I run /bin/bash or similar

I finally worked around this by installing version 0.3.0 of the CLI instead of the dev version - is it possible for there to be a mode that allows me to use the dev CLI and/or not care what version of the CLI is installed?

Create animated gif for pipeline-tutorial steps running in vscode using extension

Show this gif on top of README.md the same way other extension do.
Animated gif should show repositories cloned and added to workspace:

  1. https://github.com/openshift/pipelines-tutorial
  2. https://github.com/openshift/pipelines-catalog
  3. https://github.com/tektoncd/catalog

Create project.
Create all resources required to deploy spring-petclinic in created project.
Create required tasks, pipeline and pipeline resources with Kubernetes: Create command.
Run pipeline.
Open deployed application after pipeline execution is finished.

Project is not compiling

C:\git\vscode-tekton>npm run compile

> [email protected] compile C:\git\vscode-tekton
> tsc -p ./

src/extension.ts:3:28 - error TS2307: Cannot find module './explainer'.

3 import * as explainer from './explainer';
                             ~~~~~~~~~~~~~

src/extension.ts:5:32 - error TS2307: Cannot find module './yaml-navigation'.

5 import { findParentYaml } from './yaml-navigation';
                                 ~~~~~~~~~~~~~~~~~~~

src/tkn.ts:346:57 - error TS2339: Property 'metadata' does not exist on type 'TektonNode'.

346         let tasks: string[] = data.map((value) => value.metadata.name);
                                                            ~~~~~~~~

src/tkn.ts:375:61 - error TS2339: Property 'metadata' does not exist on type 'TektonNode'.

375         let pipelines: string[] = data.map((value) => value.metadata.name);
                                                                ~~~~~~~~

test/tekton/pipeline.test.ts:52:41 - error TS2554: Expected 3 arguments, but got 1.

52             expect(execStub).calledWith(Command.startPipeline(pipelineItem.getName()));
                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  src/tkn.ts:57:40
    57     static startPipeline(name: string, resource: string, param: string) {
                                              ~~~~~~~~~~~~~~~~
    An argument for 'resource' was not provided.

types/json-stream.d.ts:3:16 - error TS2665: Invalid module name in augmentation. Module 'json-stream' resolves to an untyped module at 'C:/git/vscode-tekton/node_modules/json-stream/lib/json-stream.js', which cannot be augmented.

3 declare module "json-stream"{
                 ~~~~~~~~~~~~~


Found 6 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] compile: `tsc -p ./`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] compile script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Aurelien Pupier\AppData\Roaming\npm-cache\_logs\2019-07-25T07_53_23_070Z-debug.log

seems there are a lot of unused import, some of them doesn't exist anymore
metadata is effectively not defined in tektonNode which is a class of this project
npm run compile is reporting same errors

take care that npm install is not triggering the compilation (and so not reporting the error)

Add trigger types

Tekton Triggers add the following CRDs:

  • TriggerTemplate
  • TriggerBinding
  • EventListener

The extension should be able to show these CRs alongside other Tekton CRs.

Create 'New Pipeline Resource' command

Currently the only way to create resource is to use oc or kubectl tools form command line, there should be command to do that from context menu on Pipeline Resources node and command palette.
New Git resource workflow should let you select from repositories presented in workspace.
New Image resource workflow should let you slect form ImageStreams presented in cluster.

Add sha256 file generation for .vsix file when building on Jenkins

After .vsix file assembled it should be accompanied by .sha256 file. See example below:

  • tekton-pipelines-0.1.2-420.vsix
  • tekton-pipelines-0.1.2-420.vsix.sha256

The command to generate would be for example:

sha256sum tekton-pipelines-0.1.2-420.vsix > tekton-pipelines-0.1.2-420.vsix.sha256

Both files .vsix and .vsix.sha256 should be uploaded to nightly or stable builds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.