diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-06-15 13:00:00 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2020-06-15 13:00:00 +0200 |
commit | 577d00ee5ea4c8851af2cd5811f0c8829db41178 (patch) | |
tree | be0f5ee83b871d4f1606c3b7be1281be0b2e3553 /modules/private/buildbot/projects/immaeEu | |
parent | a295d69fcfabe64bd17ae05f1948505531ea99a2 (diff) | |
download | Nix-577d00ee5ea4c8851af2cd5811f0c8829db41178.tar.gz Nix-577d00ee5ea4c8851af2cd5811f0c8829db41178.tar.zst Nix-577d00ee5ea4c8851af2cd5811f0c8829db41178.zip |
Put history generator in separate repository
Thunderbird doesn’t like feed.xml at timestamp 1
Diffstat (limited to 'modules/private/buildbot/projects/immaeEu')
-rw-r--r-- | modules/private/buildbot/projects/immaeEu/__init__.py | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/modules/private/buildbot/projects/immaeEu/__init__.py b/modules/private/buildbot/projects/immaeEu/__init__.py index bb880e5..575f083 100644 --- a/modules/private/buildbot/projects/immaeEu/__init__.py +++ b/modules/private/buildbot/projects/immaeEu/__init__.py | |||
@@ -17,6 +17,7 @@ class E(): | |||
17 | 17 | ||
18 | BIP39_GIT_URL = "https://git.immae.eu/perso/Immae/Projets/Cryptomonnaies/BIP39.git" | 18 | BIP39_GIT_URL = "https://git.immae.eu/perso/Immae/Projets/Cryptomonnaies/BIP39.git" |
19 | IMMAE_EU_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Blog" | 19 | IMMAE_EU_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Blog" |
20 | HISTORY_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/History" | ||
20 | RECETTES_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Recettes" | 21 | RECETTES_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Recettes" |
21 | COURS_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Cours" | 22 | COURS_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Sites/Cours" |
22 | NORMALESUP_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Projets/Sites/Normalesup" | 23 | NORMALESUP_GIT_URL = "gitolite@git.immae.eu:perso/Immae/Projets/Sites/Normalesup" |
@@ -25,6 +26,7 @@ class E(): | |||
25 | COURS_TARBALL_PATH = "/var/lib/ftp/release.immae.eu/cours" | 26 | COURS_TARBALL_PATH = "/var/lib/ftp/release.immae.eu/cours" |
26 | COURS_TARBALL_URL = "https://release.immae.eu/cours" | 27 | COURS_TARBALL_URL = "https://release.immae.eu/cours" |
27 | BIP39_RELEASE_PATH = "/var/lib/buildbot/outputs/bip39" | 28 | BIP39_RELEASE_PATH = "/var/lib/buildbot/outputs/bip39" |
29 | HISTORY_RELEASE_PATH = "/var/lib/buildbot/outputs/immae/history" | ||
28 | IMMAE_EU_RELEASE_PATH = "/var/lib/buildbot/outputs/immaeEu" | 30 | IMMAE_EU_RELEASE_PATH = "/var/lib/buildbot/outputs/immaeEu" |
29 | RECETTES_RELEASE_PATH = "/var/lib/buildbot/outputs/recettes" | 31 | RECETTES_RELEASE_PATH = "/var/lib/buildbot/outputs/recettes" |
30 | NORMALESUP_RELEASE_PATH = "/var/lib/buildbot/outputs/recherche" | 32 | NORMALESUP_RELEASE_PATH = "/var/lib/buildbot/outputs/recherche" |
@@ -68,12 +70,13 @@ def configure(c): | |||
68 | c['schedulers'].append(hook_scheduler("Normalesup", timer=1)) | 70 | c['schedulers'].append(hook_scheduler("Normalesup", timer=1)) |
69 | c['schedulers'].append(hook_scheduler("Cours", timer=1)) | 71 | c['schedulers'].append(hook_scheduler("Cours", timer=1)) |
70 | c['schedulers'].append(hook_scheduler("Recettes", timer=1)) | 72 | c['schedulers'].append(hook_scheduler("Recettes", timer=1)) |
73 | c['schedulers'].append(hook_scheduler("History", timer=1)) | ||
71 | c['schedulers'].append(hook_scheduler("BIP39", timer=1)) | 74 | c['schedulers'].append(hook_scheduler("BIP39", timer=1)) |
72 | c['schedulers'].append(schedulers.Nightly(name="GSMCells-weekly", | 75 | c['schedulers'].append(schedulers.Nightly(name="GSMCells-weekly", |
73 | builderNames=["GSMCells_build"], dayOfWeek=6, hour=3)) | 76 | builderNames=["GSMCells_build"], dayOfWeek=6, hour=3)) |
74 | c['schedulers'].append(force_scheduler("force_immae_eu", [ | 77 | c['schedulers'].append(force_scheduler("force_immae_eu", [ |
75 | "ImmaeEu_build", "Normalesup_build", "Cours_build", | 78 | "ImmaeEu_build", "Normalesup_build", "Cours_build", |
76 | "Recettes_build", "BIP39_build" | 79 | "Recettes_build", "History_build", "BIP39_build" |
77 | ])) | 80 | ])) |
78 | c['schedulers'].append(schedulers.ForceScheduler( | 81 | c['schedulers'].append(schedulers.ForceScheduler( |
79 | name="GSMCells-force", label="Force build", | 82 | name="GSMCells-force", label="Force build", |
@@ -96,24 +99,46 @@ def configure(c): | |||
96 | c['builders'].append(cours_factory()) | 99 | c['builders'].append(cours_factory()) |
97 | c['builders'].append(gsm_cells_factory()) | 100 | c['builders'].append(gsm_cells_factory()) |
98 | c['builders'].append(recettes_factory()) | 101 | c['builders'].append(recettes_factory()) |
102 | c['builders'].append(history_factory()) | ||
99 | c['builders'].append(bip39_factory()) | 103 | c['builders'].append(bip39_factory()) |
100 | 104 | ||
101 | c['services'].append(SlackStatusPush( | 105 | c['services'].append(SlackStatusPush( |
102 | name="slack_status_immae_eu_project", | 106 | name="slack_status_immae_eu_project", |
103 | builders=[ | 107 | builders=[ |
104 | "ImmaeEu_build", "Normalesup_build", "Cours_build", | 108 | "ImmaeEu_build", "Normalesup_build", "Cours_build", |
105 | "GSMCells_build", "Recettes_build", "BIP39_build" | 109 | "GSMCells_build", "Recettes_build", "History_build", |
110 | "BIP39_build" | ||
106 | ], | 111 | ], |
107 | serverUrl=open(E.SECRETS_FILE + "/slack_webhook", "r").read().rstrip())) | 112 | serverUrl=open(E.SECRETS_FILE + "/slack_webhook", "r").read().rstrip())) |
108 | c['services'].append(XMPPStatusPush( | 113 | c['services'].append(XMPPStatusPush( |
109 | name="xmpp_status_immae_eu_project", | 114 | name="xmpp_status_immae_eu_project", |
110 | builders=[ | 115 | builders=[ |
111 | "ImmaeEu_build", "Normalesup_build", "Cours_build", | 116 | "ImmaeEu_build", "Normalesup_build", "Cours_build", |
112 | "GSMCells_build", "Recettes_build", "BIP39_build" | 117 | "GSMCells_build", "Recettes_build", "History_build", |
118 | "BIP39_build" | ||
113 | ], | 119 | ], |
114 | recipients=E.XMPP_RECIPIENTS, | 120 | recipients=E.XMPP_RECIPIENTS, |
115 | password=open(E.SECRETS_FILE + "/notify_xmpp_password", "r").read().rstrip())) | 121 | password=open(E.SECRETS_FILE + "/notify_xmpp_password", "r").read().rstrip())) |
116 | 122 | ||
123 | def history_factory(): | ||
124 | path_env = { | ||
125 | "PATH": os.environ["BUILDBOT_PATH_History"] + ":${PATH}" | ||
126 | } | ||
127 | factory = util.BuildFactory() | ||
128 | factory.addStep(steps.Git(logEnviron=False, repourl=E.HISTORY_GIT_URL, | ||
129 | submodules=True, sshPrivateKey=open(E.SSH_KEY_PATH).read().rstrip(), | ||
130 | sshHostKey=E.SSH_HOST_KEY, mode="full", method="copy")) | ||
131 | factory.addStep(steps.ShellCommand(name="build website", | ||
132 | logEnviron=False, haltOnFailure=True, workdir="source", | ||
133 | env=path_env, command=["jekyll", "build"])) | ||
134 | factory.addStep(steps.MasterShellCommand(command="rm -rf {}".format(E.HISTORY_RELEASE_PATH))) | ||
135 | factory.addStep(steps.DirectoryUpload(workersrc="../source/_site", | ||
136 | masterdest=E.HISTORY_RELEASE_PATH, | ||
137 | url="https://www.immae.eu/history")) | ||
138 | factory.addStep(steps.MasterShellCommand(command="chmod -R a+rX {}".format(E.HISTORY_RELEASE_PATH))) | ||
139 | |||
140 | return util.BuilderConfig(name="History_build", workernames=["generic-worker-immae-eu"], factory=factory) | ||
141 | |||
117 | def recettes_factory(): | 142 | def recettes_factory(): |
118 | path_env = { | 143 | path_env = { |
119 | "PATH": os.environ["BUILDBOT_PATH_Recettes"] + ":${PATH}" | 144 | "PATH": os.environ["BUILDBOT_PATH_Recettes"] + ":${PATH}" |