@leverege/build-tools 2.68.3-beta.1 → 2.68.3-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.68.3-beta.1",
3
+ "version": "2.68.3-beta.3",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
package/src/Docker.mjs CHANGED
@@ -230,13 +230,14 @@ const buildContainerImage = async ( repoDescr ) => {
230
230
  const cloudBuildFile = './build/cloudbuild.yaml'
231
231
  let cloudBuildSteps
232
232
  let imagePlatformString
233
- if ( !imagePlatform || imagePlatform[0] === 'linux/amd64' ) {
233
+ if ( !imagePlatform || ( imagePlatform.length === 1 && imagePlatform[0] === 'linux/amd64' ) ) {
234
234
  cloudBuildSteps = cloudBuildStepsSingleArch
235
235
  imagePlatformString = 'linux/amd64'
236
236
  } else {
237
237
  cloudBuildSteps = cloudBuildStepsMultiArch
238
238
  imagePlatformString = imagePlatform.join( ',' )
239
239
  }
240
+ log( `imagePlatformString => ${imagePlatformString}` )
240
241
  const cbst = handlebars.compile( cloudBuildSteps, { noEscape : true } )
241
242
  const cbs = cbst( { artifactProject, artifactRegistry, imageName, imagePlatform : imagePlatformString, imageVersion, imageInfoTag, } )
242
243
  fs.writeFileSync( cloudBuildFile, cbs )
package/src/Utils.mjs CHANGED
@@ -569,7 +569,7 @@ export const analyzeRepository = async ( giveGuidance ) => {
569
569
  }
570
570
 
571
571
  const containerName = closestPackageJson?.name.replace( /^@[^/]+\//, '' ) || rootPyProjectToml?.project.name
572
- const imagePlatform = closestPackageJson?.leverege.imagePlatform || rootPyProjectToml?.leverege['image-platform']
572
+ const imagePlatform = closestPackageJson?.leverege.imagePlatform || rootPyProjectToml?.leverege['image-platform'] || 'linux/amd64'
573
573
  const artifactRegistry = closestPackageJson?.leverege.registry || rootPyProjectToml?.leverege.registry
574
574
  const artifactProject = closestPackageJson?.artifactRegistry.project || rootPyProjectToml?.artifactRegistry.project || 'unknown'
575
575
  const packageVersion = `v${closestPackageJson?.version || rootPyProjectToml?.project.version}`
@@ -99,6 +99,7 @@ const {
99
99
  artifactRegistry,
100
100
  packageVersion,
101
101
  containerName,
102
+ imagePlatform,
102
103
  helmChart,
103
104
  isNpmWorkspace,
104
105
  isNodeJsProject,
@@ -221,6 +222,7 @@ if ( options?.helmChecks !== 'false' ) {
221
222
  log( `
222
223
  ${chalk.green.bold( 'Build Information:' )}
223
224
  Container: ${chalk.green.bold( containerName )}
225
+ Platform: ${chalk.green.bold( imagePlatform )}
224
226
  Version: ${chalk.green.bold( imageVersion )} ${tagInfo}
225
227
  Registry: ${chalk.green.bold( artifactRegistry )}
226
228
  Image Folder: ${chalk.yellow.bold( registryFolder )}
@@ -229,6 +231,7 @@ if ( isNodeJsProject ) {
229
231
  log( `
230
232
  ${chalk.green.bold( 'NodeJS Docker Information:' )}
231
233
  NodeImage: ${chalk.green.bold( dockerInfo.imageBase || `node:${dockerInfo.nodeimage}` )}
234
+ Platform: ${chalk.green.bold( dockerInfo.imagePlatform )}
232
235
  Docker Env: ${chalk.green.bold( dockerInfo.buildEnv || 'alpine' )}
233
236
  AddedPkgs: ${chalk.green.bold( dockerInfo.apkadds )}
234
237
  Run User: ${chalk.green.bold( dockerInfo.runuser )}
@@ -243,6 +246,7 @@ if ( isPythonProject ) {
243
246
  log( `
244
247
  ${chalk.green.bold( 'Python Docker Information:' )}
245
248
  BaseImage: ${chalk.green.bold( dockerInfo.imageBase || `node:${dockerInfo.nodeimage}` )}
249
+ Platform: ${chalk.green.bold( dockerInfo.imagePlatform )}
246
250
  Python Ver: ${chalk.green.bold( dockerInfo.pythonVersion )}
247
251
  Run User: ${chalk.green.bold( dockerInfo.runuser )}
248
252
  Previous: ${chalk.yellow.bold( dockerInfo.previousBuild )}