Jenkins:git fetch获取了JenkinsFile,但Jenkins找不到它

时间:2016-09-09 12:23:29

标签: git jenkins jenkins-pipeline

我在Jenkins中使用存储在bitbucket git repo中的JenkinsFile进行管道设置。当我构建它时失败并出现以下错误。当我检查文件系统时,我看到文件在那里。如果我更改文件并推送到远程仓库并再次构建,我会在文件系统上看到文件更新。然而,我得到了同样的失败。有没有人遇到过类似的东西?

Jenkins ver。 2.10

Java ver。 1.8.0_91-B14

<?php
include 'https://yourdomain.nl/assets/Email_Service.php';   //ONLINE
//require base_url() . 'assets/Email_Service.php';                      //LOKAAL

//Haal gemeeente uit de adres balk
$url = "https://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$url_onderdeel = explode('/', $url);
$gemeente = $url_onderdeel[4];
$gemeenteHoofdletter = ucfirst($gemeente);

//Email parameters
$email_van; $email_naar; $email_onderwerp = "Vraag van ". $gemeenteHoofdletter;
$voornaam; $achternaam; 
$telefoon; $bericht;
$emailInfo; $klantInfo;

//Controleert de ingevulde velden
if (isset($_POST['f_email_van'])    ||
    isset($_POST['f_voornaam'])     ||
    isset($_POST['f_achternaam'])   ||
    isset($_POST['f_telefoon'])     ||
    isset($_POST['f_bericht']))     {
        //Email info
        $email_van = $_POST['f_email_van'];
        $email_naar = "socialekaartpro@gmail.com";

        /*Stuur Email
        Dé Parameters:(emailInfo, klantInfo)*/
        $emailInfo = array (
                    'email_van' => $email_van, 
                    'email_naar' => $email_naar,
                    'email_onderwerp' => $email_onderwerp);
        $klantInfo = array (
                    'voornaam' => $_POST['f_voornaam'],
                    'achternaam' => $_POST['f_achternaam'],
                    'telefoon' => $_POST['f_telefoon'],
                    'bericht' => $_POST['f_bericht'],
                    'locatie' => $gemeenteHoofdletter);

        //Voeg de mail script toe zodat we de functie stuurEmail kunnen aanroepen
        $mail = new EmailService('zorgvraag');
        $mail -> versturen($emailInfo, $klantInfo);
}
?>

<!--=== Type Woning ===-->
<div class="page-topbar">
    <div class="container">
        <div class="row">
            <div class="col-sm-4">
                <h3>Bedrijfsnaam</h3>
            </div>
            <div class="col-sm-8 hidden-xs">
                <ol class="breadcrumb">
                    <li><a href="<?php echo base_url(); ?>nijmegen">Gemeente Nijmegen</a></li>
                    <li><a href="<?php echo base_url(); ?>nijmegen/woningverhuur">Woningverhuur</a></li>
                    <li class="active">Bedrijfsnaam</li>
                </ol>
            </div>
        </div>
    </div> 
</div>

<div class="content container" style="padding-top: 10px;">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading left" style="margin-bottom: -1px;background-color: rgba(255, 255, 255, 0);"><a href="<?php echo base_url(); ?>nijmegen/woningverhuur" style="font-size: 13px; text-decoration: none;"><i class="glyphicon glyphicon-menu-left"></i> Terug naar overzicht</a>
                    <ul class="pull-right">
                        <a href="" onclick="javascript:window.print();" style="font-size: 13px;text-decoration: none;"><i class="fa fa-print" aria-hidden="true"></i>Print</a>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>

