diff --git a/buildserver/buildserver.py b/buildserver/buildserver.py index 94bf2dbe2..b6de17da5 100644 --- a/buildserver/buildserver.py +++ b/buildserver/buildserver.py @@ -195,4 +195,4 @@ def get_all_status(): if __name__ == '__main__': logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT) - app.run(host='0.0.0.0', port=5002, debug=True) \ No newline at end of file + app.run(host='0.0.0.0', port=5002, debug=True) diff --git a/certs/digital_ocean b/certs/digital_ocean new file mode 100644 index 000000000..700f2b586 --- /dev/null +++ b/certs/digital_ocean @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAwjlIK0HodmDNrZAmaALtr9RLriRSeeLh76gV8KHmjRweeT7v +dmhKeGP1nOAs17caZkcwsW0tiDbCeIv2MisV405sScjPOxFivWpY8tL72sgVuOAl +ReZauOGZ4M1ZcSa/YbT7tnFCIayYE9pde4ih5LmYZqKsBsaNq3ErcMnAzqG77D95 +8swuVwhz/INioBWwe4FjO76/0DqS357hT5yHDWthJD6UUH12VajPKBtXEvGNUtNL +vdq+drm9omt2y0seMn47fZXiNIulLv7ojsWKwtRMTsGcjnv6VMZAVAuX11u4cJd+ +oPTbDl0D+02B7XYcxABqdMZcOc1/7VTUlFFd4wIDAQABAoIBAAs4V+z3z8AW84rV +SwKzOJvxvbV/r6wO6VJ4+Vt/XtxEBZanhhnnCHZP//5iDPUhRMsnza5SSlEWKMHi +BAT97DPHcgYJLb+Rz4x1ulG80oPfDzIw8LZLCm6nycXs1v/sZx3z4J63iER9vgNX +mBLs371g42b6esmhasm+re3EGflV0LeY1IX0MY40pqGndmW8Fly1QH179TrMzVUJ +btu3i2JrwWmKk5zO5YGm0SYY5QQGCdjPj6SL+idDniAefEvbjJYz2qOaPOF3wj/7 +r8dAnmyaP10Q3JojT01Et5ltMfr0oF2/pic9tWYGrgn/aIuoXUXj0SF3Pfgrb/4L +Et1kzFECgYEA8Tb/9bYzQgtaQTQfzFU/KnsIKKnrxh73rZwnIxG59WvN0Ws41Byf +rv8fEbXWU8Yj0drxRSud9fADr99lZGWFxle8rSW5+qqoUxG8n/fkktzHxyPE/9Mh +pZW7un7a5/glKgUpHpjaOCZj9rhdF1AwdUXLSo1sFc7VBsKvKiKJAT0CgYEAziDt +A9h5lOgiLGf1xdBq3qmLIlARz7fivAcZ5acSGN5k6MFFxjHNqhcXRusqs7g+hvCN +eRupdwfgSdLwrTfvxuY4pCcddfYIZO3uUZYs/glvYRtIxaP2kMBkZTs9KzI02Bjv +zT3NPReR/46SqW0zvYTlRFSY7VZ0eRED/5xnjZ8CgYAZdlrSjyceA6DFXUE2CpGe +ZFpaIIW45i/y7ZbcBtUAaR7SymS3T0Yz7M5UykMTmMjTMC9jw9Tqzyk0eXp0fJsA +cuaByIe3RCh8jFTC9iH0tsWH6eizsI/OsN2eNCHbdsBFjUHn7u6qGrNWqeN5wIc8 ++d8ZwY/1RV4LVqWy5u5baQKBgHLFvJMWluQFuPl2zU9etBLU3ma1pKU/I11EqvPH +afk044UCEKLBml1pzAkt6jH1lcM2798OOvbPCOCyNlaMvdLG36TvLqU+3/+qx7bf +4p90i3LLaWK64BBLP9tp9640n13vzJ5AGiY5GI7uSNVTu6p789hvLlOAfwvmII7T +/IjLAoGBAO6iU8i6pAOaKa7+/uExXx6xwk3vqQtovxByo1/m7NpyUtT+ElDSq+t9 +7f+3TzzPB6ggdMl8d+PSyHR3o7KjVPgOSe7zld7eePhUrLjwZ4lh5ohcvhvYfaRL +0EgRTaTb+zLtCAvJS/ilNnJoIcxUmD8u5uSXpY7vAleSOiQTJRTh +-----END RSA PRIVATE KEY----- diff --git a/certs/digital_ocean.pub b/certs/digital_ocean.pub new file mode 100644 index 000000000..95db83601 --- /dev/null +++ b/certs/digital_ocean.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCOUgrQeh2YM2tkCZoAu2v1EuuJFJ54uHvqBXwoeaNHB55Pu92aEp4Y/Wc4CzXtxpmRzCxbS2INsJ4i/YyKxXjTmxJyM87EWK9aljy0vvayBW44CVF5lq44ZngzVlxJr9htPu2cUIhrJgT2l17iKHkuZhmoqwGxo2rcStwycDOobvsP3nyzC5XCHP8g2KgFbB7gWM7vr/QOpLfnuFPnIcNa2EkPpRQfXZVqM8oG1cS8Y1S00u92r52ub2ia3bLSx4yfjt9leI0i6Uu/uiOxYrC1ExOwZyOe/pUxkBUC5fXW7hwl36g9NsOXQP7TYHtdhzEAGp0xlw5zX/tVNSUUV3j jake@coreserver diff --git a/config.py b/config.py index 3ae57769a..71297a00b 100644 --- a/config.py +++ b/config.py @@ -85,8 +85,15 @@ class GitHubProdConfig(GitHubTestConfig): GITHUB_CLIENT_SECRET = 'f89d8bb28ea3bd4e1c68808500d185a816be53b1' +class DigitalOceanConfig(): + DO_CLIENT_ID = 'LJ44y2wwYj1MD0BRxS6qHA' + DO_CLIENT_SECRET = 'b9357a6f6ff45a33bb03f6dbbad135f9' + DO_SSH_KEY_ID = '46986' + + class DebugConfig(FlaskConfig, MailConfig, LocalStorage, SQLiteDB, - StripeTestConfig, MixpanelTestConfig, GitHubTestConfig): + StripeTestConfig, MixpanelTestConfig, GitHubTestConfig, + DigitalOceanConfig): REGISTRY_SERVER = 'localhost:5000' LOGGING_CONFIG = { 'level': logging.DEBUG, @@ -98,7 +105,7 @@ class DebugConfig(FlaskConfig, MailConfig, LocalStorage, SQLiteDB, class LocalHostedConfig(FlaskConfig, MailConfig, S3Storage, RDSMySQL, StripeLiveConfig, MixpanelTestConfig, - GitHubProdConfig): + GitHubProdConfig, DigitalOceanConfig): REGISTRY_SERVER = 'localhost:5000' LOGGING_CONFIG = { 'level': logging.DEBUG, @@ -109,7 +116,7 @@ class LocalHostedConfig(FlaskConfig, MailConfig, S3Storage, RDSMySQL, class ProductionConfig(FlaskConfig, MailConfig, S3Storage, RDSMySQL, StripeLiveConfig, MixpanelProdConfig, - GitHubProdConfig): + GitHubProdConfig, DigitalOceanConfig): REGISTRY_SERVER = 'quay.io' LOGGING_CONFIG = { 'stream': sys.stderr, diff --git a/data/database.py b/data/database.py index 0f3aef888..38bc2d2b7 100644 --- a/data/database.py +++ b/data/database.py @@ -150,6 +150,13 @@ class RepositoryTag(BaseModel): ) +class RepositoryBuild(BaseModel): + digitalocean_build_node_id = IntegerField(null=True) + phase = CharField(default='waiting') + status_url = CharField(null=True) + repository = ForeignKeyField(Repository) + + class QueueItem(BaseModel): queue_name = CharField(index=True) body = TextField() @@ -162,7 +169,7 @@ def initialize_db(): create_model_tables([User, Repository, Image, AccessToken, Role, RepositoryPermission, Visibility, RepositoryTag, EmailConfirmation, FederatedLogin, LoginService, - QueueItem]) + QueueItem, RepositoryBuild]) Role.create(name='admin') Role.create(name='write') Role.create(name='read') diff --git a/data/model.py b/data/model.py index 15827cca4..182ee2a21 100644 --- a/data/model.py +++ b/data/model.py @@ -30,6 +30,10 @@ class InvalidTokenException(DataModelException): pass +class InvalidRepositoryBuildException(DataModelException): + pass + + def create_user(username, password, email): if not validate_email(email): raise InvalidEmailAddressException('Invalid email address: %s' % email) @@ -548,3 +552,11 @@ def load_token_data(code): return fetched[0] else: raise InvalidTokenException('Invalid delegate token code: %s' % code) + + +def get_repository_build(request_dbid): + try: + return RepositoryBuild.get(RepositoryBuild == request_dbid) + except RepositoryBuild.DoesNotExist: + msg = 'Unable to locate a build by id: %s' % request_dbid + raise InvalidRepositoryBuildException(msg) diff --git a/data/queue.py b/data/queue.py index 0e1383aa2..3038b8389 100644 --- a/data/queue.py +++ b/data/queue.py @@ -56,3 +56,4 @@ class WorkQueue(object): image_diff_queue = WorkQueue('imagediff') +dockerfile_build_queue = WorkQueue('dockerfilebuild') diff --git a/static/css/quay.css b/static/css/quay.css index aaad9aa5f..eabc24d86 100644 --- a/static/css/quay.css +++ b/static/css/quay.css @@ -19,8 +19,7 @@ width: 40px; } -.repo-circle .icon-lock { - font-size: 50%; +.repo-circle .fa-lock { position: absolute; bottom: -6px; right: 0px; @@ -31,11 +30,11 @@ text-align: center; height: 20px; line-height: 21px; - font-size: 12px; + font-size: 16px; } -.repo-circle.no-background .icon-lock { - bottom: -4px; +.repo-circle.no-background .fa-lock { + bottom: 2px; right: -6px; color: #444; } @@ -711,7 +710,7 @@ p.editable:hover i { } .repo-listing i { - font-size: 1.5em; + font-size: 2em; color: #999; display: inline-block; margin-right: 6px; @@ -802,15 +801,15 @@ p.editable:hover i { margin-right: 10px; } -.repo .changes-container i.icon-plus-sign-alt { +.repo .changes-container i.fa-plus-square { color: rgb(73, 209, 73); } -.repo .changes-container i.icon-minus-sign-alt { +.repo .changes-container i.fa-minus-square { color: rgb(209, 73, 73); } -.repo .changes-container i.icon-edit-sign { +.repo .changes-container i.fa-pencil-square { color: rgb(73, 100, 209); } @@ -926,11 +925,11 @@ p.editable:hover i { width: 580px; } -.repo-admin .repo-access-state .state-icon i.icon-lock { +.repo-admin .repo-access-state .state-icon i.fa-lock { background: rgb(253, 191, 191); } -.repo-admin .repo-access-state .state-icon i.icon-unlock-alt { +.repo-admin .repo-access-state .state-icon i.fa-unlock-alt { background: rgb(170, 236, 170); } diff --git a/static/directives/repo-circle.html b/static/directives/repo-circle.html index 76ebd2cfd..8c03accc8 100644 --- a/static/directives/repo-circle.html +++ b/static/directives/repo-circle.html @@ -1,2 +1,2 @@ - - + + diff --git a/static/js/controllers.js b/static/js/controllers.js index 72610a23f..e867ac75d 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -85,7 +85,7 @@ function HeaderCtrl($scope, $location, UserService, Restangular) { }, template: function (datum) { template = '
'; - template += '' + template += '' template += '' + datum.repo.namespace +'/' + datum.repo.name + '' if (datum.repo.description) { template += '' + getFirstTextLine(datum.repo.description) + '' @@ -485,7 +485,7 @@ function RepoAdminCtrl($scope, Restangular, $routeParams, $rootScope) { }, template: function (datum) { template = '
'; - template += '' + template += '' template += '' + datum.username + '' template += '
' return template; diff --git a/static/js/graphing.js b/static/js/graphing.js index 1066c0594..c38ee273e 100644 --- a/static/js/graphing.js +++ b/static/js/graphing.js @@ -1039,17 +1039,17 @@ ImageFileChangeTree.prototype.update_ = function(source) { node.select('.node-icon') .html(function(d) { if (!d.kind) { - var folder = d._children ? 'icon-folder-close' : 'icon-folder-open'; + var folder = d._children ? 'fa fa-folder' : 'fa fa-folder-open'; return ''; } var icon = { - 'added': 'plus-sign-alt', - 'removed': 'minus-sign-alt', - 'changed': 'edit-sign' + 'added': 'plus-square', + 'removed': 'minus-square', + 'changed': 'pencil-square' }; - return ''; + return ''; }); // Transition exiting nodes to the parent's new position. diff --git a/static/lib/browser-chrome.js b/static/lib/browser-chrome.js index deda3b11f..e0a129227 100644 --- a/static/lib/browser-chrome.js +++ b/static/lib/browser-chrome.js @@ -1,5 +1,5 @@ (function(browserchrome, $) { - var htmlTemplate = '
Tab Title
http://google.com/
' + var htmlTemplate = '
Tab Title
http://google.com/
' browserchrome.update = function() { $('[data-screenshot-url]').each(function(index, element) { diff --git a/static/lib/pagedown/Markdown.Editor.js b/static/lib/pagedown/Markdown.Editor.js index 6bf690ba9..30e1a7b79 100755 --- a/static/lib/pagedown/Markdown.Editor.js +++ b/static/lib/pagedown/Markdown.Editor.js @@ -1359,42 +1359,42 @@ } group1 = makeGroup(1); - buttons.bold = makeButton("wmd-bold-button", "Bold - Ctrl+B", "icon-bold", bindCommand("doBold"), group1); - buttons.italic = makeButton("wmd-italic-button", "Italic - Ctrl+I", "icon-italic", bindCommand("doItalic"), group1); + buttons.bold = makeButton("wmd-bold-button", "Bold - Ctrl+B", "fa fa-bold", bindCommand("doBold"), group1); + buttons.italic = makeButton("wmd-italic-button", "Italic - Ctrl+I", "fa fa-italic", bindCommand("doItalic"), group1); group2 = makeGroup(2); /* - buttons.link = makeButton("wmd-link-button", "Link - Ctrl+L", "icon-link", bindCommand(function (chunk, postProcessing) { + buttons.link = makeButton("wmd-link-button", "Link - Ctrl+L", "fa fa-link", bindCommand(function (chunk, postProcessing) { return this.doLinkOrImage(chunk, postProcessing, false); }), group2); */ - buttons.quote = makeButton("wmd-quote-button", "Blockquote - Ctrl+Q", "icon-quote-left", bindCommand("doBlockquote"), group2); - buttons.code = makeButton("wmd-code-button", "Code Sample - Ctrl+K", "icon-code", bindCommand("doCode"), group2); + buttons.quote = makeButton("wmd-quote-button", "Blockquote - Ctrl+Q", "fa fa-quote-left", bindCommand("doBlockquote"), group2); + buttons.code = makeButton("wmd-code-button", "Code Sample - Ctrl+K", "fa fa-code", bindCommand("doCode"), group2); /* - buttons.image = makeButton("wmd-image-button", "Image - Ctrl+G", "icon-picture", bindCommand(function (chunk, postProcessing) { + buttons.image = makeButton("wmd-image-button", "Image - Ctrl+G", "fa fa-picture", bindCommand(function (chunk, postProcessing) { return this.doLinkOrImage(chunk, postProcessing, true); }), group2); */ group3 = makeGroup(3); - buttons.olist = makeButton("wmd-olist-button", "Numbered List - Ctrl+O", "icon-list", bindCommand(function (chunk, postProcessing) { + buttons.olist = makeButton("wmd-olist-button", "Numbered List - Ctrl+O", "fa fa-list", bindCommand(function (chunk, postProcessing) { this.doList(chunk, postProcessing, true); }), group3); - buttons.ulist = makeButton("wmd-ulist-button", "Bulleted List - Ctrl+U", "icon-list-ul", bindCommand(function (chunk, postProcessing) { + buttons.ulist = makeButton("wmd-ulist-button", "Bulleted List - Ctrl+U", "fa fa-list-ul", bindCommand(function (chunk, postProcessing) { this.doList(chunk, postProcessing, false); }), group3); - buttons.heading = makeButton("wmd-heading-button", "Heading - Ctrl+H", "icon-tasks", bindCommand("doHeading"), group3); - buttons.hr = makeButton("wmd-hr-button", "Horizontal Rule - Ctrl+R", "icon-minus", bindCommand("doHorizontalRule"), group3); + buttons.heading = makeButton("wmd-heading-button", "Heading - Ctrl+H", "fa fa-tasks", bindCommand("doHeading"), group3); + buttons.hr = makeButton("wmd-hr-button", "Horizontal Rule - Ctrl+R", "fa fa-minus", bindCommand("doHorizontalRule"), group3); group4 = makeGroup(4); - buttons.undo = makeButton("wmd-undo-button", "Undo - Ctrl+Z", "icon-undo", null, group4); + buttons.undo = makeButton("wmd-undo-button", "Undo - Ctrl+Z", "fa fa-undo", null, group4); buttons.undo.execute = function (manager) { if (manager) manager.undo(); }; var redoTitle = /win/.test(nav.platform.toLowerCase()) ? "Redo - Ctrl+Y" : "Redo - Ctrl+Shift+Z"; // mac and other non-Windows platforms - buttons.redo = makeButton("wmd-redo-button", redoTitle, "icon-share-alt", null, group4); + buttons.redo = makeButton("wmd-redo-button", redoTitle, "fa fa-share", null, group4); buttons.redo.execute = function (manager) { if (manager) manager.redo(); }; if (helpOptions) { @@ -1402,7 +1402,7 @@ group5.className = group5.className + " pull-right"; var helpButton = document.createElement("button"); var helpButtonImage = document.createElement("i"); - helpButtonImage.className = "icon-question-sign"; + helpButtonImage.className = "fa fa-question-sign"; helpButton.appendChild(helpButtonImage); helpButton.className = "btn"; helpButton.id = "wmd-help-button" + postfix; diff --git a/static/partials/header.html b/static/partials/header.html index 8e3f288dc..1ff5bd1b6 100644 --- a/static/partials/header.html +++ b/static/partials/header.html @@ -2,9 +2,9 @@
- +
- +

- + {{repo.namespace}} / {{repo.name}} @@ -31,7 +31,7 @@
- +

@@ -75,7 +75,7 @@ No matching changes
- + {{folder}}/{{getFilename(change.file)}} diff --git a/static/partials/landing.html b/static/partials/landing.html index 890566750..f425552e5 100644 --- a/static/partials/landing.html +++ b/static/partials/landing.html @@ -10,7 +10,7 @@
- +

Your Top Repositories

@@ -44,10 +44,10 @@ @@ -68,7 +68,7 @@
- + Secure Store your private docker containers where only you and your team @@ -77,7 +77,7 @@
- + Shareable Have to share a repository? No problem! Share with anyone you choose @@ -85,7 +85,7 @@
- + Cloud Hosted Accessible from anywhere, anytime @@ -97,7 +97,7 @@
-
+
Take a tour of Quay
diff --git a/static/partials/repo-admin.html b/static/partials/repo-admin.html index b7ebbce1e..f8c2a0428 100644 --- a/static/partials/repo-admin.html +++ b/static/partials/repo-admin.html @@ -1,5 +1,5 @@
- +
@@ -8,7 +8,7 @@
- +

{{repo.namespace}} / {{repo.name}}

@@ -18,7 +18,7 @@
User Access Permissions - +
@@ -33,7 +33,7 @@ - + {{username}} @@ -46,7 +46,7 @@ - + @@ -64,7 +64,7 @@
Access Token Permissions - +
@@ -79,7 +79,7 @@ - + {{ token.friendlyName }} @@ -91,7 +91,7 @@ - + @@ -114,7 +114,7 @@
Repository Settings
-
+
This repository is currently private. Only users on the above access list may view and interact with it. @@ -124,7 +124,7 @@
-
+
This repository is currently public and is visible to all users, and may be pulled by all users. @@ -171,7 +171,7 @@