Only deploy artifacts from successful builds

When retrieving an artifact from Jenkins using `/lastBuild/`, it can happen that at the same moment Jenkins is doing the build for that job so the retrieval will break. Using `/lastSuccessfulBuild/` guarantees that only successfully finished builds are retrieved.