<!--================================== Overzicht ========================-->
<div class="job-description">
<div class="container content">
<div class="row">
<div class="col-md-8">
<div class="left-inner" style="margin-left: 0px;">
    <h3 style="margin-top: 28px;margin-bottom: 12px;">Test pagina</h3>
    <p>
    LEEG LEEG
    </p>

    <h3 style="margin-top: 40px;margin-bottom: 12px;">LEEG LEEG</h3>
    <p>
    LEEG LEEG
    </p>

    <h3 style="margin-top: 40px;margin-bottom: 12px;">LEEG LEEG</h3>
    <p>
    LEEG LEEG
    </p>


    <h3 style="margin-top: 40px;margin-bottom: 12px;">LEEG LEEG</h3>
    <p>
    LEEG LEEG
    </p>


    <br>
    <br>
        <a href="#" target="_blank" class="btn btn-primary" style="margin-left: 0px;margin-bottom: 20px;"> Naar de website LEEG LEEG</a>                        
    <br>
</div>  
</div>                  

<div class="col-sm-4">
<div class="panel panel-default" style="margin-top: 9px;">
    <div class="panel-heading" style="border-bottom-color: rgba(217, 217, 217, 0);margin-top: 2px;">Doelgroep</div>
    <div class="panel-body">
        <div class="row">
            <p style="margin-top: -22px;margin-left: 16px;padding-right: 7px;">
            LEEG | LEEG
            </p>
        </div>  
    </div>
    <div class="panel-heading" style="border-bottom-color: rgba(217, 217, 217, 0);margin-top: -14px;">Leeftijdscatogarie</div>
    <div class="panel-body">
        <div class="row">
            <p style="margin-top: -22px;margin-left: 16px;margin-bottom: 2px;">
            LEEG | LEEG
            </p>
        </div>  
    </div>                          
</div>          

<div class="panel panel-default" style="margin-top: 9px;">
    <div class="panel-heading" style="border-bottom-color: rgba(217, 217, 217, 0);margin-bottom: -15px;">Contact gegevens</div>
    <div class="panel-body">
        <div class="row">
            <div class="col-xs-4 col-md-4">
                <p style="font-weight: 600;color: #000000;margin-bottom: 0px;">Naam</p>
                <p style="font-weight: 600;color: #000000;margin-bottom: 0px;">Adres</p>
                <p style="font-weight: 600;color: #000000;margin-bottom: 0px;">Postcode</p>
                <p style="font-weight: 600;color: #000000;margin-bottom: 0px;">Plaats</p>
                <p style="font-weight: 600;color: #000000;margin-bottom: 0px;">Telefoon</p>
            </div>

            <div class="col-xs-6 col-md-6" style="width: 65%;">
                <p style="margin-bottom: 0px;">LEEG</p>
                <p style="margin-bottom: 0px;">LEEG</p>
                <p style="margin-bottom: 0px;">LEEG</p>
                <p style="margin-bottom: 0px;">LEEG</p>
                <p style="margin-bottom: 0px;">LEEG</p>
            </div>
        </div>  

        <hr style="margin-top: 20px;margin-bottom: 10px;">  

        <div class="row">
            <div class="col-md-12">
                <div class="panel-heading" style="margin-left: -15px;margin-top: -12px;margin-bottom: -15px;">
                <h4 class="panel-title">
                    <span style="font-size: 13px;font-weight: 600;">Heeft u een zorgvraag, </span>
                    <a href="#mail-1" data-parent="#accordion-v1" data-toggle="collapse" class="accordion-toggle">
                        <span style="color: #3299bb;font-weight: 600;text-decoration: underline;"> klik dan hier</span>
                    </a>
                </h4>
            </div>

<!--Bevestiging script JSalert
<div>
    <script src="https://socialekaartgemeente.nl/assets/js/sweetalert-dev.js"></script>
    <script src="https://code.jquery.com/jquery-1.10.2.js"></script>
        <link rel="stylesheet" href="https://socialekaartgemeente.nl/assets/css/sweetalert.css">
        <script type="text/javascript">
            function JSalert(){
                //event.preventDefault();;
                swal("Congrats!", ", Uw mail is verzonden!", "success");
            }
    </script>
</div>-->

