| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I603b5172902b5249874ea3bb90de59db5a908185
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's not really any reason you'd want to use the RemoteRepoCache
class except as a workaround for the slow speed of some LocalRepoCache
operations, so I can't see this ruining anyone's day.
The main reason for doing this is so we can simply the sourceresolver
code. One reason that the sourceresolver class is so hopelessly
complicated is that it right now has to use two incompatible interfaces
for Git repo caches.
I've taken the opportunity to detangle the RepoCache class from the
App class. Now all of the configuration for the RepoCache class is
passed into the constructor explicitly. This makes the class usable from
outside Morph:
resolver = morphlib.repoaliasresolver.RepoAliasResolver(aliases=[])
repo_cache = morphlib.repocache.RepoCache('/src/cache/gits', resolver)
Change-Id: I596c81d7645b67504c88e555172a8c238f4f8a66
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that we don't support system branches, we don't need to iterate over
a list of repos to create temporary build branches, commit their local
changes and push those branches. We only need to do this for the
definitions repository itself.
A bug is also fixed where the local build branch was not being deleted
due a missing call to _register_cleanup() when commiting the changes.
This commit also renames some functions to more clear names, and moves
the logic on pushed_build_branch() to the definitions_repo module, the
only place where it is used.
Change-Id: Id86240d0c189245bed36bc46355be13d46498dbc
|
|
|
|
| |
Change-Id: Id470c7a77a47c89118a5d9d0d23b2206d8a839e4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a new 'Defaults' class to represent definitions defaults
The Python 'jsonschema' module is used to validate the contents of the
Defaults file. This module is already included in Baserock 'build' and
'devel' reference systems by way of the 'openstack-common' stratum.
This commit embeds a copy of the JSON-Schema schema for the DEFAULTS
file. I think the canonical location of this schema should be in the
reference definitions.git, for now. In future, the schemas should maybe
have their own repos. Either way, Morph should embed a copy for the time
being so that we are sure the schema matches how Morph expects to parse
the file.
Morph's automated tests are all updated to use definitions version 7.
I removed most of the tests for built-in build systems, because the
built-ins themselves are no longer part of Morph. Only the mechanism for
defining them needs to be tested now.
Change-Id: I65f8f1c967683ef605852bfae5c68518e53f9981
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Loading .morph files is becoming a bit more complicated, as we need to
deal with the VERSION file, and possibly soon with a DEFAULTS file as
well.
The logic of loading and parsing .morph files is done either in the
sourceresolver module, or the morphloader module. This change means that
all users of the latter module can use the get hold of a
MorphologyLoader instance with VERSION already parsed. If DEFAULTS is
added then it is also simple to parse DEFAULTS.
Change-Id: Ib33756e9dbd078e38f12dd7f776c89584b178959
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes `morph get-chunk-details`, `morph get-repo` and `morph
show-build-log` work in any Git checkout of definitions.git. These
are all of the commands outside of the deprecated
branch_and_merge_plugin that take notice of system branches.
The DefinitionsRepo.relative_path_to_chunk() function is changed a
bit. It actually only existed for the `get-repo` command to use, but
it turns out that it did the wrong thing by returning a long path for
the repo (e.g. baserock/baserock/fhs-dirs) instead of a short one
(fhs-dirs). The latter is less typing, and is the behaviour expected
by the `get-repo` yarn tests, so it now does that.
Change-Id: I430b540b3b0f309cf7018e0b8236f0e8a9042d89
|
|
|
|
|
|
|
| |
Previously callers to DefinitionsRepoWithApp.source_pool() could
override the user's value, but that's not actually used anywhere.
Change-Id: I43b53e7b9fc937886c8e6e95947e5e2b6776d085
|
|
|
|
| |
Thanks to Richard Maw for suggesting this fixup.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Old error:
ERROR: Git directory
/build/cache/gits/git___git_baserock_org_baserock_baserock_definitions
has no commit at ref 5046c3a0e4fd587c23f7c6a9e0d0b50d1914dcca^{commit}.
New error:
ERROR: Commit 5046c3a0e4fd587c23f7c6a9e0d0b50d1914dcca wasn't found
in the "origin" remote
git://git.baserock.org/baserock/baserock/definitions. You either need
to push your local commits on branch xxx to "origin", or use the
--local-changes=include feature.
Change-Id: I0c3658e9cd27c23f40653662ba7e4ba58b7892de
|
|
|
|
|
|
|
|
|
| |
This allows using `morph build`, `morph distbuild` and `morph
distbuild-start` from any Git checkout of a definitions.git repo, so
nobody needs to use `morph checkout` or `morph branch` if they don't
want to.
Change-Id: I5fdfae0f8bec1953893e26f0d227e289da11fa84
|
|
The intention is for this class to take over the from the Workspace and
SystemBranch classes. It allows Morph to load and parse definitions from
a Git repo, without requiring the user to run `morph checkout` or
`morph branch`: it can operate from any normal Git repository.
The class behaves differently when the Git repository is inside a Morph
system-branch checkout made with `morph branch` or `morph checkout`, to
avoid changing things under the feet of people who are used to those
commands.
Change-Id: I52a898efb9f6fb7f7e94c65b9ed38516bd51f49d
|