kubesphere / kubesphere/ks-devops

Support writefile step in pipeline

Open
#1,026 0 comments 0 reactions 1 assignee Claimed by @yudong2015 View on GitHub
kind/feature
Dominant language
Go
Stars
164
Forks
140
PR merge metrics
No merged PRs in 30d

Description

### 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

截屏2023-11-23 12 17 13

```
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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.