Jenkins Freestyle project
Jenkins Freestyle projects let you create general-purpose build jobs with maximum flexibility.
Setting up a Freestyle project for container images
Create a Freestyle project that builds a Docker image and then scans it for vulnerability and compliance issues.
- Go to the Jenkins top page.
- Create a new project.
- ClickNew Item.
- InEnter an item name, enter a name for your project.
- SelectFreestyle project.
- ClickOK.
- Add a build step.
- Scroll down to theBuildsection.
- In theAdd build stepdrop-down list, selectExecute shell.
- In theCommandtext box, enter the following:echo "Creating Dockerfile..." echo "FROM imiell/bad-dockerfile:latest" > Dockerfile docker build --no-cache -t test/test-image:0.1 .
- Add a build step that scans the container image(s) for vulnerabilities.
- In theAdd build stepdrop-down list, selectScan Prisma Cloud Images.
- In theImagefield, select the image to scan by specifying the repository and tag.Use pattern matching expressions. For example, enter test/test-image*.