-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
30 lines (27 loc) · 737 Bytes
/
Copy pathindex.html
File metadata and controls
30 lines (27 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html>
<html>
<head>
<title>CI/CD Trigger</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>Trigger Jenkins Build</h1>
<button onclick="triggerBuild()">Trigger Build</button>
<p id="response"></p>
<script>
async function triggerBuild() {
const responseElem = document.getElementById('response');
try {
const response = await fetch('/trigger-build', {
method: 'POST'
});
const data = await response.json();
responseElem.textContent = data.message;
} catch (error) {
responseElem.textContent = 'Error triggering build';
}
}
</script>
<script src="script.js"></script>
</body>
</html>