[Git][qa/jenkins.debian.net][master] 3 commits: reproducible Debian: update nginx.conf for rebuilderd on o5

Holger Levsen (@holger) gitlab at salsa.debian.org
Thu Oct 31 14:50:33 GMT 2024



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
e43de52e by Holger Levsen at 2024-10-31T15:38:25+01:00
reproducible Debian: update nginx.conf for rebuilderd on o5

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
2fdfe56c by Holger Levsen at 2024-10-31T15:50:00+01:00
reproducible Debian: add basic index.html for rebuilderd

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -
6a383397 by Holger Levsen at 2024-10-31T15:50:24+01:00
reproducible Debian: update rebuilderd related TODO

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


3 changed files:

- TODO
- hosts/osuosl5-amd64/etc/nginx/nginx.conf
- + hosts/osuosl5-amd64/var/www/html/index.html


Changes:

=====================================
TODO
=====================================
@@ -25,13 +25,11 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
 === 2024 things
 
 * rebuilderd
-** disable rebuilder-snapshot on o4+5
-** fix nginx.conf in git...
-** add https
-** start rebuilderd and workers services
+** nginx.conf
+*** enable https again for rebuilderd.debian.net, see commit e43de52e2
+** start rebuilderd and workers as services
 ** reinstall with user rebuilderd
 ** publish docs
-** destroy beta
 ** purge postgresql from osuosl4 and and 5.
 ** add more workers to o4
 ** use web frontend from archlinux too? https://gitlab.archlinux.org/archlinux/rebuilderd-website


=====================================
hosts/osuosl5-amd64/etc/nginx/nginx.conf
=====================================
@@ -13,48 +13,24 @@ http {
     server_tokens       off;
 
     server {
-        server_name     rebuilder-snapshot.debian.net;
+        server_name     osuosl5-amd64.debian.net;
+	index index.html index.htm index.nginx-debian.html;
+	root /var/www/html;
 
-        location 		/ {
-	    alias		/srv/data/rebuilder-snapshot/;
-	    autoindex	on;
-        }
+	location / {
+		# First attempt to serve request as file, then
+		# as directory, then fall back to displaying a 404.
+		try_files $uri $uri/ =404;
+	}
 
-        location ~ /api(.*)$ {
-	    proxy_pass  	http://127.0.0.1:5001/$1;
-	    include		proxy_params;
-        }
-
-        location ~ /rebuilder-snapshot/api(.*)$ {
-	    proxy_pass  	http://127.0.0.1:5001/$1;
-	    include		proxy_params;
-        }
-
-        location 		/rebuilder-snapshot/storage {
-	    alias		/srv/data/rebuilder-snapshot/storage;
-	    autoindex	on;
-        }
 
+	location /api/ {
+        	proxy_pass http://127.0.0.1:8484;
+    	}
 
     
-    listen 443 ssl; # managed by Certbot
-    ssl_certificate /etc/letsencrypt/live/rebuilder-snapshot.debian.net/fullchain.pem; # managed by Certbot
-    ssl_certificate_key /etc/letsencrypt/live/rebuilder-snapshot.debian.net/privkey.pem; # managed by Certbot
-    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
-    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
 
 }
 
 
-    server {
-    if ($host = rebuilder-snapshot.debian.net) {
-        return 301 https://$host$request_uri;
-    } # managed by Certbot
-
-
-        listen          80;
-        server_name     rebuilder-snapshot.debian.net;
-    return 404; # managed by Certbot
-
-
-}}
+}


