Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Commit

Permalink
adding badges to readme, jenkinsfile, and updating sonarcloud org (#19)
Browse files Browse the repository at this point in the history
Signed-off-by: bfitzpat@redhat.com <bfitzpat@redhat.com>
  • Loading branch information
bfitzpat authored Dec 9, 2019
1 parent 0c6c9fd commit 8104c30
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ branches:
- /^dependabot.*$/
addons:
sonarcloud:
organization: "camel-tools"
organization: "redhat-developer"
branches:
- master
67 changes: 67 additions & 0 deletions JenkinsFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/usr/bin/env groovy

node('rhel7'){
stage('Checkout repo') {
deleteDir()
git url: 'https://github.com/redhat-developer/vscode-didact'
}

stage('Install requirements') {
def nodeHome = tool 'nodejs-8.11.1'
env.PATH="${env.PATH}:${nodeHome}/bin"
sh "npm install -g typescript vsce"
}

stage('Build') {
env.JAVA_HOME="${tool 'openjdk-1.8'}"
env.PATH="${env.JAVA_HOME}/bin:${env.PATH}"
sh "java -version"

sh "npm install --ignore-scripts"
sh "npm install"
sh "npm run vscode:prepublish"
}

withEnv(['JUNIT_REPORT_PATH=report.xml']) {
stage('Test') {
wrap([$class: 'Xvnc']) {
sh "npm test --silent"
junit 'report.xml'
}
}
}

stage('Package') {
def packageJson = readJSON file: 'package.json'
sh "vsce package -o vscode-didact-${packageJson.version}-${env.BUILD_NUMBER}.vsix"
}

if(params.UPLOAD_LOCATION) {
stage('Snapshot') {
def filesToPush = findFiles(glob: '**.vsix')
sh "rsync -Pzrlt --rsh=ssh --protocol=28 ${filesToPush[0].path} ${UPLOAD_LOCATION}/snapshots/vscode-didact/"
stash name:'vsix', includes:filesToPush[0].path
}
}
}

node('rhel7'){
if(publishToMarketPlace.equals('true')){
timeout(time:5, unit:'DAYS') {
input message:'Approve deployment?', submitter: 'apupier,lheinema,bfitzpat,tsedmik,djelinek'
}

stage("Publish to Marketplace") {
unstash 'vsix'
withCredentials([[$class: 'StringBinding', credentialsId: 'vscode_java_marketplace', variable: 'TOKEN']]) {
def vsix = findFiles(glob: '**.vsix')
sh 'vsce publish -p ${TOKEN} --packagePath' + " ${vsix[0].path}"
}
archive includes:"**.vsix"

stage "Promote the build to stable"
def vsix = findFiles(glob: '**.vsix')
sh "rsync -Pzrlt --rsh=ssh --protocol=28 ${vsix[0].path} ${UPLOAD_LOCATION}/stable/vscode-didact/"
}
}
}
30 changes: 14 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
[![GitHub tag](https://img.shields.io/github/tag/redhat-developer/vscode-didact.svg?style=plastic)]()
[![Build Status](https://travis-ci.org/redhat-developer/vscode-didact.svg?branch=master)](https://travis-ci.org/redhat-developer/vscode-didact)
[![License](https://img.shields.io/badge/license-Apache%202-blue.svg)]()
[![Gitter](https://img.shields.io/gitter/room/redhat-developer/home.js.svg)](https://gitter.im/redhat-developer/home)

# vscode-didact README

The **vscode-didact** extension prototype does a few things. Mainly it shows what's possible through a combination of a simple Markdown file, the VS Code Webview, and calling easily accessible commands in VS Code.
The **vscode-didact** extension does a few things, but mainly it shows what's possible through a combination of a simple Markdown or AsciiDoc file, the VS Code Webview, and calling easily accessible commands in VS Code.

For a demo file of what functionality is currently available, check out [the didact-demo.](vscode://redhat.vscode-didact?https=raw.githubusercontent.com/bfitzpat/vscode-didact/master/demo/didact-demo.didact.md)

Expand All @@ -17,7 +22,7 @@ What follows is a simple example with three actions. One scaffolds a project bas
With Didact installed, there are three ways to open a Didact window.

* To access Didact, access the Command Palette (`View->Command Palette`, `Ctrl+Shift+P`, or `F1`) and type **Didact**. Select `Open Didact` and it will open with the default Didact Markdown file specified in the Settings.
* To open a local Didact file in the workspace directly, Right-click on the Didact Markdown file (`*.didact.md`) and select **Start Didact Tutorial from File** from the context menu. (Note that it also works to render most standard Markdown files.)
* To open a local Didact file in the workspace directly, Right-click on the Didact Markdown file (`*.didact.md` or `*.didact.adoc`) and select **Start Didact Tutorial from File** from the context menu.

In addition, you now have the `Didact Tutorials` view.

Expand All @@ -37,9 +42,7 @@ To change the default Didact file, access the settings (`File->Preferences->Sett

## CSS Styling

Currently we are using the CSS template suggested by the W3C, as provided [here at the Quackit.com site](https://www.quackit.com/css/css_template.cfm). We may be able to reuse some of the PatternFly approach, but that will require additional research.

We do provide some additions that can be called using curly brackets in the Markdown text for styling...
Currently we are using the CSS template from Bulma - https://bulma.io/ and provide some additions that can be called using curly brackets in the Markdown text for styling...

* `{.didact}` - Changes the cursor for Didact-specific action links to a crosshair instead of a normal link pointer. (Would be great to do this automatically, but this works as a workaround in the short term.)
* `{.imageRight}` - Useful for images we want to float right.
Expand Down Expand Up @@ -125,16 +128,11 @@ Files can either have their content specified in the project json file itself (i

# Next steps

1. Create a way to register a Didact tutorial.
2. Create a way to get a list of registered tutorials.
3. Find the best way to ensure that files (project.json, commands referencing files in a project scaffolded by a project.json) are accessible across extensions (i.e. if I register a tutorial in Camel K, the Didact extension should be ok with finding all the available commands and any files)
4. Provide a better CSS that perhaps mimicks what is being done in the Integreatly Walkthroughs project.
5. Look into finding ways to chain commands together so that you can do things like create a project and open a file all in one go.
6. Look at the Eclipse Cheat sheet approach to see if we can glean anything - http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2FcheatSheetContentFileSpec.html
7. Also look at the Integr8ly Walkthroughs to see if we can glean anything - https://github.com/integr8ly/tutorial-web-app-walkthroughs/tree/master/walkthroughs
8. Figure out how to stash the generated HTML from the markdown locally in the user's global workspace so that we can persist the state of checkboxes as the user works through various steps - essentially enabling it between sessions
9. Figure out a way to limit the `Start Didact Tutorial from File` context menu to only work for Didact files.
10. Figure out a way to limit the `Didact Scaffold Project from File` context menu to only work for Didact Project Scaffolding files.
11. Figure out a way to reference files from the project json structure instead of providing file content directly so file content is copied and more manageable going forward.
1. Find the best way to ensure that files (project.json, commands referencing files in a project scaffolded by a project.json) are accessible across extensions (i.e. if I register a tutorial in Camel K, the Didact extension should be ok with finding all the available commands and any files)
2. Look into finding ways to chain commands together so that you can do things like create a project and open a file all in one go.
3. Look at the Eclipse Cheat sheet approach to see if we can glean anything - http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fextension-points%2FcheatSheetContentFileSpec.html
4. Also look at the Integr8ly Walkthroughs to see if we can glean anything - https://github.com/integr8ly/tutorial-web-app-walkthroughs/tree/master/walkthroughs
5. Figure out a way to limit the `Start Didact Tutorial from File` context menu to only work for Didact files.
6. Figure out a way to limit the `Didact Scaffold Project from File` context menu to only work for Didact Project Scaffolding files.

**Enjoy!**

0 comments on commit 8104c30

Please sign in to comment.