You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this demo we will use Azure Pipelines to build, scan and push a container image.
4
+
5
+
NOTE: This example uses the [new Sysdig scanning engine](https://docs.sysdig.com/en/docs/sysdig-secure/scanning/new-scanning-engine/)
6
+
7
+
The workflow is as follows:
8
+
9
+
1. Build the container image and store it locally
10
+
2. Download the sysdig-cli-scanner cli if needed
11
+
3. Perform the scan
12
+
4. Push the container image to a remote registry
13
+
14
+
The workflow leverages Azure Pipeline actions cache to avoid downloading the binary,
15
+
the databases and the container images if they are available.
16
+
17
+
## Setup
18
+
19
+
### Variables
20
+
21
+
It is required to create a TOKEN pipeline variable containing the Sysdig API token in order
22
+
to be able to perform the scan. See [the official documentation](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/set-secret-variables)
23
+
for instructions on how to do it, but basically:
24
+
25
+
* Edit the pipeline
26
+
* Select "Variables"
27
+
* Add a new TOKEN variable with the proper content
28
+
29
+
### Registry access
30
+
31
+
It is required to create a Docker registry "Service Connections" to be able to push images to the registry.
32
+
See [the official documentation](https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml#docker-hub-or-others)
33
+
for instructions on how to do it, but basically:
34
+
35
+
* Select Project settings > Service connections
36
+
* Select + New service connection, select the "Docker Registry", and then select Next
37
+
* Add the registry url, user & password and a Service connection name (it will be used as REGISTRY_CONNECTION)
38
+
39
+
Then, modify the variables on the [azure-pipelines.yml](azure-pipelines.yml) file to fit your needs:
0 commit comments