Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Export configurations from devfile in a launch.json and tasks.json files #218

Merged
merged 1 commit into from
May 24, 2019

Conversation

RomanNikitenko
Copy link
Member

@RomanNikitenko RomanNikitenko commented May 15, 2019

What does this PR do?

  • Export launch configurations in a launch.json file from devfile.
  • Export tasks configurations in tasks.json file from devfile.

It's expected that configurations are presented in the format.

The current implementation supports the merge existed configurations from config file and configs from devfile. Configurations from devfile have higher priority than existed configs in config file.
So, if you already have configs in launch.json file, for example, the configs with the same label will be replaced by configs from devfile.

About export tasks configurations in tasks.json file.
In the PR I rely that referenceContent for vscode-task type action contains ready to use configurations(in vs code format) - we don’t convert them and we just copy content to tasks.json file (if tasks.json file is absent or doesn’t contain configs) or merge with existed configs.

Another actions from commands section of devfile are che commands - we don’t copy them to tasks.json file, but convert them to theia tasks. They are available for running from UI as ‘detected’.

What issues does this PR fix or reference?

eclipse-che/che#12711

Related issue: eclipse-che/che#13057

Please see video: https://youtu.be/8H8dLju0Goc

@RomanNikitenko
Copy link
Member Author

The PR provides ability to export launch configurations in a launch.json file.
I am working on ability to export tasks configurations in tasks.json file.

@slemeur
Copy link

slemeur commented May 15, 2019

Would you add a demo of that new feature?

@RomanNikitenko
Copy link
Member Author

I'm going to update the PR - add ability to export tasks configurations in tasks.json file and then provide demo for both cases

@RomanNikitenko RomanNikitenko changed the title Export Che launch commands in a launch.json file Export configurations from devfile in a launch.json and tasks.json files May 17, 2019
@RomanNikitenko RomanNikitenko marked this pull request as ready for review May 17, 2019 12:56
@RomanNikitenko
Copy link
Member Author

For reviewers: I had to push with force to resolve conflicts, sorry about that...

…older

Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
@monaka
Copy link
Member

monaka commented May 24, 2019

@RomanNikitenko @olexii4 Let me make sure. Can I merge this PR?

@RomanNikitenko
Copy link
Member Author

RomanNikitenko commented May 24, 2019

I created the issue for improving way of merging tasks configurations https://github.com/eclipse/che-theia/issues/248

@RomanNikitenko
Copy link
Member Author

@monaka
I'm merging the PR, merging tasks configurations will be improved in separate issue.
btw, unfortunately, we have a few bugs related to running tasks in theia project, I start working on fix for them.

@RomanNikitenko RomanNikitenko merged commit 68f0bae into master May 24, 2019
@RomanNikitenko RomanNikitenko deleted the configurations branch May 24, 2019 09:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants