This repository provides a set of ready-to-use devcontainer templates that you can integrate directly into your Visual Studio Code environment. These templates are particularly useful for SAP developers who want to set up a consistent development environment across different projects without hassle.
The devcontainer templates created from this project make use of the Docker container images provided through the
devcontainer-imagesrepository.
If you have any question, suggestion or request regarding what this repository can offer, you can use this discussion area.
Available Templates
Ths repository generates the following devcontainer templates:
| Template | Image |
|---|---|
| sap-cap-javascript-node | ghcr.io/the-nefarious-developer/sap-cap-javascript-node:{VERSION} |
| sap-cap-typescript-node | ghcr.io/the-nefarious-developer/sap-cap-typescript-node:{VERSION} |
Content
src- Contains reusable dev container templates.test- Contains the test suite for each provided template.
Prerequisites
To use the devcontainer templates provided in this repository, you will need:
- Docker installed on your system.
- Visual Studio Code with the Dev Containers extension.
How it works
The directories inside the src folder will contain the files that will compose the templates to be created.
Each template folder will have the following structure:
- .devcontainer: Folder which is going to contain the
devcontainer.jsonwith properties, dependencies and the container image to be referenced by the template. - devcontainer-template.json Configuration file that define key metadata and attributes for the container environment.
Whenever a change in the template happens, the update-documentation.yaml pipeline will be triggered and a new pull request will be created to update the README.md file inside each template directory. This new document will be composed by metadata defined in the devcontainer-template.json and the content described in the NOTES.md file.
Testing
Each template needs to have a test implementation. The testing operations in this project follows the harness test strategy applied at their own container images, which can be leveraged in case of new template implementations.
Note: The lack of test implementation might cause the CI/CD pipeline to fail.
Testing locally
To test the templates locally, the environment variable VARIANT need to be set prior to the bash file execution.
Template for command to run the test locally: