Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Let a job start service containers beside it

c1929d2fceb5e9e65204d5eef907d0781b9a5391 · Keenan Nemetz · 5d ago · parent 1d06b008

ci/agent/validate.go +35

@@ -165,6 +165,41 @@ func validateJob(job *runnerJob) error {
165 165 }
166 166 }
167 167
168 if len(job.Services) > ci.MaxServices {
169 add("%d services, limit %d", len(job.Services), ci.MaxServices)
170 }
171 seenServices := map[string]bool{}
172 for i, svc := range job.Services {
173 where := fmt.Sprintf("services[%d]", i)
174 if err := ci.ValidServiceName(svc.ID); err != nil {
175 add("%s: %v", where, err)
176 continue
177 }
178 if seenServices[svc.ID] {
179 add("%s: service %q is listed twice", where, svc.ID)
180 continue
181 }
182 seenServices[svc.ID] = true
183 if err := ci.ValidImageRef(svc.Image); err != nil {
184 add("%s.image: %v", where, err)
185 }
186 if len(svc.Env) > ci.MaxEnv {
187 add("%s: %d environment variables, limit %d", where, len(svc.Env), ci.MaxEnv)
188 }
189 for name, value := range svc.Env {
190 if !ci.ValidEnvName(name) {
191 add("%s.env: %q is not a variable name", where, name)
192 continue
193 }
194 if len(value) > ci.MaxEnvValue || strings.ContainsAny(value, "\r\n\x00") {
195 add("%s.env.%s: the value is too long or not one line", where, name)
196 }
197 }
198 }
199 if len(job.Services) > 0 && job.Network != ci.NetworkBridge {
200 add("services need network: bridge")
201 }
202
168 203 // The values are written into a file the step's shell sources and then into the
169 204 // step's environment, so the runner checks what it is about to write rather than
170 205 // trusting the instance to have checked it. A name that could not be a variable,