@Library('jenkins-shared-library') _
import groovy.json.JsonOutput // 添加这一行以导入 JsonOutput

pipeline {
    agent any

    stages {
        stage('Build') {
            steps {
                script {
                    def yamlFile = readFile('project.yaml')
                    def xxx = log.wenj(yamlFile)

                    def xx = xxx.base.module
                    def jsonOutput = JsonOutput.prettyPrint(JsonOutput.toJson(modules))
                    echo "Modules JSON: ${jsonOutput}"
                }
            }
        }
    }
}