खोज…


परिचय

अब आप निरंतरता और निरंतर वितरण ( CI / CD ) प्रक्रिया को iOS 10 में अपनी परियोजनाओं के लिए जेनकिंस 2.0 के साथ कोड के रूप में परिभाषित कर सकते हैं। गतिविधियों का निर्माण, परीक्षण, कोड कवरेज, जांच शैली, रिपोर्ट, और सूचनाओं को केवल एक में वर्णित किया जा सकता है। फ़ाइल।

पूरा लेख पढ़ने के लिए iOS 10 और कोडकोड 8 के कोड के रूप में जेनकिंस 2.0 में पाइपलाइन पर जाएं

पैरामीटर

पैरामीटर विवरण
नोड ('आईओएस नोड') मैक ओएस के साथ जेनकिंस नोड। यदि जेनकिन्स मैक ओएस के node {....} में स्थापित है

टिप्पणियों

लेख दोनों भाषाओं में लिखा गया है: अंग्रेजी और स्पेनिश।

टाइम टेबल उदाहरण

स्रोत कोड का परीक्षण करने के लिए इसे GitHub से क्लोन या डाउनलोड किया जा सकता है।

node('iOS Node') {

    stage('Checkout/Build/Test') {

        // Checkout files.
        checkout([
            $class: 'GitSCM',
            branches: [[name: 'master']],
            doGenerateSubmoduleConfigurations: false,
            extensions: [], submoduleCfg: [],
            userRemoteConfigs: [[
                name: 'github',
                url: 'https://github.com/mmorejon/time-table.git'
            ]]
        ])

        // Build and Test
        sh 'xcodebuild -scheme "TimeTable" -configuration "Debug" build test -destination "platform=iOS Simulator,name=iPhone 6,OS=10.1" -enableCodeCoverage YES | /usr/local/bin/xcpretty -r junit'

        // Publish test restults.
        step([$class: 'JUnitResultArchiver', allowEmptyResults: true, testResults: 'build/reports/junit.xml'])
    }

    stage('Analytics') {
        
        parallel Coverage: {
            // Generate Code Coverage report
            sh '/usr/local/bin/slather coverage --jenkins --html --scheme TimeTable TimeTable.xcodeproj/'
    
            // Publish coverage results
            publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'html', reportFiles: 'index.html', reportName: 'Coverage Report'])
        
            
        }, Checkstyle: {

            // Generate Checkstyle report
            sh '/usr/local/bin/swiftlint lint --reporter checkstyle > checkstyle.xml || true'
    
            // Publish checkstyle result
            step([$class: 'CheckStylePublisher', canComputeNew: false, defaultEncoding: '', healthy: '', pattern: 'checkstyle.xml', unHealthy: ''])
        }, failFast: true|false   
    }

    stage ('Notify') {
        // Send slack notification
        slackSend channel: '#my-team', message: 'Time Table - Successfully', teamDomain: 'my-team', token: 'my-token'
    }
}


Modified text is an extract of the original Stack Overflow Documentation
के तहत लाइसेंस प्राप्त है CC BY-SA 3.0
से संबद्ध नहीं है Stack Overflow