Introduce stage3 downloads.
This expands the sync_jobs.py parameter to contain the release codename, which is respectfully documented in the README.md file.
This commit is contained in:
		
							parent
							
								
									2be199a214
								
							
						
					
					
						commit
						4da1117a3f
					
				|  | @ -43,26 +43,26 @@ optional arguments: | ||||||
| 
 | 
 | ||||||
| The `jobname` argument should be in a specific format. It should contain | The `jobname` argument should be in a specific format. It should contain | ||||||
| the requester's email, which sdk was chosen, the requested architecture, | the requester's email, which sdk was chosen, the requested architecture, | ||||||
| and a timestamp. | codename, and a timestamp. | ||||||
| 
 | 
 | ||||||
| In case of vm-sdk or live-sdk, these would look like: | In case of vm-sdk or live-sdk, these would look like: | ||||||
| 
 | 
 | ||||||
| ``` | ``` | ||||||
| parazyd@dyne.org-vm_amd64-1537977964 | parazyd@dyne.org-vm_amd64_ascii-1537977964 | ||||||
| parazyd@dyne.org-live_amd64-1537977964 | parazyd@dyne.org-live_amd64_beowulf-1537977964 | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| In case of arm-sdk, we also need to know the board we're building for: | In case of arm-sdk, we also need to know the board we're building for: | ||||||
| 
 | 
 | ||||||
| ``` | ``` | ||||||
| parazyd@dyne.org-arm_armhf_sunxi-1537977964 | parazyd@dyne.org-arm_armhf_ascii_sunxi-1537977964 | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| All of this combined, the required command to add a new job to Jenkins | All of this combined, the required command to add a new job to Jenkins | ||||||
| would look something like the following: | would look something like the following: | ||||||
| 
 | 
 | ||||||
| ``` | ``` | ||||||
| sync_jobs.py -a parazyd@dyne.org-vm_amd64-1537977964 | sync_jobs.py -a parazyd@dyne.org-vm_amd64_ascii-1537977964 | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| In case of removing or building an existing job, all of the above applies the | In case of removing or building an existing job, all of the above applies the | ||||||
|  |  | ||||||
|  | @ -20,16 +20,36 @@ def add_job(jobname): | ||||||
|     desc = 'WebSDK build for: %s\nStarted: %s' % (info[0], info[2]) |     desc = 'WebSDK build for: %s\nStarted: %s' % (info[0], info[2]) | ||||||
|     sdk = info[1].split('_')[0] |     sdk = info[1].split('_')[0] | ||||||
|     arch = info[1].split('_')[1] |     arch = info[1].split('_')[1] | ||||||
|  |     codename = info[1].split('_')[2] | ||||||
|     blenddir = join(jobpath, jobname) |     blenddir = join(jobpath, jobname) | ||||||
|     blendfile = join(blenddir, 'Dockerfile') |     blendfile = join(blenddir, 'Dockerfile') | ||||||
| 
 | 
 | ||||||
|  |     if codename == 'ascii': | ||||||
|  |         relvars = 'release=ascii && version=2.0.0' | ||||||
|  |     elif codename == 'beowulf': | ||||||
|  |         relvars = 'release=beowulf && version=3.0.0' | ||||||
|  |     else: | ||||||
|  |         # Default to Ascii | ||||||
|  |         relvars = 'release=ascii && version=2.0.0' | ||||||
|  | 
 | ||||||
|     if sdk == 'arm': |     if sdk == 'arm': | ||||||
|         board = info[1].split('_')[2] |         board = info[1].split('_')[3] | ||||||
|         zshcmd = 'load devuan %s %s && build_image_dist' % (board, blendfile) |         zshcmd = '\ | ||||||
|  |             load devuan %s %s && \ | ||||||
|  |             %s && \ | ||||||
|  |             build_image_dist' % (board, blendfile, relvars) | ||||||
|  | 
 | ||||||
|     elif sdk == 'live': |     elif sdk == 'live': | ||||||
|         zshcmd = 'load devuan %s %s && build_iso_dist ' % (arch, blendfile) |         zshcmd = '\ | ||||||
|  |             load devuan %s %s && \ | ||||||
|  |             %s && \ | ||||||
|  |             build_iso_dist' % (arch, blendfile, relvars) | ||||||
|  | 
 | ||||||
|     elif sdk == 'vm': |     elif sdk == 'vm': | ||||||
|         zshcmd = 'load devuan %s && build_vagrant_dist' % (blendfile) |         zshcmd = '\ | ||||||
|  |             load devuan %s && \ | ||||||
|  |             %s && \ | ||||||
|  |             build_vagrant_dist' % (blendfile, relvars) | ||||||
| 
 | 
 | ||||||
|     command = "zsh -f -c 'source sdk && %s'" % zshcmd |     command = "zsh -f -c 'source sdk && %s'" % zshcmd | ||||||
|     command = html.escape(command) |     command = html.escape(command) | ||||||
|  | @ -37,6 +57,7 @@ def add_job(jobname): | ||||||
|     replacements = [('DESC', desc), |     replacements = [('DESC', desc), | ||||||
|                     ('SDK', sdk), |                     ('SDK', sdk), | ||||||
|                     ('ARCH', arch), |                     ('ARCH', arch), | ||||||
|  |                     ('CODENAME', codename), | ||||||
|                     ('COMMAND', command), |                     ('COMMAND', command), | ||||||
|                     ('BLENDDIR', blenddir)] |                     ('BLENDDIR', blenddir)] | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -36,6 +36,12 @@ | ||||||
|       <command> |       <command> | ||||||
| scp -r sdk:{{{BLENDDIR}}} {{{BLENDDIR}}} || exit 1 | scp -r sdk:{{{BLENDDIR}}} {{{BLENDDIR}}} || exit 1 | ||||||
| git submodule update --init --recursive --checkout || exit 1 | git submodule update --init --recursive --checkout || exit 1 | ||||||
|  | 
 | ||||||
|  | mkdir -p tmp | ||||||
|  | cd tmp | ||||||
|  | wget https://sdk.dyne.org:4443/job/devuan-{{{CODENAME}}}-{{{ARCH}}}-stage3/lastSuccessfulBuild/artifact/tmp/bootstrap-devuan-{{{ARCH}}}-stage3.tgz | ||||||
|  | cd - | ||||||
|  | 
 | ||||||
| {{{COMMAND}}} || exit 1 | {{{COMMAND}}} || exit 1 | ||||||
| rm -rf {{{BLENDDIR}}} | rm -rf {{{BLENDDIR}}} | ||||||
|       </command> |       </command> | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue