Build Job
The pipeline build job downloads dependencies, and, for compiled languages, compiles the code.
The commands this job runs are dependent on the tech stack. Configuration is codified in the pipeline-templates repository .
NOTE
The build job is not to be confused with the build image job. The build image job builds a Docker image.
Build Job Dependency Cache
After the build job downloads dependencies, they are persisted in the cache to reduce the need to re-download them for future pipelines, as well as as artifacts for use in subsequent jobs in the pipeline (e.g., to scan during the dependency check job or to load in the container as part of the build image job).
WARNING
Re-downloading dependencies in the build image job is not allowed.
Below, see where dependencies are cached by technology.
| Tech | Artifacts Path | Project Cache |
|---|---|---|
| dotnet | dist | |
| golang | bin | .gomodcache |
| gradle | build | .gradle |
| maven | target | .m2 |
| npm | node_modules | .npm |
| php | vendor | .composer |
| python | .cache | .pip_cache |
| yarn | node_modules | .yarn |
Troubleshooting
Gradle
General error during conversion: Unsupported class file major version 61
java.lang.IllegalArgumentException: Unsupported class file major versionThe Java version used to run the project is unsupported by the Java version currently running. The Gradle runtime needs to be updated. Run "gradle wrapper" in the source code repo and commit the gradlew updates.
$ export GRADLE_USER_HOME=`pwd`/.gradle
$ ./gradlew -version
/scripts-2761-1444659/step_script: line 214: ./gradlew: Permission denied
ERROR: Job failed: command terminated with exit code 1The gradlew executable may not have execute permissions. Check permissions with ls -la gradlew and have product team update if necessary: https://ionic.zendesk.com/hc/en-us/articles/360000160067-Adding-execute-permissions-using-git
FAQs
My project installs dependencies in a different location than listed above. Can the pipeline be updated to support this?
Yes, however it is recommended to adjust the project to match the standard paths. Customizations diverge from the templates and will require more maintenance to keep updated. If the customization is still desired, open a MDO Help Desk ticket .