Complete the code to read a file content using pipeline utility function.
def content = readFile [1] 'example.txt'
The readFile function requires parentheses to pass the filename as an argument.
Complete the code to write text to a file using pipeline utility function.
writeFile [1] file: 'output.txt', text: 'Hello World'
The writeFile function uses a map argument, so square brackets [] are used to pass named parameters.
Fix the error in the code to archive artifacts correctly.
archiveArtifacts [1] 'build/output/*.jar'
The archiveArtifacts function expects a map argument, so square brackets [] are needed.
Fill both blanks to create a map of file sizes for files larger than 1000 bytes.
def sizes = [file.name: [1] for file in files if file.length() [2] 1000]
The map should store the file size using file.length() and filter files larger than 1000 bytes using >.
Fill all three blanks to filter environment variables starting with 'BUILD_' and map their names to values.
def buildVars = [[1]: env.[2] for [3] in env.getEnvironment().keySet() if [3].startsWith('BUILD_')]
Use varName as the loop variable and key for the map, and access the environment variable value with env.varName.