|Git tree|@git_tree@|@"uuid"@ must be the UUID of an Arvados-hosted git repository.
@"commit"@ must be a full 40-character commit hash.
@"path"@, if provided, must be "/".
-At container startup, the target path will have the source tree indicated by the given commit. The @.git@ metadata directory _will not_ be available.
-If @"writable"@ is true, the target directory will be writable. Any changes will be discarded when the container exits.|<pre><code>{
+At container startup, the target path will have the source tree indicated by the given commit. The @.git@ metadata directory _will not_ be available.|<pre><code>{
"kind":"git_tree",
"uuid":"zzzzz-s0uqq-xxxxxxxxxxxxxxx",
"commit":"f315c59f90934cccae6381e72bba59d27ba42099"
if err != nil {
return err
}
- bind := tmpdir + ":" + bind
- if !mnt.Writable {
- bind = bind + ":ro"
- }
- runner.Binds = append(runner.Binds, bind)
+ runner.Binds = append(runner.Binds, tmpdir+":"+bind+":ro")
}
}
Path: "/",
},
"/non-tip": {
- Kind: "git_tree",
- UUID: arvadostest.Repository2UUID,
- Commit: "5ebfab0522851df01fec11ec55a6d0f4877b542e",
- Path: "/",
- Writable: true,
+ Kind: "git_tree",
+ UUID: arvadostest.Repository2UUID,
+ Commit: "5ebfab0522851df01fec11ec55a6d0f4877b542e",
+ Path: "/",
},
}
cr.OutputPath = "/tmp"
if !repoUUIDre.MatchString(gm.UUID) {
return fmt.Errorf("cannot mount git_tree with uuid %q -- must be a repository UUID", gm.UUID)
}
+ if gm.Writable {
+ return fmt.Errorf("writable git_tree mount is not supported")
+ }
return nil
}
},
matcher: ".*UUID.*",
},
+ {
+ gm: gitMount{
+ Path: "/",
+ UUID: arvadostest.Repository2UUID,
+ Commit: "5ebfab0522851df01fec11ec55a6d0f4877b542e",
+ Writable: true,
+ },
+ matcher: ".*writable.*",
+ },
} {
err := trial.gm.extractTree(&ArvTestClient{}, s.tmpdir, arvadostest.ActiveToken)
c.Check(err, check.NotNil)