Import from Jenkins
Walis reads Jenkins' own files. Paste a Jenkinsfile — declarative or scripted — or a job's config.xml, and Walis converts it into a job draft you can read before anything is saved.
The import is a preview, not a migration
POST /api/jobs/import/jenkins converts and returns. It writes nothing to the database. The draft is handed to the job editor, and the job exists only once you press Create job — at which point it is an ordinary Walis job with no trace of where it came from.
That distinction matters, because the conversion is lossy in places and the warning list is how it tells you where.
The screen-by-screen walkthrough is in the manual under Import from Jenkins. In short:
- Jobs → Import from Jenkins.
- Paste the file, or pick it from disk. Give it a name now or in the editor.
- Preview — the converted steps, parameters, trigger and timeout, plus the warnings.
- Open in editor — fix what the warnings flagged, then save.
Saving also creates the job-scoped environment variables the import proposed. Secrets are never invented: a credentials('deploy-key') becomes a variable with an empty value and the Jenkins credential ID recorded as its source, so you know what to paste in. The editor tells you which ones are still blank.
Warnings
| Severity | Meaning |
|---|---|
| Note | Mapped, but the semantics differ slightly. Read it once and move on. |
| Review | Mapped, but it needs something from you — a secret value, a runner that exists, a repository URL. |
| Unsupported | Walis has no equivalent. The original is kept in the script as a comment rather than silently dropped. |
Nothing is discarded quietly. If the converter cannot understand a block, GroovyParser keeps it verbatim and the converter emits it as a comment — you get a job that is missing a piece, not a job that pretends the piece was never there.
What maps to what
| Jenkins | Walis |
|---|---|
stage('X') { steps { sh … } } | One Run command step named X. Nested stages are named parent / child. |
parallel { stage … }, scripted parallel a: {…}, b: {…} | Steps with no dependency on each other, so they run at the same time. |
post { always / success / failure / cleanup } | The step's run condition. unstable, aborted and regression become on failure; fixed becomes on success; changed becomes always, with a note. |
options { retry(n) } on a stage, retry(n) { … } | The step's retry count. A retry wrapping only part of a stage is inlined, with a note. |
options { timeout(…) } on the pipeline | The job timeout, converted to minutes. A stage-level timeout is only reported. |
options { disableConcurrentBuilds() }, freestyle without execute concurrent builds | Run one build at a time. |
parameters { string / text / booleanParam / choice / password } | Build parameters. credentials and file parameters are not supported. |
environment { A = 'x' } | Job-scoped environment variables, created on save. A value that references another variable becomes an export at the top of the step instead. |
environment { T = credentials('id') }, withCredentials([...]) | Secret environment variables with the value left blank. file and sshUserPrivateKey bindings get a note saying to write the file yourself. |
triggers { cron('H 2 * * *') }, @daily | A cron schedule. H is resolved to a fixed value from a hash of the job name — the same trick Jenkins uses to spread load. H/15 becomes */15. Multiple lines: only the first is kept. |
triggers { pollSCM / githubPush / gitlab } | Push trigger. You still have to set the webhook up and fill in the repository. |
triggers { upstream(...) }, freestyle build after other projects | A note pointing at the upstream job's downstream setting — Walis models this from the other end. |
build job: 'X', freestyle trigger other projects | A downstream job, matched by name. Jenkins waits for it; Walis fires and forgets. |
agent { label 'x' }, node('x'), freestyle node restriction | The runner name. If no such runner exists, change it to local. |
agent { docker { image; args } } | The Run in a container action, with the working directory mounted in. |
when { branch / environment / equals / not / anyOf / allOf } | A shell test at the top of the step that exit 0s when it does not hold. expression needs a human. |
dir('p') { … } | ( cd 'p' && … ) |
withEnv(['A=1']) { … } | export inside a subshell. |
env.X = 'v' inside script | export X=… plus a write to $WALIS_ENV_FILE, so later steps see it. |
echo, sleep, error, writeFile, catchError, deleteDir / cleanWs | The equivalent shell commands. |
checkout scm, git url:, freestyle Git | A step that clones the first time and fetches afterwards. Needs the repository URL. |
archiveArtifacts, junit | Artifact paths. There is no JUnit viewer — the files are kept, not parsed. |
matrix { axes … }, matrix project axes | The build matrix. One per job. |
$BUILD_NUMBER, ${env.JOB_NAME}, $BRANCH_NAME, $WORKSPACE | $WALIS_BUILD_NUMBER, $WALIS_JOB_NAME, $WALIS_BRANCH, $PWD. ${params.X} becomes ${X}. |
Not supported
Each of these produces an Unsupported warning and stays in the script as a comment.
input— human approval mid-pipeline. Split it into two jobs and trigger the second by hand.- Groovy logic inside
script {}(def,if,for,try) and Groovy-level operations likereadFile,fileExists,httpRequest. Walis runs shell, not Groovy — see below. bat/powershell.stash/unstash— unnecessary. Steps in a Walis build share the working directory.tools {}— only a note to check the runner'sPATH.- Shared libraries,
agent dockerfile/kubernetes,lock, reporting plugins (cobertura, publishHTML…), and notification steps — use Walis' own notifications.
Why the output is plain shell
A Jenkins pipeline is a Groovy program that happens to run shell. A Walis job is shell that Walis happens to run. The converter's job is to move you from the first to the second, which is why script {} blocks come out as comments: there is no Groovy interpreter on the other side to put them in.
In exchange you get a script you can read in full, run in your own terminal, and hand to a remote runner that has never heard of an action, a stage or a plugin. See Jobs and steps for what that model buys and what it costs.
Sample files
The Walis repository carries five files under docs/jenkins-samples/ — declarative, scripted, Docker-agent, matrix and a freestyle config.xml — each seeded with a few things that deliberately do not map, so you can see what the warnings look like before pointing the importer at anything of your own. The test suite converts all five on every run.