Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add chown after each build step in order to fix cleanup in case of build fail #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions jobs/generation/Utilities.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@ class Utilities {
def authorsOpts = '/p:Authors=Tizen'

if (project == 'coreclr') {
shell("${dockerCommand} ./build.sh cross \${config} \${targetArch} cmakeargs -DFEATURE_GDBJIT=TRUE stripSymbols -PortableBuild=false \${buildIdOpts} -- \${stableOpts} \${packageOpts} ${authorsOpts}")
shell("ret=\$(${dockerCommand} ./build.sh cross \${config} \${targetArch} cmakeargs -DFEATURE_GDBJIT=TRUE stripSymbols -PortableBuild=false \${buildIdOpts} -- \${stableOpts} \${packageOpts} ${authorsOpts}; echo \$\?); if [ \"\$ret\" != \"0\" ]; then ${dockerCommand} chown \$( id -u \${USER} ):\$( id -u \${USER} ) . -R; exit \$ret; fi")
} else if (project == 'corefx') {
shell("${dockerCommand} ./build.sh -\${config} -buildArch=\${targetArch} -RuntimeOS=tizen.4.0.0 -PortableBuild=false \${buildIdOpts} -- \${stableOpts} \${packageOpts} /p:BinPlaceNETCoreAppPackage=true /p:OverridePackageSource=https:%2F%2Ftizen.myget.org/F/dotnet-core/api/v3/index.json ${authorsOpts}")
shell("${dockerCommand} ./build-packages.sh -\${config} -ArchGroup=\${targetArch} -RuntimeOS=tizen.4.0.0 -PortableBuild=false -- ${authorsOpts}")
shell("ret=\$(${dockerCommand} ./build.sh -\${config} -buildArch=\${targetArch} -RuntimeOS=tizen.4.0.0 -PortableBuild=false \${buildIdOpts} -- \${stableOpts} \${packageOpts} /p:BinPlaceNETCoreAppPackage=true /p:OverridePackageSource=https:%2F%2Ftizen.myget.org/F/dotnet-core/api/v3/index.json ${authorsOpts}; echo \$\?); if [ \"\$ret\" != \"0\" ]; then ${dockerCommand} chown \$( id -u \${USER} ):\$( id -u \${USER} ) . -R; exit \$ret; fi")
shell("ret=\$(${dockerCommand} ./build-packages.sh -\${config} -ArchGroup=\${targetArch} -RuntimeOS=tizen.4.0.0 -PortableBuild=false -- ${authorsOpts}; echo \$\?); if [ \"\$ret\" != \"0\" ]; then ${dockerCommand} chown \$( id -u \${USER} ):\$( id -u \${USER} ) . -R; exit \$ret; fi")
} else if (project == 'core-setup') {
shell("${dockerCommand} ./build.sh -ConfigurationGroup=\${config} -TargetArchitecture=\${targetArch} -SkipTests=true -DisableCrossgen=true -PortableBuild=false -CrossBuild=true \${buildIdOpts} -- \${stableOpts} \${packageOpts} /p:OverridePackageSource=https:%2F%2Ftizen.myget.org/F/dotnet-core/api/v3/index.json ${authorsOpts} /p:OutputRid=tizen.4.0.0-\${targetArch}")
shell("ret=\$(${dockerCommand} ./build.sh -ConfigurationGroup=\${config} -TargetArchitecture=\${targetArch} -SkipTests=true -DisableCrossgen=true -PortableBuild=false -CrossBuild=true \${buildIdOpts} -- \${stableOpts} \${packageOpts} /p:OverridePackageSource=https:%2F%2Ftizen.myget.org/F/dotnet-core/api/v3/index.json ${authorsOpts} /p:OutputRid=tizen.4.0.0-\${targetArch}; echo \$\?); if [ \"\$ret\" != \"0\" ]; then ${dockerCommand} chown \$( id -u \${USER} ):\$( id -u \${USER} ) . -R; exit \$ret; fi")
}
// Change ownership to UID of the projectDir
// Building with docker, it will be created as root with the file it downloaded
Expand Down