如何使用brigade部署自定义helm图表?

时间:2018-05-13 00:51:02

标签: kubernetes-helm

我一直在阅读tutorials,但无法找到有关如何部署自定义头盔图的详细信息。我想用brigade.js替换现有的JenkineFile部署,但无法弄清楚如何。

假设我想通过传递键值来部署两个头盔图,只需更改键和值,但不需要构建已存在的docker镜像,只需在kubernetes群集中部署helm图表。如果你有任何帮助,我感激不尽?

示例:

在JenkinFile中我有以下阶段步骤,我想用Brigade

进行测试
<?php
include 'db.php';
 //   
    $firstname = $conn->real_escape_string(isset($_POST['firstname']) ? $_POST['firstname'] : '');
    $lastname = $conn->real_escape_string(isset($_POST['lastname']) ? $_POST['lastname'] : '');
    $dob = $conn->real_escape_string(isset($_POST['dob']) ? $_POST['dob'] : '');
    $moniker = $conn->real_escape_string(isset($_POST['moniker']) ? $_POST['moniker'] : '');




if (isset($_POST['submitBTN'])) {

    $image = $_FILES['image'];
    $imageName = $image['image']['name'];
    $imageType = $image['image']['type'];
    $imageTempName = $image['image']['tmp_name'];
    $imageError = $image['image']['error'];
    $imageSize = $image['image']['size'];
    //get extention
    $fileExt = explode('.', $imageName);
    $fileActualExt = strtolower(end($fileExt));
    $allowed = array("jpg", "jpeg", "png", "pdf", "gif", "GIF");

          $fileNameNew = uniqid('', true).".".$fileActualExt;
          //Here we define where we want the new file uploaded to
          $fileDestination = 'mugshots/'.$fileNameNew;
          //And finally we upload the file using the following function, to send it from its temporary location to the uploads folder
          move_uploaded_file($imageTempName, $fileDestination);



    $query = "INSERT INTO suspects (firstName,lastName,dob,moniker,picture)VALUES(
                                '$firstname',
                                '$lastname',
                                '$dob',
                                '$moniker',
                                '$fileDestination')";

    if ($conn->query($query) === true)  {
        echo "New record created successfully";
    }
    $conn->close();
}

if (isset($_POST['searchBTN'])) {
        $query = "SELECT * FROM suspects WHERE firstName = '$firstname' OR lastName = '$lastname' OR dob = '$dob' OR tats = '$tattoo' OR moniker = '$moniker' ";
        $result = $conn->query($query);
        if ($result->num_rows > 0)  {
            echo "<table><tr><th>ID</th><th>Name</th><th>AGE</th><th>Tattoo</th><th>Moniker</th></tr>";
            // output data of each row
            while ($row = $result->fetch_assoc())  {
                echo "<tr><td>" . $row["id"] . "</td><td>" . $row["firstName"] . " " . $row["lastName"] . "</td><td>" . $row["age"] . "</td><td>" . $row["tats"] . "</td><td>" . $row["moniker"] . "</td></tr>";
            }
            echo "</table>";
        }
        else {
            echo "0 results";
        }

    }
?>

0 个答案:

没有答案