Function( Function { head: Destructured( FunctionHeadDestructured { ellipsis: true, identifier: None, arguments: [ FunctionHeadDestructuredArgument { identifier: "config", default: None, }, FunctionHeadDestructuredArgument { identifier: "lib", default: None, }, FunctionHeadDestructuredArgument { identifier: "pkgs", default: None, }, ], }, ), body: With( With { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 3, column: 6, }, end: Position { line: 3, column: 9, }, }, }, ), target: LetIn( LetIn { bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "jenkinsCfg", span: Span { start: Position { line: 6, column: 3, }, end: Position { line: 6, column: 13, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "config", span: Span { start: Position { line: 6, column: 16, }, end: Position { line: 6, column: 22, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "services", span: Span { start: Position { line: 6, column: 23, }, end: Position { line: 6, column: 31, }, }, }, ), Raw( PartRaw { content: "jenkins", span: Span { start: Position { line: 6, column: 32, }, end: Position { line: 6, column: 39, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "cfg", span: Span { start: Position { line: 7, column: 3, }, end: Position { line: 7, column: 6, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "config", span: Span { start: Position { line: 7, column: 9, }, end: Position { line: 7, column: 15, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "services", span: Span { start: Position { line: 7, column: 16, }, end: Position { line: 7, column: 24, }, }, }, ), Raw( PartRaw { content: "jenkins", span: Span { start: Position { line: 7, column: 25, }, end: Position { line: 7, column: 32, }, }, }, ), Raw( PartRaw { content: "jobBuilder", span: Span { start: Position { line: 7, column: 33, }, end: Position { line: 7, column: 43, }, }, }, ), ], default: None, }, ), }, ), ], target: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "options", span: Span { start: Position { line: 10, column: 3, }, end: Position { line: 10, column: 10, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "services", span: Span { start: Position { line: 11, column: 5, }, end: Position { line: 11, column: 13, }, }, }, ), Raw( PartRaw { content: "jenkins", span: Span { start: Position { line: 11, column: 14, }, end: Position { line: 11, column: 21, }, }, }, ), Raw( PartRaw { content: "jobBuilder", span: Span { start: Position { line: 11, column: 22, }, end: Position { line: 11, column: 32, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "enable", span: Span { start: Position { line: 12, column: 7, }, end: Position { line: 12, column: 13, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 12, column: 16, }, end: Position { line: 12, column: 24, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 13, column: 9, }, end: Position { line: 13, column: 13, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 13, column: 16, }, end: Position { line: 13, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "bool", span: Span { start: Position { line: 13, column: 22, }, end: Position { line: 13, column: 26, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "default", span: Span { start: Position { line: 14, column: 9, }, end: Position { line: 14, column: 16, }, }, }, ), ], to: Identifier( Identifier { id: "false", span: Span { start: Position { line: 14, column: 19, }, end: Position { line: 14, column: 24, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 15, column: 9, }, end: Position { line: 15, column: 20, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 15, column: 23, }, end: Position { line: 15, column: 26, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 15, column: 27, }, end: Position { line: 15, column: 32, }, }, }, ), ], default: None, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "Whether or not to enable the Jenkins Job Builder (JJB) service. It\nallows defining jobs for Jenkins in a declarative manner.\n\nJobs managed through the Jenkins WebUI (or by other means) are left\nunchanged.\n\nNote that it really is declarative configuration; if you remove a\npreviously defined job, the corresponding job directory will be\ndeleted.\n\nPlease see the Jenkins Job Builder documentation for more info:\n[\nhttp://docs.openstack.org/infra/jenkins-job-builder/](http://docs.openstack.org/infra/jenkins-job-builder/)\n", span: Span { start: Position { line: 16, column: 1, }, end: Position { line: 29, column: 9, }, }, }, ), ], span: Span { start: Position { line: 15, column: 33, }, end: Position { line: 29, column: 11, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 12, column: 25, }, end: Position { line: 30, column: 8, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "accessUser", span: Span { start: Position { line: 32, column: 7, }, end: Position { line: 32, column: 17, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 32, column: 20, }, end: Position { line: 32, column: 28, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "default", span: Span { start: Position { line: 33, column: 9, }, end: Position { line: 33, column: 16, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: "admin", span: Span { start: Position { line: 33, column: 20, }, end: Position { line: 33, column: 25, }, }, }, ), ], span: Span { start: Position { line: 33, column: 19, }, end: Position { line: 33, column: 26, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 34, column: 9, }, end: Position { line: 34, column: 13, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 34, column: 16, }, end: Position { line: 34, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "str", span: Span { start: Position { line: 34, column: 22, }, end: Position { line: 34, column: 25, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 35, column: 9, }, end: Position { line: 35, column: 20, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 35, column: 23, }, end: Position { line: 35, column: 26, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 35, column: 27, }, end: Position { line: 35, column: 32, }, }, }, ), ], default: None, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "User id in Jenkins used to reload config.\n", span: Span { start: Position { line: 36, column: 1, }, end: Position { line: 37, column: 9, }, }, }, ), ], span: Span { start: Position { line: 35, column: 33, }, end: Position { line: 37, column: 11, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 32, column: 29, }, end: Position { line: 38, column: 8, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "accessToken", span: Span { start: Position { line: 40, column: 7, }, end: Position { line: 40, column: 18, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 40, column: 21, }, end: Position { line: 40, column: 29, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "default", span: Span { start: Position { line: 41, column: 9, }, end: Position { line: 41, column: 16, }, }, }, ), ], to: String( String_ { parts: [], span: Span { start: Position { line: 41, column: 19, }, end: Position { line: 41, column: 21, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 42, column: 9, }, end: Position { line: 42, column: 13, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 42, column: 16, }, end: Position { line: 42, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "str", span: Span { start: Position { line: 42, column: 22, }, end: Position { line: 42, column: 25, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 43, column: 9, }, end: Position { line: 43, column: 20, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 43, column: 23, }, end: Position { line: 43, column: 26, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 43, column: 27, }, end: Position { line: 43, column: 32, }, }, }, ), ], default: None, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "User token in Jenkins used to reload config.\nWARNING: This token will be world readable in the Nix store. To keep\nit secret, use the {option}`accessTokenFile` option instead.\n", span: Span { start: Position { line: 44, column: 1, }, end: Position { line: 47, column: 9, }, }, }, ), ], span: Span { start: Position { line: 43, column: 33, }, end: Position { line: 47, column: 11, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 40, column: 30, }, end: Position { line: 48, column: 8, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "accessTokenFile", span: Span { start: Position { line: 50, column: 7, }, end: Position { line: 50, column: 22, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 50, column: 25, }, end: Position { line: 50, column: 33, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "default", span: Span { start: Position { line: 51, column: 9, }, end: Position { line: 51, column: 16, }, }, }, ), ], to: String( String_ { parts: [ Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "config", span: Span { start: Position { line: 51, column: 22, }, end: Position { line: 51, column: 28, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "services", span: Span { start: Position { line: 51, column: 29, }, end: Position { line: 51, column: 37, }, }, }, ), Raw( PartRaw { content: "jenkins", span: Span { start: Position { line: 51, column: 38, }, end: Position { line: 51, column: 45, }, }, }, ), Raw( PartRaw { content: "home", span: Span { start: Position { line: 51, column: 46, }, end: Position { line: 51, column: 50, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "/secrets/initialAdminPassword", span: Span { start: Position { line: 51, column: 20, }, end: Position { line: 51, column: 80, }, }, }, ), ], span: Span { start: Position { line: 51, column: 19, }, end: Position { line: 51, column: 81, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "defaultText", span: Span { start: Position { line: 52, column: 9, }, end: Position { line: 52, column: 20, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "literalExpression", span: Span { start: Position { line: 52, column: 23, }, end: Position { line: 52, column: 40, }, }, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "\"", span: Span { start: Position { line: 52, column: 43, }, end: Position { line: 52, column: 44, }, }, }, ), Raw( PartRaw { content: "$", span: Span { start: Position { line: 52, column: 43, }, end: Position { line: 52, column: 47, }, }, }, ), Raw( PartRaw { content: "{config.services.jenkins.home}/secrets/initialAdminPassword\"", span: Span { start: Position { line: 52, column: 43, }, end: Position { line: 52, column: 107, }, }, }, ), ], span: Span { start: Position { line: 52, column: 41, }, end: Position { line: 52, column: 109, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 53, column: 9, }, end: Position { line: 53, column: 13, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 53, column: 16, }, end: Position { line: 53, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "str", span: Span { start: Position { line: 53, column: 22, }, end: Position { line: 53, column: 25, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "example", span: Span { start: Position { line: 54, column: 9, }, end: Position { line: 54, column: 16, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: "/run/keys/jenkins-job-builder-access-token", span: Span { start: Position { line: 54, column: 20, }, end: Position { line: 54, column: 62, }, }, }, ), ], span: Span { start: Position { line: 54, column: 19, }, end: Position { line: 54, column: 63, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 55, column: 9, }, end: Position { line: 55, column: 20, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 55, column: 23, }, end: Position { line: 55, column: 26, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 55, column: 27, }, end: Position { line: 55, column: 32, }, }, }, ), ], default: None, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "File containing the API token for the {option}`accessUser`\nuser.\n", span: Span { start: Position { line: 56, column: 1, }, end: Position { line: 58, column: 9, }, }, }, ), ], span: Span { start: Position { line: 55, column: 33, }, end: Position { line: 58, column: 11, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 50, column: 34, }, end: Position { line: 59, column: 8, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "yamlJobs", span: Span { start: Position { line: 61, column: 7, }, end: Position { line: 61, column: 15, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 61, column: 18, }, end: Position { line: 61, column: 26, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "default", span: Span { start: Position { line: 62, column: 9, }, end: Position { line: 62, column: 16, }, }, }, ), ], to: String( String_ { parts: [], span: Span { start: Position { line: 62, column: 19, }, end: Position { line: 62, column: 21, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 63, column: 9, }, end: Position { line: 63, column: 13, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 63, column: 16, }, end: Position { line: 63, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "lines", span: Span { start: Position { line: 63, column: 22, }, end: Position { line: 63, column: 27, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "example", span: Span { start: Position { line: 64, column: 9, }, end: Position { line: 64, column: 16, }, }, }, ), ], to: IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "- job:\n name: jenkins-job-test-1\n builders:\n - shell: echo 'Hello world!'\n", span: Span { start: Position { line: 65, column: 1, }, end: Position { line: 69, column: 9, }, }, }, ), ], span: Span { start: Position { line: 64, column: 19, }, end: Position { line: 69, column: 11, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 70, column: 9, }, end: Position { line: 70, column: 20, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 70, column: 23, }, end: Position { line: 70, column: 26, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 70, column: 27, }, end: Position { line: 70, column: 32, }, }, }, ), ], default: None, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "Job descriptions for Jenkins Job Builder in YAML format.\n", span: Span { start: Position { line: 71, column: 1, }, end: Position { line: 72, column: 9, }, }, }, ), ], span: Span { start: Position { line: 70, column: 33, }, end: Position { line: 72, column: 11, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 61, column: 27, }, end: Position { line: 73, column: 8, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "jsonJobs", span: Span { start: Position { line: 75, column: 7, }, end: Position { line: 75, column: 15, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 75, column: 18, }, end: Position { line: 75, column: 26, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "default", span: Span { start: Position { line: 76, column: 9, }, end: Position { line: 76, column: 16, }, }, }, ), ], to: List( List { elements: [], span: Span { start: Position { line: 76, column: 19, }, end: Position { line: 76, column: 22, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 77, column: 9, }, end: Position { line: 77, column: 13, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 77, column: 16, }, end: Position { line: 77, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "listOf", span: Span { start: Position { line: 77, column: 22, }, end: Position { line: 77, column: 28, }, }, }, ), ], default: None, }, ), arguments: [ PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 77, column: 29, }, end: Position { line: 77, column: 34, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "str", span: Span { start: Position { line: 77, column: 35, }, end: Position { line: 77, column: 38, }, }, }, ), ], default: None, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "example", span: Span { start: Position { line: 78, column: 9, }, end: Position { line: 78, column: 16, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "literalExpression", span: Span { start: Position { line: 78, column: 19, }, end: Position { line: 78, column: 36, }, }, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "[\n ", span: Span { start: Position { line: 79, column: 1, }, end: Position { line: 80, column: 13, }, }, }, ), Raw( PartRaw { content: "''", span: Span { start: Position { line: 79, column: 1, }, end: Position { line: 80, column: 16, }, }, }, ), Raw( PartRaw { content: "\n [ { \"job\":\n { \"name\": \"jenkins-job-test-2\",\n \"builders\": [ \"shell\": \"echo 'Hello world!'\" ]\n }\n }\n ]\n ", span: Span { start: Position { line: 79, column: 1, }, end: Position { line: 87, column: 13, }, }, }, ), Raw( PartRaw { content: "''", span: Span { start: Position { line: 79, column: 1, }, end: Position { line: 87, column: 16, }, }, }, ), Raw( PartRaw { content: "\n]\n", span: Span { start: Position { line: 79, column: 1, }, end: Position { line: 89, column: 9, }, }, }, ), ], span: Span { start: Position { line: 78, column: 37, }, end: Position { line: 89, column: 11, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 90, column: 9, }, end: Position { line: 90, column: 20, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 90, column: 23, }, end: Position { line: 90, column: 26, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 90, column: 27, }, end: Position { line: 90, column: 32, }, }, }, ), ], default: None, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "Job descriptions for Jenkins Job Builder in JSON format.\n", span: Span { start: Position { line: 91, column: 1, }, end: Position { line: 92, column: 9, }, }, }, ), ], span: Span { start: Position { line: 90, column: 33, }, end: Position { line: 92, column: 11, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 75, column: 27, }, end: Position { line: 93, column: 8, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "nixJobs", span: Span { start: Position { line: 95, column: 7, }, end: Position { line: 95, column: 14, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkOption", span: Span { start: Position { line: 95, column: 17, }, end: Position { line: 95, column: 25, }, }, }, ), arguments: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "default", span: Span { start: Position { line: 96, column: 9, }, end: Position { line: 96, column: 16, }, }, }, ), ], to: List( List { elements: [], span: Span { start: Position { line: 96, column: 19, }, end: Position { line: 96, column: 22, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "type", span: Span { start: Position { line: 97, column: 9, }, end: Position { line: 97, column: 13, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 97, column: 16, }, end: Position { line: 97, column: 21, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "listOf", span: Span { start: Position { line: 97, column: 22, }, end: Position { line: 97, column: 28, }, }, }, ), ], default: None, }, ), arguments: [ PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "types", span: Span { start: Position { line: 97, column: 29, }, end: Position { line: 97, column: 34, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "attrs", span: Span { start: Position { line: 97, column: 35, }, end: Position { line: 97, column: 40, }, }, }, ), ], default: None, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "example", span: Span { start: Position { line: 98, column: 9, }, end: Position { line: 98, column: 16, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "literalExpression", span: Span { start: Position { line: 98, column: 19, }, end: Position { line: 98, column: 36, }, }, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "[ { job =\n { name = \"jenkins-job-test-3\";\n builders = [\n { shell = \"echo 'Hello world!'\"; }\n ];\n };\n }\n]\n", span: Span { start: Position { line: 99, column: 1, }, end: Position { line: 107, column: 9, }, }, }, ), ], span: Span { start: Position { line: 98, column: 37, }, end: Position { line: 107, column: 11, }, }, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 108, column: 9, }, end: Position { line: 108, column: 20, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "lib", span: Span { start: Position { line: 108, column: 23, }, end: Position { line: 108, column: 26, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "mdDoc", span: Span { start: Position { line: 108, column: 27, }, end: Position { line: 108, column: 32, }, }, }, ), ], default: None, }, ), arguments: [ IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "Job descriptions for Jenkins Job Builder in Nix format.\n\nThis is a trivial wrapper around jsonJobs, using builtins.toJSON\nbehind the scene.\n", span: Span { start: Position { line: 109, column: 1, }, end: Position { line: 113, column: 9, }, }, }, ), ], span: Span { start: Position { line: 108, column: 33, }, end: Position { line: 113, column: 11, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 95, column: 26, }, end: Position { line: 114, column: 8, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 11, column: 35, }, end: Position { line: 115, column: 6, }, }, }, ), }, ), ], span: Span { start: Position { line: 10, column: 13, }, end: Position { line: 116, column: 4, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "config", span: Span { start: Position { line: 118, column: 3, }, end: Position { line: 118, column: 9, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "mkIf", span: Span { start: Position { line: 118, column: 12, }, end: Position { line: 118, column: 16, }, }, }, ), arguments: [ BinaryOperation( BinaryOperation { left: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "jenkinsCfg", span: Span { start: Position { line: 118, column: 18, }, end: Position { line: 118, column: 28, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "enable", span: Span { start: Position { line: 118, column: 29, }, end: Position { line: 118, column: 35, }, }, }, ), ], default: None, }, ), operator: LogicalAnd, right: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 118, column: 39, }, end: Position { line: 118, column: 42, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "enable", span: Span { start: Position { line: 118, column: 43, }, end: Position { line: 118, column: 49, }, }, }, ), ], default: None, }, ), }, ), Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "assertions", span: Span { start: Position { line: 119, column: 5, }, end: Position { line: 119, column: 15, }, }, }, ), ], to: List( List { elements: [ Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "assertion", span: Span { start: Position { line: 120, column: 9, }, end: Position { line: 120, column: 18, }, }, }, ), ], to: IfThenElse( IfThenElse { predicate: BinaryOperation( BinaryOperation { left: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 121, column: 14, }, end: Position { line: 121, column: 17, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "accessUser", span: Span { start: Position { line: 121, column: 18, }, end: Position { line: 121, column: 28, }, }, }, ), ], default: None, }, ), operator: NotEqualTo, right: String( String_ { parts: [], span: Span { start: Position { line: 121, column: 32, }, end: Position { line: 121, column: 34, }, }, }, ), }, ), then: BinaryOperation( BinaryOperation { left: BinaryOperation( BinaryOperation { left: BinaryOperation( BinaryOperation { left: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 122, column: 17, }, end: Position { line: 122, column: 20, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "accessToken", span: Span { start: Position { line: 122, column: 21, }, end: Position { line: 122, column: 32, }, }, }, ), ], default: None, }, ), operator: NotEqualTo, right: String( String_ { parts: [], span: Span { start: Position { line: 122, column: 36, }, end: Position { line: 122, column: 38, }, }, }, ), }, ), operator: LogicalAnd, right: BinaryOperation( BinaryOperation { left: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 122, column: 42, }, end: Position { line: 122, column: 45, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "accessTokenFile", span: Span { start: Position { line: 122, column: 46, }, end: Position { line: 122, column: 61, }, }, }, ), ], default: None, }, ), operator: EqualTo, right: String( String_ { parts: [], span: Span { start: Position { line: 122, column: 65, }, end: Position { line: 122, column: 67, }, }, }, ), }, ), }, ), operator: LogicalOr, right: BinaryOperation( BinaryOperation { left: BinaryOperation( BinaryOperation { left: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 123, column: 17, }, end: Position { line: 123, column: 20, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "accessToken", span: Span { start: Position { line: 123, column: 21, }, end: Position { line: 123, column: 32, }, }, }, ), ], default: None, }, ), operator: EqualTo, right: String( String_ { parts: [], span: Span { start: Position { line: 123, column: 36, }, end: Position { line: 123, column: 38, }, }, }, ), }, ), operator: LogicalAnd, right: BinaryOperation( BinaryOperation { left: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 123, column: 42, }, end: Position { line: 123, column: 45, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "accessTokenFile", span: Span { start: Position { line: 123, column: 46, }, end: Position { line: 123, column: 61, }, }, }, ), ], default: None, }, ), operator: NotEqualTo, right: String( String_ { parts: [], span: Span { start: Position { line: 123, column: 65, }, end: Position { line: 123, column: 67, }, }, }, ), }, ), }, ), }, ), else_: Identifier( Identifier { id: "true", span: Span { start: Position { line: 124, column: 16, }, end: Position { line: 124, column: 20, }, }, }, ), span: Span { start: Position { line: 121, column: 11, }, end: Position { line: 124, column: 20, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "message", span: Span { start: Position { line: 125, column: 9, }, end: Position { line: 125, column: 16, }, }, }, ), ], to: IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "One of accessToken and accessTokenFile options must be non-empty\nstrings, but not both. Current values:\n services.jenkins.jobBuilder.accessToken = \"", span: Span { start: Position { line: 126, column: 1, }, end: Position { line: 128, column: 56, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 128, column: 58, }, end: Position { line: 128, column: 61, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "accessToken", span: Span { start: Position { line: 128, column: 62, }, end: Position { line: 128, column: 73, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "\"\n services.jenkins.jobBuilder.accessTokenFile = \"", span: Span { start: Position { line: 126, column: 1, }, end: Position { line: 129, column: 60, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 129, column: 62, }, end: Position { line: 129, column: 65, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "accessTokenFile", span: Span { start: Position { line: 129, column: 66, }, end: Position { line: 129, column: 81, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "\"\n", span: Span { start: Position { line: 126, column: 1, }, end: Position { line: 130, column: 9, }, }, }, ), ], span: Span { start: Position { line: 125, column: 19, }, end: Position { line: 130, column: 11, }, }, }, ), }, ), ], span: Span { start: Position { line: 120, column: 7, }, end: Position { line: 131, column: 8, }, }, }, ), ], span: Span { start: Position { line: 119, column: 18, }, end: Position { line: 132, column: 6, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "systemd", span: Span { start: Position { line: 134, column: 5, }, end: Position { line: 134, column: 12, }, }, }, ), Raw( PartRaw { content: "services", span: Span { start: Position { line: 134, column: 13, }, end: Position { line: 134, column: 21, }, }, }, ), Raw( PartRaw { content: "jenkins-job-builder", span: Span { start: Position { line: 134, column: 22, }, end: Position { line: 134, column: 41, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "description", span: Span { start: Position { line: 135, column: 7, }, end: Position { line: 135, column: 18, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: "Jenkins Job Builder Service", span: Span { start: Position { line: 135, column: 22, }, end: Position { line: 135, column: 49, }, }, }, ), ], span: Span { start: Position { line: 135, column: 21, }, end: Position { line: 135, column: 50, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "after", span: Span { start: Position { line: 138, column: 7, }, end: Position { line: 138, column: 12, }, }, }, ), ], to: List( List { elements: [ String( String_ { parts: [ Raw( PartRaw { content: "jenkins.service", span: Span { start: Position { line: 138, column: 18, }, end: Position { line: 138, column: 33, }, }, }, ), ], span: Span { start: Position { line: 138, column: 17, }, end: Position { line: 138, column: 34, }, }, }, ), ], span: Span { start: Position { line: 138, column: 15, }, end: Position { line: 138, column: 36, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "wantedBy", span: Span { start: Position { line: 139, column: 7, }, end: Position { line: 139, column: 15, }, }, }, ), ], to: List( List { elements: [ String( String_ { parts: [ Raw( PartRaw { content: "multi-user.target", span: Span { start: Position { line: 139, column: 21, }, end: Position { line: 139, column: 38, }, }, }, ), ], span: Span { start: Position { line: 139, column: 20, }, end: Position { line: 139, column: 39, }, }, }, ), ], span: Span { start: Position { line: 139, column: 18, }, end: Position { line: 139, column: 41, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "path", span: Span { start: Position { line: 141, column: 7, }, end: Position { line: 141, column: 11, }, }, }, ), ], to: With( With { expression: Identifier( Identifier { id: "pkgs", span: Span { start: Position { line: 141, column: 19, }, end: Position { line: 141, column: 23, }, }, }, ), target: List( List { elements: [ Identifier( Identifier { id: "jenkins-job-builder", span: Span { start: Position { line: 141, column: 27, }, end: Position { line: 141, column: 46, }, }, }, ), Identifier( Identifier { id: "curl", span: Span { start: Position { line: 141, column: 47, }, end: Position { line: 141, column: 51, }, }, }, ), ], span: Span { start: Position { line: 141, column: 25, }, end: Position { line: 141, column: 53, }, }, }, ), span: Span { start: Position { line: 141, column: 14, }, end: Position { line: 141, column: 53, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "script", span: Span { start: Position { line: 147, column: 7, }, end: Position { line: 147, column: 13, }, }, }, ), ], to: LetIn( LetIn { bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "yamlJobsFile", span: Span { start: Position { line: 149, column: 11, }, end: Position { line: 149, column: 23, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "builtins", span: Span { start: Position { line: 149, column: 26, }, end: Position { line: 149, column: 34, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "toFile", span: Span { start: Position { line: 149, column: 35, }, end: Position { line: 149, column: 41, }, }, }, ), ], default: None, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "jobs.yaml", span: Span { start: Position { line: 149, column: 43, }, end: Position { line: 149, column: 52, }, }, }, ), ], span: Span { start: Position { line: 149, column: 42, }, end: Position { line: 149, column: 53, }, }, }, ), PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 149, column: 54, }, end: Position { line: 149, column: 57, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "yamlJobs", span: Span { start: Position { line: 149, column: 58, }, end: Position { line: 149, column: 66, }, }, }, ), ], default: None, }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "jsonJobsFiles", span: Span { start: Position { line: 150, column: 11, }, end: Position { line: 150, column: 24, }, }, }, ), ], to: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "map", span: Span { start: Position { line: 151, column: 13, }, end: Position { line: 151, column: 16, }, }, }, ), arguments: [ Function( Function { head: Simple( FunctionHeadSimple { identifier: "x", }, ), body: FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "builtins", span: Span { start: Position { line: 151, column: 22, }, end: Position { line: 151, column: 30, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "toFile", span: Span { start: Position { line: 151, column: 31, }, end: Position { line: 151, column: 37, }, }, }, ), ], default: None, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: "jobs.json", span: Span { start: Position { line: 151, column: 39, }, end: Position { line: 151, column: 48, }, }, }, ), ], span: Span { start: Position { line: 151, column: 38, }, end: Position { line: 151, column: 49, }, }, }, ), Identifier( Identifier { id: "x", span: Span { start: Position { line: 151, column: 50, }, end: Position { line: 151, column: 51, }, }, }, ), ], }, ), span: Span { start: Position { line: 151, column: 18, }, end: Position { line: 151, column: 52, }, }, }, ), BinaryOperation( BinaryOperation { left: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 152, column: 16, }, end: Position { line: 152, column: 19, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "jsonJobs", span: Span { start: Position { line: 152, column: 20, }, end: Position { line: 152, column: 28, }, }, }, ), ], default: None, }, ), operator: Concatenation, right: List( List { elements: [ FunctionApplication( FunctionApplication { function: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "builtins", span: Span { start: Position { line: 152, column: 34, }, end: Position { line: 152, column: 42, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "toJSON", span: Span { start: Position { line: 152, column: 43, }, end: Position { line: 152, column: 49, }, }, }, ), ], default: None, }, ), arguments: [ PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 152, column: 50, }, end: Position { line: 152, column: 53, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "nixJobs", span: Span { start: Position { line: 152, column: 54, }, end: Position { line: 152, column: 61, }, }, }, ), ], default: None, }, ), ], }, ), ], span: Span { start: Position { line: 152, column: 32, }, end: Position { line: 152, column: 63, }, }, }, ), }, ), ], }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "jobBuilderOutputDir", span: Span { start: Position { line: 153, column: 11, }, end: Position { line: 153, column: 30, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: "/run/jenkins-job-builder/output", span: Span { start: Position { line: 153, column: 34, }, end: Position { line: 153, column: 65, }, }, }, ), ], span: Span { start: Position { line: 153, column: 33, }, end: Position { line: 153, column: 66, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "ownerStamp", span: Span { start: Position { line: 156, column: 11, }, end: Position { line: 156, column: 21, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: ".config-xml-managed-by-nixos-jenkins-job-builder", span: Span { start: Position { line: 156, column: 25, }, end: Position { line: 156, column: 73, }, }, }, ), ], span: Span { start: Position { line: 156, column: 24, }, end: Position { line: 156, column: 74, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "reloadScript", span: Span { start: Position { line: 157, column: 11, }, end: Position { line: 157, column: 23, }, }, }, ), ], to: IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "echo \"Asking Jenkins to reload config\"\ncurl_opts=\"--silent --fail --show-error\"\naccess_token_file=", span: Span { start: Position { line: 158, column: 1, }, end: Position { line: 160, column: 31, }, }, }, ), Interpolation( PartInterpolation { expression: IfThenElse( IfThenElse { predicate: BinaryOperation( BinaryOperation { left: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 160, column: 36, }, end: Position { line: 160, column: 39, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "accessTokenFile", span: Span { start: Position { line: 160, column: 40, }, end: Position { line: 160, column: 55, }, }, }, ), ], default: None, }, ), operator: NotEqualTo, right: String( String_ { parts: [], span: Span { start: Position { line: 160, column: 59, }, end: Position { line: 160, column: 61, }, }, }, ), }, ), then: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 161, column: 33, }, end: Position { line: 161, column: 36, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "accessTokenFile", span: Span { start: Position { line: 161, column: 37, }, end: Position { line: 161, column: 52, }, }, }, ), ], default: None, }, ), else_: String( String_ { parts: [ Raw( PartRaw { content: "$RUNTIME_DIRECTORY/jenkins_access_token.txt", span: Span { start: Position { line: 162, column: 34, }, end: Position { line: 162, column: 77, }, }, }, ), ], span: Span { start: Position { line: 162, column: 33, }, end: Position { line: 162, column: 78, }, }, }, ), span: Span { start: Position { line: 160, column: 33, }, end: Position { line: 162, column: 78, }, }, }, ), }, ), Raw( PartRaw { content: "\nif [ \"", span: Span { start: Position { line: 158, column: 1, }, end: Position { line: 163, column: 19, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 163, column: 21, }, end: Position { line: 163, column: 24, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "accessToken", span: Span { start: Position { line: 163, column: 25, }, end: Position { line: 163, column: 36, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "\" != \"\" ]; then\n (umask 0077; printf \"", span: Span { start: Position { line: 158, column: 1, }, end: Position { line: 164, column: 37, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 164, column: 39, }, end: Position { line: 164, column: 42, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "accessToken", span: Span { start: Position { line: 164, column: 43, }, end: Position { line: 164, column: 54, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "\" >\"$access_token_file\")\nfi\njenkins_url=\"http://", span: Span { start: Position { line: 158, column: 1, }, end: Position { line: 166, column: 33, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "jenkinsCfg", span: Span { start: Position { line: 166, column: 35, }, end: Position { line: 166, column: 45, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "listenAddress", span: Span { start: Position { line: 166, column: 46, }, end: Position { line: 166, column: 59, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: ":", span: Span { start: Position { line: 158, column: 1, }, end: Position { line: 166, column: 61, }, }, }, ), Interpolation( PartInterpolation { expression: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "toString", span: Span { start: Position { line: 166, column: 63, }, end: Position { line: 166, column: 71, }, }, }, ), arguments: [ PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "jenkinsCfg", span: Span { start: Position { line: 166, column: 72, }, end: Position { line: 166, column: 82, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "port", span: Span { start: Position { line: 166, column: 83, }, end: Position { line: 166, column: 87, }, }, }, ), ], default: None, }, ), ], }, ), }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "jenkinsCfg", span: Span { start: Position { line: 166, column: 90, }, end: Position { line: 166, column: 100, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "prefix", span: Span { start: Position { line: 166, column: 101, }, end: Position { line: 166, column: 107, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "\"\nauth_file=\"$RUNTIME_DIRECTORY/jenkins_auth_file.txt\"\ntrap 'rm -f \"$auth_file\"' EXIT\n(umask 0077; printf \"", span: Span { start: Position { line: 158, column: 1, }, end: Position { line: 169, column: 34, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 169, column: 36, }, end: Position { line: 169, column: 39, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "accessUser", span: Span { start: Position { line: 169, column: 40, }, end: Position { line: 169, column: 50, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: ":@password_placeholder@\" >\"$auth_file\")\n\"", span: Span { start: Position { line: 158, column: 1, }, end: Position { line: 170, column: 14, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "pkgs", span: Span { start: Position { line: 170, column: 16, }, end: Position { line: 170, column: 20, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "replace-secret", span: Span { start: Position { line: 170, column: 21, }, end: Position { line: 170, column: 35, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "/bin/replace-secret\" \"@password_placeholder@\" \"$access_token_file\" \"$auth_file\"\n\nif ! \"", span: Span { start: Position { line: 158, column: 1, }, end: Position { line: 172, column: 19, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "pkgs", span: Span { start: Position { line: 172, column: 21, }, end: Position { line: 172, column: 25, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "jenkins", span: Span { start: Position { line: 172, column: 26, }, end: Position { line: 172, column: 33, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "/bin/jenkins-cli\" -s \"$jenkins_url\" -auth \"@$auth_file\" reload-configuration; then\n echo \"error: failed to reload configuration\"\n exit 1\nfi\n", span: Span { start: Position { line: 158, column: 1, }, end: Position { line: 176, column: 11, }, }, }, ), ], span: Span { start: Position { line: 157, column: 26, }, end: Position { line: 176, column: 13, }, }, }, ), }, ), ], target: BinaryOperation( BinaryOperation { left: IndentedString( IndentedString { parts: [ Raw( PartRaw { content: "joinByString()\n{\n local separator=\"$1\"\n shift\n local first=\"$1\"\n shift\n printf \"%s\" \"$first\" \"", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 185, column: 39, }, }, }, ), Raw( PartRaw { content: "$", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 185, column: 42, }, }, }, ), Raw( PartRaw { content: "{@/#/$separator}\"\n}\n\n# Map a relative directory path in the output from\n# jenkins-job-builder (jobname) to the layout expected by jenkins:\n# each directory level gets prepended \"jobs/\".\ngetJenkinsJobDir()\n{\n IFS='/' read -ra input_dirs <<< \"$1\"\n printf \"jobs/\"\n joinByString \"/jobs/\" \"", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 195, column: 40, }, }, }, ), Raw( PartRaw { content: "$", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 195, column: 43, }, }, }, ), Raw( PartRaw { content: "{input_dirs[@]}\"\n}\n\n# The inverse of getJenkinsJobDir (remove the \"jobs/\" prefixes)\ngetJobname()\n{\n IFS='/' read -ra input_dirs <<< \"$1\"\n local i=0\n local nelem=", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 203, column: 29, }, }, }, ), Raw( PartRaw { content: "$", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 203, column: 32, }, }, }, ), Raw( PartRaw { content: "{#input_dirs[@]}\n for e in \"", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 204, column: 27, }, }, }, ), Raw( PartRaw { content: "$", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 204, column: 30, }, }, }, ), Raw( PartRaw { content: "{input_dirs[@]}\"; do\n if [ $((i % 2)) -eq 1 ]; then\n printf \"$e\"\n if [ $i -lt $(( nelem - 1 )) ]; then\n printf \"/\"\n fi\n fi\n i=$((i + 1))\n done\n}\n\nrm -rf ", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 215, column: 20, }, }, }, ), Interpolation( PartInterpolation { expression: Identifier( Identifier { id: "jobBuilderOutputDir", span: Span { start: Position { line: 215, column: 22, }, end: Position { line: 215, column: 41, }, }, }, ), }, ), Raw( PartRaw { content: "\ncur_decl_jobs=/run/jenkins-job-builder/declarative-jobs\nrm -f \"$cur_decl_jobs\"\n\n# Create / update jobs\nmkdir -p ", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 220, column: 22, }, }, }, ), Interpolation( PartInterpolation { expression: Identifier( Identifier { id: "jobBuilderOutputDir", span: Span { start: Position { line: 220, column: 24, }, end: Position { line: 220, column: 43, }, }, }, ), }, ), Raw( PartRaw { content: "\nfor inputFile in ", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 221, column: 30, }, }, }, ), Interpolation( PartInterpolation { expression: Identifier( Identifier { id: "yamlJobsFile", span: Span { start: Position { line: 221, column: 32, }, end: Position { line: 221, column: 44, }, }, }, ), }, ), Raw( PartRaw { content: " ", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 221, column: 46, }, }, }, ), Interpolation( PartInterpolation { expression: FunctionApplication( FunctionApplication { function: Identifier( Identifier { id: "concatStringsSep", span: Span { start: Position { line: 221, column: 48, }, end: Position { line: 221, column: 64, }, }, }, ), arguments: [ String( String_ { parts: [ Raw( PartRaw { content: " ", span: Span { start: Position { line: 221, column: 66, }, end: Position { line: 221, column: 67, }, }, }, ), ], span: Span { start: Position { line: 221, column: 65, }, end: Position { line: 221, column: 68, }, }, }, ), Identifier( Identifier { id: "jsonJobsFiles", span: Span { start: Position { line: 221, column: 69, }, end: Position { line: 221, column: 82, }, }, }, ), ], }, ), }, ), Raw( PartRaw { content: "; do\n HOME=\"", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 222, column: 23, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "jenkinsCfg", span: Span { start: Position { line: 222, column: 25, }, end: Position { line: 222, column: 35, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "home", span: Span { start: Position { line: 222, column: 36, }, end: Position { line: 222, column: 40, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "\" \"", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 222, column: 44, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "pkgs", span: Span { start: Position { line: 222, column: 46, }, end: Position { line: 222, column: 50, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "jenkins-job-builder", span: Span { start: Position { line: 222, column: 51, }, end: Position { line: 222, column: 70, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "/bin/jenkins-jobs\" --ignore-cache test --config-xml -o \"", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 222, column: 127, }, }, }, ), Interpolation( PartInterpolation { expression: Identifier( Identifier { id: "jobBuilderOutputDir", span: Span { start: Position { line: 222, column: 129, }, end: Position { line: 222, column: 148, }, }, }, ), }, ), Raw( PartRaw { content: "\" \"$inputFile\"\ndone\n\nfind \"", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 225, column: 19, }, }, }, ), Interpolation( PartInterpolation { expression: Identifier( Identifier { id: "jobBuilderOutputDir", span: Span { start: Position { line: 225, column: 21, }, end: Position { line: 225, column: 40, }, }, }, ), }, ), Raw( PartRaw { content: "\" -type f -name config.xml | while read -r f; do echo \"$(dirname \"$f\")\"; done | sort | while read -r dir; do\n jobname=\"$(realpath --relative-to=\"", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 226, column: 52, }, }, }, ), Interpolation( PartInterpolation { expression: Identifier( Identifier { id: "jobBuilderOutputDir", span: Span { start: Position { line: 226, column: 54, }, end: Position { line: 226, column: 73, }, }, }, ), }, ), Raw( PartRaw { content: "\" \"$dir\")\"\n jenkinsjobname=$(getJenkinsJobDir \"$jobname\")\n jenkinsjobdir=\"", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 228, column: 32, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "jenkinsCfg", span: Span { start: Position { line: 228, column: 34, }, end: Position { line: 228, column: 44, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "home", span: Span { start: Position { line: 228, column: 45, }, end: Position { line: 228, column: 49, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "/$jenkinsjobname\"\n echo \"Creating / updating job \\\"$jobname\\\"\"\n mkdir -p \"$jenkinsjobdir\"\n touch \"$jenkinsjobdir/", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 231, column: 39, }, }, }, ), Interpolation( PartInterpolation { expression: Identifier( Identifier { id: "ownerStamp", span: Span { start: Position { line: 231, column: 41, }, end: Position { line: 231, column: 51, }, }, }, ), }, ), Raw( PartRaw { content: "\"\n cp \"$dir\"/config.xml \"$jenkinsjobdir/config.xml\"\n echo \"$jenkinsjobname\" >> \"$cur_decl_jobs\"\ndone\n\n# Remove stale jobs\nfind \"", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 237, column: 19, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "jenkinsCfg", span: Span { start: Position { line: 237, column: 21, }, end: Position { line: 237, column: 31, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "home", span: Span { start: Position { line: 237, column: 32, }, end: Position { line: 237, column: 36, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "\" -type f -name \"", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 237, column: 54, }, }, }, ), Interpolation( PartInterpolation { expression: Identifier( Identifier { id: "ownerStamp", span: Span { start: Position { line: 237, column: 56, }, end: Position { line: 237, column: 66, }, }, }, ), }, ), Raw( PartRaw { content: "\" | while read -r f; do echo \"$(dirname \"$f\")\"; done | sort --reverse | while read -r dir; do\n jenkinsjobname=\"$(realpath --relative-to=\"", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 238, column: 59, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "jenkinsCfg", span: Span { start: Position { line: 238, column: 61, }, end: Position { line: 238, column: 71, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "home", span: Span { start: Position { line: 238, column: 72, }, end: Position { line: 238, column: 76, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "\" \"$dir\")\"\n grep --quiet --line-regexp \"$jenkinsjobname\" \"$cur_decl_jobs\" 2>/dev/null && continue\n jobname=$(getJobname \"$jenkinsjobname\")\n echo \"Deleting stale job \\\"$jobname\\\"\"\n jobdir=\"", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 242, column: 25, }, }, }, ), Interpolation( PartInterpolation { expression: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "jenkinsCfg", span: Span { start: Position { line: 242, column: 27, }, end: Position { line: 242, column: 37, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "home", span: Span { start: Position { line: 242, column: 38, }, end: Position { line: 242, column: 42, }, }, }, ), ], default: None, }, ), }, ), Raw( PartRaw { content: "/$jenkinsjobname\"\n rm -rf \"$jobdir\"\ndone\n", span: Span { start: Position { line: 179, column: 1, }, end: Position { line: 245, column: 11, }, }, }, ), ], span: Span { start: Position { line: 178, column: 11, }, end: Position { line: 245, column: 13, }, }, }, ), operator: Addition, right: IfThenElse( IfThenElse { predicate: BinaryOperation( BinaryOperation { left: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "cfg", span: Span { start: Position { line: 245, column: 20, }, end: Position { line: 245, column: 23, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "accessUser", span: Span { start: Position { line: 245, column: 24, }, end: Position { line: 245, column: 34, }, }, }, ), ], default: None, }, ), operator: NotEqualTo, right: String( String_ { parts: [], span: Span { start: Position { line: 245, column: 38, }, end: Position { line: 245, column: 40, }, }, }, ), }, ), then: Identifier( Identifier { id: "reloadScript", span: Span { start: Position { line: 245, column: 46, }, end: Position { line: 245, column: 58, }, }, }, ), else_: String( String_ { parts: [], span: Span { start: Position { line: 245, column: 64, }, end: Position { line: 245, column: 66, }, }, }, ), span: Span { start: Position { line: 245, column: 17, }, end: Position { line: 245, column: 66, }, }, }, ), }, ), span: Span { start: Position { line: 148, column: 9, }, end: Position { line: 245, column: 67, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "serviceConfig", span: Span { start: Position { line: 246, column: 7, }, end: Position { line: 246, column: 20, }, }, }, ), ], to: Map( Map { recursive: false, bindings: [ KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "Type", span: Span { start: Position { line: 247, column: 9, }, end: Position { line: 247, column: 13, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: "oneshot", span: Span { start: Position { line: 247, column: 17, }, end: Position { line: 247, column: 24, }, }, }, ), ], span: Span { start: Position { line: 247, column: 16, }, end: Position { line: 247, column: 25, }, }, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "User", span: Span { start: Position { line: 248, column: 9, }, end: Position { line: 248, column: 13, }, }, }, ), ], to: PropertyAccess( PropertyAccess { expression: Identifier( Identifier { id: "jenkinsCfg", span: Span { start: Position { line: 248, column: 16, }, end: Position { line: 248, column: 26, }, }, }, ), attribute_path: [ Raw( PartRaw { content: "user", span: Span { start: Position { line: 248, column: 27, }, end: Position { line: 248, column: 31, }, }, }, ), ], default: None, }, ), }, ), KeyValue( BindingKeyValue { from: [ Raw( PartRaw { content: "RuntimeDirectory", span: Span { start: Position { line: 249, column: 9, }, end: Position { line: 249, column: 25, }, }, }, ), ], to: String( String_ { parts: [ Raw( PartRaw { content: "jenkins-job-builder", span: Span { start: Position { line: 249, column: 29, }, end: Position { line: 249, column: 48, }, }, }, ), ], span: Span { start: Position { line: 249, column: 28, }, end: Position { line: 249, column: 49, }, }, }, ), }, ), ], span: Span { start: Position { line: 246, column: 23, }, end: Position { line: 250, column: 8, }, }, }, ), }, ), ], span: Span { start: Position { line: 134, column: 44, }, end: Position { line: 251, column: 6, }, }, }, ), }, ), ], span: Span { start: Position { line: 118, column: 51, }, end: Position { line: 252, column: 4, }, }, }, ), ], }, ), }, ), ], span: Span { start: Position { line: 9, column: 4, }, end: Position { line: 253, column: 2, }, }, }, ), span: Span { start: Position { line: 5, column: 1, }, end: Position { line: 253, column: 2, }, }, }, ), span: Span { start: Position { line: 3, column: 1, }, end: Position { line: 253, column: 2, }, }, }, ), span: Span { start: Position { line: 1, column: 1, }, end: Position { line: 253, column: 2, }, }, }, )