ks-devops
ks-devops copied to clipboard
Support writefile step in pipeline
trafficstars
What is version of KubeSphere DevOps has the issue?
v3.4.1
How did you install the Kubernetes? Or what is the Kubernetes distribution?
kubekey
Describe this feature
pipeline {
agent any
stages {
stage('Generate Dockerfile and Build Image') {
steps {
writeFile file: 'test', text: '''
abcdefg
'''
writeFile file: 'Dockerfile', text: '''
FROM nginx:latest
ADD test ./
'''
sh "docker build -t test:latest ."
}
}
}
}
Additional information
No response