@@ -10,11 +10,37 @@ The `pipeline.sh` script:
10
10
- is run whenever a Pull Request changes that project
11
11
- is run for all projects each night
12
12
- is run on a private continuous integration server after an initial code
13
- review
13
+ review
14
14
- has access to an Apigee Edge organization, accessed with the variables
15
15
below.
16
16
- runs in a Docker container that you can see [ here] ( ./tools/pipeline-runner/Dockerfile ) .
17
- You can run a pipeline locally e.g. ` npm run pipeline -- references/js-callout `
17
+
18
+ You can run a pipeline locally:
19
+
20
+ ``` sh
21
+ docker run \
22
+ -v $( pwd) :/home \
23
+ -e APIGEE_USER -e APIGEE_PASS -e APIGEE_ORG -e APIGEE_ENV \
24
+ -e APIGEE_X_ORG -e APIGEE_X_ENV -e APIGEE_X_HOSTNAME \
25
+ -v ~ /.config:/root/.config \
26
+ -v /var/run/docker.sock:/var/run/docker.sock \
27
+ -it ghcr.io/apigee/devrel-pipeline-runner:latest run-pipelines.sh references/js-callout
28
+ ```
29
+
30
+ Where:
31
+ - The ` APIGEE_ ` variables point to your Apigee instance
32
+ - This repo is mounted in the home directory
33
+ - (Required for X) mount your gcloud config folder
34
+ - (Required for Docker-in-Docker pipelines) mount the docker socket
35
+ - Specify a reference e.g. ` references/js-callout ` or omit to run everything
36
+
37
+ Should you need to make changes to the pipeline runner, you can
38
+ build your own image by running the following command and replacing
39
+ the image reference above:
40
+
41
+ ``` sh
42
+ docker build -t devrel-pipeline-runner:local ./tools/pipeline-runner
43
+ ```
18
44
19
45
A simple example of a pipeline can be found [ here] ( ./references/js-callout/pipeline.sh )
20
46
0 commit comments