=====================================
hosts/osuosl5-amd64/var/www/html/index.html
=====================================
@@ -0,0 +1,187 @@
+<!DOCTYPE html>
+<html lang="en">
+    <head>
+        <meta charset="utf-8">
+        <title>Reproducible Debian sid/amd64 - osuosl5-amd64.debian.net</title>
+        <style>
+        body {
+            font-family: sans-serif;
+        }
+        h1 {
+            font-size: 24px;
+        }
+
+        #search-results {
+            margin: 20px 0;
+        }
+
+        pre {
+            margin: 0;
+        }
+
+        #search-results pre {
+            margin: 12px 0;
+        }
+
+        .status {
+            font-weight: bold;
+        }
+
+        .good {
+            color: green;
+        }
+
+        .bad {
+            color: red;
+        }
+
+        .unknown {
+            color: #957fff;
+        }
+
+        footer {
+            font-size: small;
+            margin: 30px 0;
+        }
+        </style>
+        <script>
+        document.addEventListener('DOMContentLoaded', function() {
+            // package search
+            function spanWith(text) {
+                let s = document.createElement('span');
+                s.textContent = text;
+                return s;
+            }
+
+            function linkTo(href, text) {
+                let a = document.createElement('a');
+                a.href = href;
+                a.textContent = text;
+                return a;
+            }
+
+            function searchPkgs(query) {
+                let div = document.getElementById('search-results');
+                let url = '/api/v0/pkgs/list?' + new URLSearchParams({
+                    name: query,
+                    distro: 'debian',
+                });
+                fetch(url)
+                    .then(response => response.json())
+                    .then(data => {
+                        // clear children
+                        div.innerHTML = '';
+
+                        data.map(pkg => {
+                            let build_id = pkg.build_id;
+                            let r = document.createElement('pre');
+
+                            r.appendChild(spanWith('['));
+                            let status = pkg['status'];
+                            let statusSpan = spanWith(status);
+                            statusSpan.className += ' status';
+                            if (status == 'GOOD') {
+                                statusSpan.className += ' good';
+                            } else if (status == 'BAD') {
+                                statusSpan.className += ' bad';
+                            } else {
+                                statusSpan.className += ' unknown';
+                            }
+                            r.appendChild(statusSpan);
+                            r.appendChild(spanWith(`] ${pkg['name']} ${pkg['version']}\t\t`));
+
+                            if (build_id) {
+                                r.appendChild(spanWith(' ['));
+                                r.appendChild(linkTo(`/api/v0/builds/${build_id}/log`, 'log'));
+                                r.appendChild(spanWith(']'));
+                            }
+
+                            if (pkg.has_attestation) {
+                                r.appendChild(spanWith(' ['));
+                                r.appendChild(linkTo(`/api/v0/builds/${build_id}/attestation`, 'attestation'));
+                                r.appendChild(spanWith(']'));
+                            }
+
+                            if (pkg.has_diffoscope) {
+                                r.appendChild(spanWith(' ['));
+                                r.appendChild(linkTo(`/api/v0/builds/${build_id}/diffoscope`, 'diffoscope'));
+                                r.appendChild(spanWith(']'));
+                            }
+
+                            div.appendChild(r);
+                        });
+                    });
+            }
+
+            if (location.hash) {
+                searchPkgs(location.hash.substr(1));
+            }
+
+            document.getElementById('search').addEventListener('submit', function(e) {
+                e.preventDefault();
+                let query = document.getElementById('search-query').value;
+                location.href = `#${query}`;
+                searchPkgs(query);
+            });
+
+            // display stats
+            function updateStats(data) {
+                let div = document.getElementById('stats');
+                // clear children
+                div.innerHTML = '';
+                // add rows
+                data.map(row => {
+                    let r = document.createElement('pre');
+                    let key = row[0] + ': ';
+                    r.textContent = key.padEnd(20) + row[1];
+                    div.appendChild(r);
+                });
+            }
+
+            function fetchStats() {
+                fetch('/api/v0/dashboard')
+                    .then(response => response.json())
+                    .then(data => {
+                        let div = document.getElementById('stats');
+                        let main = data['suites']['main'];
+
+                        let good = main['good'];
+                        let bad = main['bad'];
+                        let unknown = main['unknown'];
+
+                        updateStats([
+                            ['good', good],
+                            ['bad', bad],
+                            ['unknown', unknown],
+                            ['build progress', (100 / (good + unknown + bad) * (good + bad)).toFixed(2) + '%'],
+                            ['repro', (100 / (good + bad) * good).toFixed(2) + '%'],
+                        ]);
+                    });
+            }
+
+            setInterval(fetchStats, 60 * 1000);
+            fetchStats();
+        });
+        </script>
+    </head>
+    <body>
+        <h1>Reproducible Debian sid/amd64 - osuosl5-amd64.debian.net</h1>
+
+        <div id="stats">Loading stats...</div>
+
+        <div>
+            <h3>Search</h3>
+            <form id="search">
+                <input type="text" id="search-query" placeholder="2ping">
+                <input type="submit" value="Search">
+            </form>
+        </div>
+        <div id="search-results">
+        </div>
+
+        <footer>
+            pew pew, <a href="https://github.com/kpcyrd/rebuilderd">rebuilderd</a>!
+            rebuilder-backend used is <a href="https://tracker.debian.org/pkg/devscripts">debrebuild</a> ♥️
+        </footer>
+    </body>
+</html>



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/254f86399f6ae145e2563bfe59e9747af7e90599...6a383397bd945f569d3189c109dc19515ebb43f1

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/254f86399f6ae145e2563bfe59e9747af7e90599...6a383397bd945f569d3189c109dc19515ebb43f1
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20241031/cc6fb89e/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list