-
Notifications
You must be signed in to change notification settings - Fork 535
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make gitrest docker build install with a frozen lockfile (#23535)
## Description Main desirable change: updates the gitrest docker build to copy `.npmrc` within the docker container before installing, which ensures the subsequent install includes `frozen-lockfile=true`. Fallout from this desire: the previous CI setup for docker builds involved using `flub` to set the package version before the docker build. This makes `pnpm install` with frozen lockfile fail, since the dependency versions of packages within the workspace will be whatever that package version was set to, rather than the version within source control. To fix this, I've updated the docker build to support setting the package version from within the docker container using `flub`, and plumbed through necessary variables in CI to make that possible. Also includes some minor quality improvements to the docker build, such as fixing up deprecated syntax warnings, using a cache mount for the pnpm dependencies, and reducing the footprint of the `runner` build slightly (there's still much more that could be done in that area if we care to invest: we keep around dev deps, for example). [AB#26779](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/26779) --------- Co-authored-by: Abram Sanderson <absander@microsoft.com> Co-authored-by: Alex Villarreal <716334+alexvy86@users.noreply.github.com>
- Loading branch information
1 parent
26cb010
commit 40d5824
Showing
7 changed files
with
1,731 additions
and
1,400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/*! | ||
* Copyright (c) Microsoft Corporation and contributors. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
// This file is only used from within the context of a docker build. | ||
// fluid-build takes dependencies on the structure of the FluidFramework repository. | ||
// The root fluid build config is renamed to fluidBuild.base.config.cjs within the docker container | ||
// and this file is also placed at the FF repository root, hence the relative path setup below. | ||
// This extra config is necessary in the first place as we don't want to copy the entire FF repo into the docker container, | ||
// thus flub needs to have a pared down set of repoPackages. | ||
module.exports = { | ||
...require("./fluidBuild.base.config.cjs"), | ||
repoPackages: { | ||
gitrest: { | ||
directory: "server/gitrest", | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.