feat: simplify Jenkinsfile.
-@Library('github.com/syndesisio/syndesis-pipeline-library@master')
-def params = [:]
-
node {
-
def branch = "${env.BRANCH_NAME}"
echo "Using branch: ${branch}."
- slave {
+ stage ('Load pipeline library') {
+ sh 'rm -rf ${WORKSPACE}/.ci || true'
+ sh 'git clone https://github.com/syndesisio/syndesis-ci.git ${WORKSPACE}/.ci'
+ library identifier: "local-pipeline-library@${env.BRANCH_NAME}", retriever: workspaceRetriever("${WORKSPACE}/.ci/pipeline-library")
+ }
+
+ uberPod(image: 'syndesis/jenkins-slave-full-centos7:1.0.8', serviceAccount: 'jenkins', mavenSettingsXmlSecret: 'm2-settings') {
withArbitraryUser {
withSshKeys {
- withOpenshift {
- withMaven(serviceAccount: 'jenkins', mavenSettingsXmlSecret: 'm2-settings') {
- withYarn {
inside {
checkout scm
- stage ('update submodules') {
- sh 'git submodule update --init --recursive'
- }
- stage ('build connectors') {
- container('maven') {
- sh """
- cd connectors
- mvn -B -U clean install
- """
- }
- }
- stage ('build verifier') {
- container('maven') {
- sh """
- cd verifier
- mvn -B -U clean install
- """
- }
- }
- stage ('build integration runtime') {
- container('maven') {
- sh """
- cd runtime
- mvn -B -U clean install
- """
- }
- }
- stage ('build rest') {
- container('maven') {
- sh """
- cd rest
- mvn -B -U clean install fabric8:build -Pci
- """
- }
- }
- stage ('build ui') {
- container('yarn') {
- sh """
- cd ui
- yarn
- yarn ng build -- --aot --prod --progress=false
- """
- }
- container ('openshift') {
- sh """
- cd ui
- BC_DETAILS=`oc get bc | grep syndesis-ui || echo ""`
- if [ -z "\$BC_DETAILS" ]; then
- cat docker/Dockerfile | oc new-build --dockerfile=- --to=syndesis/syndesis-ui:latest --strategy=docker
- fi
- tar -cvf archive.tar dist docker
- oc start-build -F --from-archive=archive.tar syndesis-ui
- rm archive.tar
- """
- }
- }
-
+ sh "./build.sh --with-image-streams"
stage('System Tests') {
test(component: 'syndesis', serviceAccount: 'jenkins')
}
-
if ("master" == branch) {
stage('Rollout') {
tag(sourceProject: 'syndesis-ci', imageStream: 'syndesis-rest')
@@ -91,6 +33,3 @@ node {
}
}
}
- }
- }
-}
