Commit 097cddbd3e25e0e25da0e5290e83ea9fa63df702
1 parent
4e24bd0e
Exists in
automates_core_packing
Auto converge working for spb plugins
Showing
2 changed files
with
22 additions
and
22 deletions
Show diff stats
src/Makefile
... | ... | @@ -40,18 +40,10 @@ release_plugins: |
40 | 40 | pkg-rpm/colab-spb-plugin/colab-spb-plugin.spec \ |
41 | 41 | pkg-rpm/noosfero-spb/noosfero-spb.spec |
42 | 42 | git diff |
43 | - @printf "Confirm release? [y/N]"; \ | |
44 | - read confirm; \ | |
45 | - if [ "$$confirm" = 'y' -o "$$confirm" = 'Y' ]; then \ | |
46 | - echo "SPB release $(VERSION)" > .commit_template; \ | |
47 | - git commit * --file .commit_template; \ | |
48 | - rm -f .commit_template; \ | |
49 | - else \ | |
50 | - echo 'Aborting at your request!'; \ | |
51 | - git checkout -- colab-spb-theme-plugin/VERSION noosfero-spb/VERSION colab-spb-plugin/VERSION ; \ | |
52 | - git checkout -- pkg-rpm/colab-spb-theme/ pkg-rpm/noosfero-spb/ pkg-rpm/colab-spb-plugin/ ; \ | |
53 | - false; \ | |
54 | - fi | |
43 | + | |
44 | + echo "SPB release $(VERSION)" > .commit_template; \ | |
45 | + git commit * --file .commit_template; \ | |
46 | + rm -f .commit_template; | |
55 | 47 | # TODO add pkg-rpm/colab-spb-plugin to the git checkout all above |
56 | 48 | $(MAKE) -C pkg-rpm/ noosfero-spb-upload colab-spb-theme-upload colab-spb-plugin-upload >> tmp |
57 | 49 | echo -ne noosfero-spb: >> daily_builds/$(shell date +'%F').yaml | ... | ... |
src/daily_builds/converge.py
... | ... | @@ -16,7 +16,10 @@ SPB_PATH = os.path.abspath(os.path.join(SRC_PATH, os.pardir)) |
16 | 16 | SPB_ENV = 'local' |
17 | 17 | |
18 | 18 | spb_repo = git.Git(SPB_PATH) |
19 | -#spb_repo.checkout('master') | |
19 | +print('Using git stash to save your local changes before converging') | |
20 | +spb_repo.stash('save') | |
21 | +print('Trying to checkout from current branch to master') | |
22 | +spb_repo.checkout('master') | |
20 | 23 | spb_repo.pull() |
21 | 24 | |
22 | 25 | def checkBuildStatus(packageName,buildId): |
... | ... | @@ -30,26 +33,31 @@ def checkBuildStatus(packageName,buildId): |
30 | 33 | |
31 | 34 | pluginsUpload = subprocess.Popen('make noosfero-upload', shell=True, cwd=SRC_PATH) |
32 | 35 | |
36 | +pluginsUpload.wait() | |
33 | 37 | |
34 | -#noosferoUpload = subprocess.Popen('make noosfero-upload', shell=True, cwd=SRC_PATH) | |
38 | +noosferoUpload = subprocess.Popen('make noosfero-upload', shell=True, cwd=SRC_PATH) | |
35 | 39 | |
36 | -#noosferoUpload.wait() | |
40 | +noosferoUpload.wait() | |
37 | 41 | |
38 | -#colabUpload = subprocess.Popen('make colab-upload', shell=True, cwd=SRC_PATH) | |
42 | +colabUpload = subprocess.Popen('make colab-upload', shell=True, cwd=SRC_PATH) | |
39 | 43 | |
40 | -#colabUpload.wait() | |
44 | +colabUpload.wait() | |
41 | 45 | |
42 | 46 | today = str(date.today()) |
43 | 47 | BUILDS = [] |
48 | +BUILD_COUNT = 0 | |
44 | 49 | buildDict = dict() |
45 | 50 | |
46 | 51 | with open(today+'.yaml') as f: |
47 | - BUILDS = f.read().splitlines() | |
48 | - for build in BUILDS: | |
49 | - package, buildId = build.strip().split(':') | |
50 | - buildDict.update({package : buildId}) | |
52 | + BUILD_COUNT = sum(1 for _ in f) | |
51 | 53 | |
52 | -with concurrent.futures.ThreadPoolExecutor(max_workers=2) as executor: | |
54 | +with open(today+'.yaml') as f: | |
55 | + BUILDS = f.read().splitlines() | |
56 | + for build in BUILDS: | |
57 | + package, buildId = build.strip().split(':') | |
58 | + buildDict.update({package : buildId}) | |
59 | + | |
60 | +with concurrent.futures.ThreadPoolExecutor(max_workers=BUILD_COUNT) as executor: | |
53 | 61 | future_builds = {executor.submit(checkBuildStatus,packageName,buildId) for packageName, buildId in buildDict.iteritems()} |
54 | 62 | |
55 | 63 | ... | ... |