copy in workspace

This commit is contained in:
Naveenraj M
2020-03-30 02:58:09 +05:30
parent 9f694f400a
commit a2442d8ca7
2 changed files with 8 additions and 8 deletions

View File

@ -28,11 +28,11 @@ function run() {
yield exec.exec('rpmdev-setuptree');
// Copy spec file from path specFile to /root/rpmbuild/SPECS/
yield io.cp(`/github/workspace/${specFile}`, '/github/home/rpmbuild/SPECS/');
yield exec.exec(`cp -R /github/workspace/ /tmp/${repo}`);
yield exec.exec(`tar -czvf ${repo}.tar.gz ${repo}`, { cwd: "/tmp" });
yield exec.exec(`cp -R /github/workspace/ ${repo}`);
yield exec.exec(`tar -czvf ${repo}.tar.gz ${repo}`);
// Get repo files from /github/workspace/
yield exec.exec('ls -la /tmp');
yield exec.exec(`cp /tmp/${repo}.tar.gz /github/home/rpmbuild/SOURCES/`);
yield exec.exec('ls -la ');
yield exec.exec(`cp ${repo}.tar.gz /github/home/rpmbuild/SOURCES/`);
// Copy tar.gz file to /root/rpmbuild/SOURCES
// make sure the name of tar.gz is same as given in Source of spec file
//await io.cp(tarBallPath, '/root/rpmbuild/SOURCES');

View File

@ -25,13 +25,13 @@ async function run() {
// Copy spec file from path specFile to /root/rpmbuild/SPECS/
await io.cp(`/github/workspace/${specFile}`, '/github/home/rpmbuild/SPECS/');
await exec.exec(`cp -R /github/workspace/ /tmp/${repo}`);
await exec.exec(`cp -R /github/workspace/ ${repo}`);
await exec.exec(`tar -czvf ${repo}.tar.gz ${repo}`, { cwd : "/tmp"});
await exec.exec(`tar -czvf ${repo}.tar.gz ${repo}`);
// Get repo files from /github/workspace/
await exec.exec('ls -la /tmp');
await exec.exec(`cp /tmp/${repo}.tar.gz /github/home/rpmbuild/SOURCES/`);
await exec.exec('ls -la ');
await exec.exec(`cp ${repo}.tar.gz /github/home/rpmbuild/SOURCES/`);
// Copy tar.gz file to /root/rpmbuild/SOURCES
// make sure the name of tar.gz is same as given in Source of spec file