jenkins-x/jx

Jenkinsfile Pipeline issue : WorkflowScript: 1: unexpected char: 0x0 @ line 1

Closed this issue · 1 comments

jb68 commented

I am trying to setup an Jenkins dev env using docker. I also used git docker server and created the simplest Jenkinsfile possible.
Jenkins Version: 2.479

pipeline {
    agent any
    stages {
        stage('Hello') {
            steps {
                echo 'Hello World'
            }
        }
    }
}

When I paste the code on Jenkins box works ok, however when I connect to git I getting this error:

Started by user [JB](http://localhost:8080/user/jb)
Obtained Jenkinsfile from git ssh://git@host.docker.internal:2222/git-server/repos/devops.git
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 1: unexpected char: 0x0 @ line 1, column 4.
   ��pipeline {

I connected to container and I can't see any strange code. Any Idea.
Job fails fails if I uncheck light checkout

Wrong project, this is not Jenkins