This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.8.5.4. 파이프라인 전략 옵션
다음 옵션은 Pipeline 빌드 전략에 따라 다릅니다.
8.5.4.1. Jenkinsfile 제공
Jenkinsfile을 두 가지 방법 중 하나로 제공할 수 있습니다.
- 빌드 구성에 Jenkinsfile을 포함합니다.
- 빌드 구성에 Jenkinsfile이 포함된 Git 리포지토리에 대한 참조를 포함합니다.
포함된 정의
kind: "BuildConfig" apiVersion: "v1" metadata: name: "sample-pipeline" spec: strategy: jenkinsPipelineStrategy: jenkinsfile: |- node('agent') { stage 'build' openshiftBuild(buildConfig: 'ruby-sample-build', showBuildLogs: 'true') stage 'deploy' openshiftDeploy(deploymentConfig: 'frontend') }
kind: "BuildConfig"
apiVersion: "v1"
metadata:
name: "sample-pipeline"
spec:
strategy:
jenkinsPipelineStrategy:
jenkinsfile: |-
node('agent') {
stage 'build'
openshiftBuild(buildConfig: 'ruby-sample-build', showBuildLogs: 'true')
stage 'deploy'
openshiftDeploy(deploymentConfig: 'frontend')
}
Git 리포지토리에 대한 참조
kind: "BuildConfig" apiVersion: "v1" metadata: name: "sample-pipeline" spec: source: git: uri: "https://github.com/openshift/ruby-hello-world" strategy: jenkinsPipelineStrategy: jenkinsfilePath: some/repo/dir/filename
kind: "BuildConfig"
apiVersion: "v1"
metadata:
name: "sample-pipeline"
spec:
source:
git:
uri: "https://github.com/openshift/ruby-hello-world"
strategy:
jenkinsPipelineStrategy:
jenkinsfilePath: some/repo/dir/filename
- 1
- 선택적
jenkinsfilePath
필드는 소스contextDir
에 상대적으로 사용할 파일의 이름을 지정합니다.contextDir
이 생략된 경우 기본값은 리포지토리의 루트입니다.jenkinsfilePath
가 생략된 경우 기본값은 Jenkinsfile 입니다.