I have had exactly the same issue today on a fresh install of jenkins on a new Windows 2012 datacenter VM.
This is the full list of steps:
- Create new Windows 2012 VM and added IIS feature
- Install Java SE 8u131 RE
- Install latest dotnet core SDK
- Install NodeJS
- Install Angular CLI globally: npm install -g @angular/cli
- installed some other tools:
- Kiln client
- VS Code
- Sublime Text
- Install Jenkins 2.46.3 from the windows installer
- Installed all the default plugins on initial launch
- Installed latest versions of
- HTML Publisher
- Pipeline NPM Integration
- Slack notification
- Added SCM credentials and Slack token credentials
I then created a declarative pipeline job that made use of the SCM and Slack credentials. When it failed, I ran RJE's pipeline script posted above and it failed as well.
echo 'Hallo Welt'
echo 'Ich bin immer da'
Rolling back the plugins fixed it
Pipeline: API 2.16 -> 2.15
Pipeline: Basic Steps 2.5 -> 2.4
Pipeline: Groovy 2.33 -> 2.32