<!-- =============================[EMAIL FORM]================================== -->
<!-- onSubmit="window.location.reload()" -->
<!-- ="javascript:JSalert();" -->



            <div class="panel-collapse collapse" id="mail-1">
                <div class="panel-body" style="margin-left: -15px;">
                    <form action=""  method="post" id="form_mail" >
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <input id="voornaam" type="text" name="f_voornaam" class="form-control" placeholder="Voornaam*" required="required" data-error="Firstname is required.">
                                    <div class="help-block with-errors"></div>
                                </div>
                            </div>
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <input id="achternaam" type="text" name="f_achternaam" class="form-control" placeholder="Achternaam*" required="required" data-error="Firstname is required.">
                                    <div class="help-block with-errors"></div>
                                </div>
                            </div>
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <input id="telefoon" type="text" name="f_telefoon" class="form-control" placeholder="Telefoonnummer*" required="required" data-error="Firstname is required.">
                                    <div class="help-block with-errors"></div>
                                </div>
                            </div>
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <input id="email" type="text" name="f_email_van" class="form-control" placeholder="Email*" required="required" data-error="Firstname is required.">
                                    <div class="help-block with-errors"></div>
                                </div>  
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="sr-only" for="message">Bericht</label>
                            <textarea class="input-lg form-control" name="f_bericht" rows="5" id="bericht" placeholder="Uw zorgvraag"></textarea>
                            <span class="help-block"></span>
                        </div>
                        <!--Verzend knop-->
                        <button type="submit" class="btn btn-sm btn-primary" style="margin-bottom: -15px;">Bericht verzenden</button>
                    </form>
                </div>
            </div>
            </div>
        </div>  
    </div>
</div>

<div class="panel panel-default" style="margin-top: 9px;">
    <div class="panel-body">
        <div class="row">
            <div class="col-md-12">
                <ul class="social-icons pull-left" style="margin-left: -2px;margin-top: 4px;margin-bottom: -8px;">
                    <li style="margin-left: 0px;"><a href="#" target="_blank" data-original-title="Facebook" class="rounded-x social_facebook"></a></li>
                    <li><a href="#" target="_blank" data-original-title="Twitter" class="rounded-x social_twitter"></a></li>
                    <li><a href="#" target="_blank" data-original-title="Linkedin" class="rounded-x social_linkedin"></a></li>
                    <li><a href="#" target="_blank" data-original-title="Goole Plus" class="rounded-x social_googleplus"></a></li>
                    <li><a href="#" target="_blank" data-original-title="Youtube" class="rounded-x social_youtube"></a></li>
                </ul>
            </div>
        </div>  
    </div>
</div>

<!-- Google Maps -->
<div class="panel panel-default" style="margin-top: 9px;">
    <div class="panel-body">
        <!-- Laad Google Maps -->
        <style>#map-container { height: 200px }</style>
        <div id="map-container" class="col-md-12"></div>
        <script src="//maps.google.com/maps/api/js?sensor=false"></script>
        <script>    
            function init_map() {
                //Definieer de coordinaten en zet zoom level
                var var_location = new google.maps.LatLng(00000000, 00000000);
                var var_mapoptions = {
                    center: var_location,
                    zoom: 14
                };

                //Plaats de marker bij de coordinaten 
                var var_marker = new google.maps.Marker({
                    position: var_location,
                    map: var_map,
                    title:"Venice"});

                //^Teken the map met de instellingen hierboven^
                var var_map = new google.maps.Map(document.getElementById("map-container"),
                    var_mapoptions);
                    var_marker.setMap(var_map); 
                }
                google.maps.event.addDomListener(window, 'load', init_map);
        </script>
    </div>
</div>
</div>
</div>
</div>
</div>

1 个答案:

答案 0 :(得分:0)

注意到Jenkinsfile找不到f的最后一行。

根据我的经验,可能是在配置中将JenkinsFile拼写为Jenkinsfile的问题,并将JenkinsFile放在项目中。

您可以转到项目的配置并将其更正为“JenkinsFile”或任何与项目中的JenkinsFile名称相匹配的内容。