@leverege/build-tools 2.67.3-beta.1 → 2.67.3-beta.10

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.67.3-beta.1",
3
+ "version": "2.67.3-beta.10",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
package/src/DockerPy.mjs CHANGED
@@ -161,8 +161,8 @@ async function validateCloudBuildBucket( artifactProject ) {
161
161
  }
162
162
 
163
163
  async function buildContainerImage( {
164
- artifactProject, artifactRegistry, containerName,
165
- imageVersion, isNpmWorkspace, options
164
+ artifactProject, artifactRegistry, containerName,
165
+ imageVersion, imagePlatform, isNpmWorkspace, options
166
166
  } ) {
167
167
  const buildWorkspace = './build/workspace' // passed to Cloud Build
168
168
  const imageName = `${artifactRegistry}/images/${containerName}`
@@ -195,7 +195,7 @@ async function buildContainerImage( {
195
195
  // build the cloudbuild.yaml from the handlebars template
196
196
  const cloudBuildFile = './build/cloudbuild.yaml'
197
197
  const cbst = handlebars.compile( cloudBuildSteps, { noEscape : true } )
198
- const cbs = cbst( { artifactProject, artifactRegistry, imageName, imageVersion, imageInfoTag, } )
198
+ const cbs = cbst( { artifactProject, artifactRegistry, imageName, imageVersion, imageInfoTag, imagePlatform } )
199
199
  fs.writeFileSync( cloudBuildFile, cbs )
200
200
 
201
201
  // build up the cloud build command and options
@@ -91,8 +91,9 @@ const repoDescr = {
91
91
  containerName : pyproject.project.name,
92
92
  packageVersion : `v${pyproject.project.version}`,
93
93
  artifactRegistry : pyproject.leverege.registry || 'us-docker.pkg.dev/leverege-registry/stack',
94
- registryFolder : `${pyproject.leverege['registry-folder']}/images/${pyproject.project.name}`,
94
+ // registryFolder : `${pyproject.leverege['registry-folder']}/images/${pyproject.project.name}`, Not being used
95
95
  imageBase : pyproject.leverege['image-base'],
96
+ imagePlatform : pyproject.leverege['image-platform'] || 'linux/amd64',
96
97
  helmChart : await parseHelmChart(),
97
98
  }
98
99
 
@@ -214,6 +215,7 @@ log( `
214
215
  ${chalk.green.bold( 'Build Information:' )}
215
216
  Container: ${chalk.green.bold( containerName )}
216
217
  Version: ${chalk.green.bold( imageVersion )} ${tagInfo}
218
+ Platform: ${chalk.green.bold( repoDescr.imagePlatform )}
217
219
  Registry: ${chalk.green.bold( artifactRegistry )}
218
220
  Image Folder: ${chalk.yellow.bold( registryFolder )}
219
221
 
@@ -4,12 +4,15 @@ options:
4
4
  steps:
5
5
  - name: 'gcr.io/cloud-builders/docker'
6
6
  entrypoint: 'bash'
7
- args: ['-c', 'docker pull {{imageName}}:latest || exit 0']
7
+ args: ['-c', 'docker pull --platform={{imagePlatform}} {{imageName}}:latest || exit 0']
8
+
9
+ - name: 'gcr.io/cloud-builders/docker'
10
+ args: ['buildx', 'create', '--driver', 'docker-container', '--name', 'container', '--driver-opt', 'network=cloudbuild', '--use']
8
11
 
9
12
  - name: 'gcr.io/cloud-builders/docker'
10
13
  args:
14
+ - 'buildx'
11
15
  - 'build'
12
- - '--platform=linux/arm64'
13
16
  - '--network=cloudbuild'
14
17
  - '-t'
15
18
  - '{{imageName}}:{{imageVersion}}'