Integrate Web IDE with CI/CD
When making changes to software I run tests to verify my code does what I am expecting and that I haven't broken something else. I want the Web IDE to help me resolve test failures. **Scenario: resolve integration test failure** – after I've finished improving a feature in my local environment, I push it to GitLab where the full suite of CI/CD tests are run which takes a long time. Normally I only run the unit tests that are immediately relevant locally. The tests fail, but I've switched to a new branch and have multiple in progress changes including upgraded dependencies. **Scenario: open source contribution** - I want to contribute a fix to a library I'm using. I can see the source of the issue by reading the code in GitLab, but I don't want to deal with installing a new language runtime and package manager just to make a small fix. ### Vision An integrated product brings emergent benefits, which we've seen by integrating SCM, Issues, CI/CD etc. Testing is an important part of writing software because it increases code quality and allow good test coverage allows developers to move faster while maintaining quality. The Web IDE will be more valuable if we integrate writing code and testing. #### Access job traces in the Web IDE When tests fail, the failure frequently describes which test in which file failed. It may be a small typo in an assertion or something more complex, but typically the first place to start is the file the exception was thrown from. We should allow integrate job traces with the Web IDE to make it easier to address each failure. - allow job traces to be viewed directly in the Web IDE - allow the developer to click on a file name in the job trace shown in the Web IDE to quickly open the file #### Pipeline status in the Web IDE When making multiple changes over multiple commits, as I commit changes I want know that tests are passing. While I'm working on the next change if the test fail on my previous change, I may want to address that immediately. We should show the pipeline status of the last commit in the Web IDE. - show the pipeline status of the last commit in the Web IDE - access logs from a failed job in the pipeline from the status #### Run tests before committing When I'm working to fix a failing test, I want immediate feedback on if the test I am fixing begins to pass without needing to commit the change, wait for the pipeline to run and review the logs. We should allow a single test to be run immediately and provide the feedback directly in the Web IDE. - launch a container in Kubernetes with the correct run time and install dependencies when the Web IDE is opened - sync changes to the container so that test can be run - allow a file or test to be executed in the container, and show feedback to the user ### Proposal - Integrate existing CI/CD features in to the Web IDE - Create new feature that can launch a container in Kubernetes to run linting, tests, and even preview the app - Use `.gitlab-ci.yml` for configuration where possible (e.g. `image`, `before` step etc) ### Ideas ![20180308-web-ide-ci-integration](/uploads/e1e680688744677aa4651e52b65a3463/20180308-web-ide-ci-integration.jpg)
epic