Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 16, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 16, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 16, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 16, 2025

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025

      Minecraft licensing robbed us of this controversial NFL schedule release video

      May 16, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      The power of generators

      May 16, 2025
      Recent

      The power of generators

      May 16, 2025

      Simplify Factory Associations with Laravel’s UseFactory Attribute

      May 16, 2025

      This Week in Laravel: React Native, PhpStorm Junie, and more

      May 16, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025
      Recent

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Where to edit Script1.groovy as seen in the error?

    Where to edit Script1.groovy as seen in the error?

    May 10, 2024

    I am very new to Jenkins – I am trying to run a multibranch pipeline script on Jenkins version 2.375.1. The builds are triggered with commits and PR’s filed on Github. On committing a new file or initiating a PR, Jenkins auto triggers a build but consistently stops as it hits this issue.

    org.jenkinsci.plugins.workflow.cps.CpsCompilationErrorsException: startup failed:
    Script1.groovy: 1: unexpected char: ” @ line 1, column 2.
    {rtf1ansiansicpg1252cocoartf2513

    I have added a Jenkinsfile.Jenkinsfile and Example.groovy script in my repo with this code ->

    Jenkinsfile.Jenkinsfile (note the .Jenkinsfile extension is hidden in the repo)

    node {
    // Git checkout before load source the file
    checkout scm

    // To know files are checked out or not
    sh ”’
    ls -lhrt
    ”’

    def rootDir = pwd()
    println(“Current Directory: ” + rootDir)

    // point to exact source file
    def example = load “${rootDir}/Example.Groovy”

    example.exampleMethod()
    example.otherExampleMethod()

    }

    Example.groovy (Note the .groovy extension is hidden in repo)

    import hudson.slaves.EnvironmentVariablesNodeProperty
    import hudson.EnvVars
    import jenkins.model.*
    jenkins = Jenkins.instance

    EnvironmentVariablesNodeProperty prop = jenkins.getGlobalNodeProperties().get(EnvironmentVariablesNodeProperty.class)
    EnvVars env = prop.getEnvVars()

    def MY_VAR = env[‘MY_JENKINS_VAR’]
    def exampleMethod() {
    println(“exampleMethod”)
    }

    def otherExampleMethod() {
    println(“otherExampleMethod”)
    }
    return this

    Source: Read More

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleWhat is ETL Testing Tutorial Guide
    Next Article How to assign an IP to a seleniumGrid

    Related Posts

    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 17, 2025
    Common Vulnerabilities and Exposures (CVEs)

    CVE-2025-40906 – MongoDB BSON Serialization BSON::XS Multiple Vulnerabilities

    May 17, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Over 300K Prometheus Instances Exposed: Credentials and API Keys Leaking Online

    Development

    Environmental, Social and Governance (ESG) and Climate Risk Investing – You must be kidding me?!

    Development

    Salesforce AI Research Introduces New Benchmarks, Guardrails, and Model Architectures to Advance Trustworthy and Capable AI Agents

    Machine Learning

    Script debugging on AJAX base web application. Can I bypass my dependent module test script execution in Eclipse?

    Development
    Hostinger

    Highlights

    Basic keyboard shortcut support for focused links

    August 23, 2024

    Eric gifting us with his research on all the various things that anchors (not links)…

    NVIDIA to manufacture AI supercomputers in the U.S. for the first time

    April 14, 2025

    Secure RAG applications using prompt engineering on Amazon Bedrock

    August 29, 2024

    Advancing Precision Psychiatry: Leveraging AI and Machine Learning for Personalized Diagnosis, Treatment, and Prognosis

    July 29, 2024
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.