109 Commits

Author SHA1 Message Date
Cecylia Bocovich
3b1b0190d4 Fix typo in new gitlab links 2020-06-12 11:45:35 -04:00
Cecylia Bocovich
0297dbcddb Change gitlab repository name to include version
This fixes an issue caused by gitlab repositories soft-delete for 7 days
before they are fully deleted. If we remove a repository in order
to upload new binaries, we need to be able to create a new one right
away. See https://bugs.torproject.org/33034
2020-03-11 12:46:50 -04:00
Cecylia Bocovich
c413a8ebda Add method to close dbpool and call it
We were leaving connections to the database open, which causes some
calls to hang. This adds destructors to the SQLite3 class and the
classes that use it, and refactors some code to make one database
connection per class object. This also makes sure that the destructors
for objects that use databases are actually called.
2020-02-19 14:40:28 -05:00
Cecylia Bocovich
187e27da76 Modified email parser to get locales from db
Before we were conflating the locales for the tor browser binaries with
the available locale for gettor email body localizations. This patch
checks our links database for available locales.
2020-01-27 09:48:23 -05:00
Cecylia Bocovich
4c8dd8568a Make gitlab repositories public
Created projects default to private, we need to set the visibility in
the script to make them public.
2020-01-23 09:26:50 -05:00
Cecylia Bocovich
5404ef8183 Ensure failure is declared before referenced
This fixes a bug where, if there were no errors in uploading binaries,
failure is referenced before it was ever declared.
2020-01-23 09:14:15 -05:00
Cecylia Bocovich
1631494e1c Ensure base64 encoded binaries are in ascii
This fixes an issue that occurred while running the new gitlab script on
the gettor machine. Newer library versions require the b64 encoded byte
string to be converted to ascii text.
2020-01-23 09:05:55 -05:00
Cecylia Bocovich
ff6379b556 Clean up script based on feedback
This commit cleans up the script a bit by:
- making more detailed comments,
- streamlining the choice of remote repository
- printing all output to std error
- captilization consistency
2020-01-22 14:58:05 -05:00
Cecylia Bocovich
cbec273581 Removed git commands from update_files script
We now have a separate script for both GitLab and Github endpoints.
2020-01-22 14:58:05 -05:00
Cecylia Bocovich
8260a79d95 Modified scripts to add correct gitlab links to db 2020-01-22 14:58:05 -05:00
Cecylia Bocovich
78415a6d32 Renamed update_github to a more generic update_git 2020-01-22 14:58:05 -05:00
Cecylia Bocovich
c63cb34499 Extend script to update gitlab remote
Updated and refactored the script to upload tor browser binaries to the
gitlab remote using the GitLab REST API.
2020-01-22 14:58:03 -05:00
Cecylia Bocovich
518c546738 Update links to new github repository 2020-01-17 16:44:29 -05:00
hiro
906bec40b2 Fix current issue with gettor strings splitting #32906
Add tests to check sent email messages.
2020-01-10 23:04:06 +01:00
Cecylia Bocovich
dfab6fc7ac Added a step to cleanup rclone remote
This fixes a bug where we exceed our google drive quota. Deleted files
were moved to a trash bin and not removed from storage entirely.
2020-01-10 11:02:23 -05:00
Cecylia Bocovich
e6f6ad93b1 Updated github repo 2020-01-08 14:53:11 -05:00
Cecylia Bocovich
21138997b6 Update each tb binary individually
This modifies update_files to update each tor browser binary in gitlab,
internet archive, and google docs, and then delete the binary before
downloading the next one. This will save storage space on the gettor
host.
2020-01-07 13:30:22 -05:00
hiro
ff07810650 Include feedback from review 2019-12-11 16:11:20 +01:00
hiro
fb3155de15 Document scripts and service files 2019-12-11 16:06:44 +01:00
Cecylia Bocovich
d3ac24f6af Removed github repo from update_files 2019-12-10 12:29:29 -05:00
Cecylia Bocovich
9fabf2a523 Restored old update_files script
This script had important commands for updating internet archine and
google docs. The github release script has been renamed to
update_github.
2019-12-10 12:27:24 -05:00
Cecylia Bocovich
5684c4fc95 Slight fix to working of log messages 2019-12-05 17:26:32 -05:00
Cecylia Bocovich
233d7da2f7 Safer token accesss and file cleanup
Have the script read directly from an environment variable instead of
passing the token in as a command line argument. This will hide it from
other processes.

Also removed downloaded files to prevent a messy directory.
2019-12-05 12:05:16 -05:00
Cecylia Bocovich
6aa7e2b2ed Retry failed downloads
- also fixed a bug where releases won't be deleted untless the assets
are removed first
2019-12-04 20:31:41 -05:00
Cecylia Bocovich
ee8d5a85ff Exit with non-zero code if some uploads fail
The script will continue with the rest of the uploads but will exit with
a non-zero code so that we'll be notified to upload the missing files
manually.
2019-11-25 15:02:23 -05:00
Cecylia Bocovich
7496d1127d Make sure script output clearly prints out errors 2019-11-21 16:19:40 -05:00
Cecylia Bocovich
7ddfbacf1b Update link in db to github releases 2019-11-21 16:12:52 -05:00
Cecylia Bocovich
0d4fc80177 Include upload function in try/catch block 2019-11-21 16:12:07 -05:00
Cecylia Bocovich
b60b5ad92d Changed update_files to upload releases
We were running out of space in both of our github and gitlab
repositories due to storage limits. This change switches to using the
github REST API to upload torbrowser binaries as releases. Releases are
not subject to the space limits of repositories and, even better, do not
count against our bandwidth limits when users download them.
2019-11-21 16:12:07 -05:00
hiro
7b1dbc34f8 Fix gettor check script 2019-10-14 17:28:20 +02:00
hiro
e4278339fd Modify bash script to upload files 2019-10-09 12:12:13 +02:00
hiro
59e215a772 Update check script 2019-09-30 21:40:47 +02:00
hiro
8a0ff9f4a6 Update check script 2019-09-30 20:28:45 +02:00
hiro
65508db5eb Update check script 2019-09-30 19:34:36 +02:00
hiro
eef49f90e1 Update check script 2019-09-30 18:14:05 +02:00
hiro
64bee8dc0d Update check script 2019-09-30 18:13:05 +02:00
hiro
dfdc19fa3e Update check service script 2019-09-30 14:07:49 +02:00
hiro
3e7378bb27 Update check service script 2019-09-30 14:02:07 +02:00
hiro
e156e9683b Update check service script 2019-09-30 14:00:09 +02:00
hiro
39f2b50ef1 Update check service script 2019-09-30 13:49:59 +02:00
hiro
31ac90013f Update check service script 2019-09-30 13:44:37 +02:00
hiro
bb6034047a Update check service script 2019-09-30 13:37:59 +02:00
hiro
b34700fdd2 Update check service script 2019-09-30 12:33:19 +02:00
hiro
5dccebef3b Update upload files script 2019-09-30 12:31:35 +02:00
hiro
612bce7f23 Update upload files script 2019-09-28 21:41:51 +02:00
hiro
660b880d88 Update upload files script 2019-09-28 21:32:46 +02:00
hiro
0e04d0b026 Update upload files script 2019-09-28 20:58:51 +02:00
hiro
f8ab2e4c15 Update upload files script 2019-09-28 20:27:15 +02:00
hiro
72c2c985ef Update messages 2019-09-28 20:24:23 +02:00
hiro
3dba52b3ee Update file script 2019-09-28 19:34:34 +02:00