Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bug 785965: adjust push to mirrors process for CDN. r=nthomas

  • Loading branch information...
commit 946ea8c7ef59d1f51065839d3a7db9323d493089 1 parent 37b1b70
@bhearsum bhearsum authored
Showing with 18 additions and 10 deletions.
  1. +18 −10 scripts/release/stage-tasks.py
View
28 scripts/release/stage-tasks.py
@@ -158,7 +158,9 @@ def makeIndexFiles(productName, version, buildNumber, stageServer,
scp(indexFile.name, '%s@%s:%s/index.html' % (stageUsername, stageServer, candidates_dir),
sshKey=stageSshKey)
- run_remote_cmd(['find', candidates_dir, '-mindepth', '1', '-type', 'd', '-exec', 'cp', '-pv', '%s/index.html' % candidates_dir, '{}', '\\;'],
+ run_remote_cmd(['chmod', '644', '%s/index.html' % candidates_dir],
+ server=stageServer, username=stageUsername, sshKey=stageSshKey)
+ run_remote_cmd(['find', candidates_dir, '-mindepth', '1', '-type', 'd', '-not', '-regex', '.*contrib.*', '-exec', 'cp', '-pv', '%s/index.html' % candidates_dir, '{}', '\\;'],
server=stageServer, username=stageUsername, sshKey=stageSshKey)
def deleteIndexFiles(cleanup_dir, stageServer, stageUsername,
@@ -167,11 +169,14 @@ def deleteIndexFiles(cleanup_dir, stageServer, stageUsername,
server=stageServer, username=stageUsername, sshKey=stageSshKey)
def updateSymlink(productName, version, stageServer, stageUsername,
- stageSshKey):
+ stageSshKey, target):
releases_dir = makeReleasesDir(productName)
- run_remote_cmd(['cd %s && rm latest && ln -s %s latest' % (releases_dir, version)],
- server=stageServer, username=stageUsername, sshKey=stageSshKey)
+ run_remote_cmd([
+ 'cd %(rd)s && rm -f %(target)s && ln -s %(version)s %(target)s' % \
+ dict(rd=releases_dir, version=version, target=target)
+ ],
+ server=stageServer, username=stageUsername, sshKey=stageSshKey)
if __name__ == '__main__':
@@ -207,7 +212,8 @@ def updateSymlink(productName, version, stageServer, stageUsername,
stageUsername = options.ssh_username or branchConfig['stage_username']
stageSshKey = options.ssh_key or branchConfig["stage_ssh_key"]
stageSshKey = path.join(os.path.expanduser("~"), ".ssh", stageSshKey)
- createIndexFiles = releaseConfig.get('makeIndexFiles', False)
+ createIndexFiles = releaseConfig.get('makeIndexFiles', False) and productName != 'xulrunner'
+ ftpSymlinkName = releaseConfig.get('ftpSymlinkName')
if 'permissions' in args:
checkStagePermissions(stageServer=stageServer,
@@ -262,8 +268,10 @@ def updateSymlink(productName, version, stageServer, stageUsername,
stageUsername=stageUsername,
stageSshKey=stageSshKey,
cleanup_dir=makeReleasesDir(productName, version))
- updateSymlink(stageServer=stageServer,
- stageUsername=stageUsername,
- stageSshKey=stageSshKey,
- productName=productName,
- version=version)
+ if ftpSymlinkName:
+ updateSymlink(stageServer=stageServer,
+ stageUsername=stageUsername,
+ stageSshKey=stageSshKey,
+ productName=productName,
+ version=version,
+ target=ftpSymlinkName)
Please sign in to comment.
Something went wrong with that request. Please try again.