Our project includes a sample application from another project. For this we have leveraged
git submodule to keep a Git repository as a subdirectory of another Git repository. In this example, we are working with Snyk's vulnerable demo app which may be found in our repo under the
The next section of our
config.yml defines a few
jobs starting with
test_app which will run some commands in our build environment. Here, we are importing the parameters defined earlier under
defaults such as the Docker image for our build:
circleci/node:9.11.2. We will also invoke
git submodule and
npm install the application. Lastly, because we will want this artifact downstream, we will call
persist_to_workspace to reference it later on.
jobs:test_app:<<: *defaultssteps:- checkout- run:name: "pull submodules"command: |git submodule initgit submodule update --recursive- run:name: "run test"command: |cd submodules/goofnpm install- persist_to_workspace:root: .paths:- .