이 콘텐츠는 선택한 언어로 제공되지 않습니다.

13.7.3. Building Applications with Jenkins


Building applications with Jenkins uses dedicated application space, which can be larger than the application runtime space. The Jenkins online build system monitors applications that have an embedded Jenkins Client, and automatically rebuilds and deploys those applications whenever changes to the Git repository are pushed to the remote server without any further interaction. The existing application is not affected until a new, successful build has been created. If the build fails, the existing application continues to run. However, note that a failure in the deployment process (deploy - start - post_deploy) could leave the application partially deployed or inaccessible.
The actual build and deployment process that Jenkins executes involves the following steps:
  1. The git push command is executed, and Jenkins is notified that a new push is ready.
  2. A dedicated Jenkins slave (a builder) is created. The rhc apps command shows slave information. The application name is the same as that of the originating application, but with a .bldr suffix.

    Important

    The first 28 characters of the application name must be unique to avoid build issues that are caused when builders are shared across applications.
  3. Jenkins runs the build.
  4. Content from the originating application is downloaded to the builder application using git (for source code) and rsync (for existing libraries).
  5. ci_build.sh is called from the Jenkins shell. This sets up the builder application for the Jenkins environment and performs some built-in bundling steps (PHP pear processing, Python virtual environment, etc).
  6. .openshift/action_hooks/build is executed on the Jenkins builder.
  7. Any additional desired steps are executed from the Jenkins shell (Maven build, Gem install, test cases, etc).
  8. Jenkins stops the currently running application, and runs rsync to synchronize all new content over to the originating application.
  9. .openshift/action_hooks/deploy is executed on the originating application.
  10. Jenkins starts the originating application, and .openshift/action_hooks/post_deploy is executed on this application.
  11. Jenkins archives all build artifacts for later reference.
  12. After 15 minutes of idle time, the "build app" will be destroyed and will no longer appear in the output of the rhc apps command. The build artifacts, however, will still exist in Jenkins and can be viewed there.
The build job can be monitored using the Jenkins interface. The interface provides an extensive range of information about the current build, build history, artifacts, as well as plug-ins to graph, track, run tests, and perform other operations.
Log all errors related to Jenkins, such as DNS timeout and builder configuration, with the following command, specifying the name of the Jenkins application if it was changed:
$ rhc tail jenkinsrhc tail jenkins
Copy to Clipboard Toggle word wrap
Error logs for applications, such as compilation or test failures, are available from the Jenkins web interface under the corresponding build history. Deployment related errors are logged in the application's log files, and can be viewed with the following command:
$ rhc tail App_Namerhc tail App_Name
Copy to Clipboard Toggle word wrap

13.7.3.1. Building Custom Applications

Build custom applications, or applications that have no upstream repositories, directly from the Jenkins web interface instead of using the git push command.
Click on the icon of the application from the Jenkins web interface, located on the right side, to build it.
View the status of the build process in the web interface under the Build Executor Status section.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat