• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1[
2  {
3    "cmd": [],
4    "name": "Docker setup"
5  },
6  {
7    "cmd": [
8      "python",
9      "import os\nprint('%d:%d' % (os.getuid(), os.getgid()))\n"
10    ],
11    "name": "Docker setup.Get uid and gid",
12    "~followup_annotations": [
13      "@@@STEP_NEST_LEVEL@1@@@",
14      "@@@STEP_LOG_LINE@python.inline@import os@@@",
15      "@@@STEP_LOG_LINE@python.inline@print('%d:%d' % (os.getuid(), os.getgid()))@@@",
16      "@@@STEP_LOG_END@python.inline@@@"
17    ]
18  },
19  {
20    "cmd": [
21      "vpython3",
22      "-u",
23      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
24      "--json-output",
25      "/path/to/tmp/json",
26      "ensure-directory",
27      "--mode",
28      "0777",
29      "/host-out"
30    ],
31    "infra_step": true,
32    "name": "Docker setup.mkdirs out_dir",
33    "~followup_annotations": [
34      "@@@STEP_NEST_LEVEL@1@@@"
35    ]
36  },
37  {
38    "cmd": [
39      "chmod",
40      "777",
41      "/host-out"
42    ],
43    "infra_step": true,
44    "name": "Docker setup.chmod 777 /host-out",
45    "~followup_annotations": [
46      "@@@STEP_NEST_LEVEL@1@@@"
47    ]
48  },
49  {
50    "cmd": [
51      "chmod",
52      "755",
53      "/host-src"
54    ],
55    "infra_step": true,
56    "name": "Docker setup.chmod 755 /host-src",
57    "~followup_annotations": [
58      "@@@STEP_NEST_LEVEL@1@@@"
59    ]
60  },
61  {
62    "cmd": [
63      "chmod",
64      "0755",
65      "./do-stuff.sh"
66    ],
67    "infra_step": true,
68    "name": "Docker setup.chmod 0755 ./do-stuff.sh",
69    "~followup_annotations": [
70      "@@@STEP_NEST_LEVEL@1@@@"
71    ]
72  },
73  {
74    "cmd": [
75      "vpython3",
76      "-u",
77      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
78      "--json-output",
79      "/path/to/tmp/json",
80      "ensure-directory",
81      "--mode",
82      "0777",
83      "/copy-dst"
84    ],
85    "infra_step": true,
86    "name": "Docker setup.mkdirs /copy-dst",
87    "~followup_annotations": [
88      "@@@STEP_NEST_LEVEL@1@@@"
89    ]
90  },
91  {
92    "cmd": [
93      "vpython3",
94      "-u",
95      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
96      "--json-output",
97      "/path/to/tmp/json",
98      "copy",
99      "/copy-src/myfile",
100      "/copy-dst/myfile"
101    ],
102    "infra_step": true,
103    "name": "Docker setup.cp /copy-src/myfile /copy-dst/myfile",
104    "~followup_annotations": [
105      "@@@STEP_NEST_LEVEL@1@@@"
106    ]
107  },
108  {
109    "cmd": [
110      "chmod",
111      "644",
112      "/copy-dst/myfile"
113    ],
114    "infra_step": true,
115    "name": "Docker setup.chmod 644 /copy-dst/myfile",
116    "~followup_annotations": [
117      "@@@STEP_NEST_LEVEL@1@@@"
118    ]
119  },
120  {
121    "cmd": [
122      "chmod",
123      "-R",
124      "a+r",
125      "/host-src"
126    ],
127    "infra_step": true,
128    "name": "Docker setup.chmod -R a+r /host-src",
129    "~followup_annotations": [
130      "@@@STEP_NEST_LEVEL@1@@@"
131    ]
132  },
133  {
134    "cmd": [
135      "docker",
136      "run",
137      "--shm-size=2gb",
138      "--rm",
139      "--user",
140      "13:17",
141      "--mount",
142      "type=bind,source=/host-src,target=/SRC",
143      "--mount",
144      "type=bind,source=/host-out,target=/OUT",
145      "--cpus",
146      "2",
147      "my.docker.image",
148      "/SRC/../do-stuff.sh",
149      "--src",
150      "/SRC",
151      "--out",
152      "/OUT"
153    ],
154    "env": {
155      "CHROME_HEADLESS": "1",
156      "DOCKER_CONFIG": "/home/chrome-bot/.docker",
157      "PATH": "<PATH>:RECIPE_REPO[depot_tools]"
158    },
159    "name": "do Docker stuff"
160  },
161  {
162    "name": "$result"
163  }
164]