Skip to content

Latest commit

 

History

History
76 lines (68 loc) · 1.89 KB

web_inflight.md

File metadata and controls

76 lines (68 loc) · 1.89 KB

Configuration examples for webapps

Environment

  • Languages: javascript, html, css, json
  • Scope: recipes and their dependencies
  • Active development
  • Fast reaction time required
  • Severe issues should abort the build, esp. new ones

Recommended settings

local.conf

INHERIT += "sca"
SCA_ENABLE = "1"
SCA_AUTO_INH_ON_IMAGE = "0"
SCA_AUTO_INH_ON_RECIPE = "1"
SCA_WARNING_LEVEL = "error"
SCA_ENABLE_IMAGE_SUMMARY = "0"
SCA_ENABLE_BESTOF = "0"
SCA_VERBOSE_OUTPUT = "0"
SCA_SCOPE_FILTER = "security functional style"
SCA_ENABLED_MODULES_RECIPE = "\
                            eslint \
                            flake8 \
                            htmlhint \
                            jsonlint \
                            npmaudit \
                            standard \
                            stylelint \
                            "

Jenkins pipeline

def deployDir = "$WORKSPACE/tmp/deploy/images/**";
def pokyDir = "$WORKSPACE/meta-poky/poky";
def buildDir = "$WORKSPACE/meta-poky/poky/build";
def pokyTarget = "fancy-company-image"

pipeline {
    agent any
    stages {
        stage('checkout') {
            echo "!!!Checkout your code out from your repo!!!"
        }
        stage('poky setup') {
            sh """
                cd ${pokyDir}
                . ./oe-init-build-env
            """
            sd """
                cd ${buildDir}
                echo "!!!Insert your build command line here!!!"
            """
        }
        stage('build') {
            steps {
                sh """
                cd ${pokyDir}
                . ./oe-init-build-env
                bitbake ${pokyTarget}
                """
            }
        }
    }
    post {
       always {
            recordIssues qualityGates: [[threshold: 1, type: 'NEW_ERROR', unstable: false]], tools: [checkStyle(pattern: '$deployDir/sca/*/checkstyle/*.xml')]
       }
    }
}