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

fix(tests): set owner of files created by containers to the local user #151

Merged
merged 1 commit into from
Jul 27, 2016

Conversation

Joshua-Anderson
Copy link
Contributor

This fixes with jenkins failing to delete files when cleaning up.

@Joshua-Anderson
Copy link
Contributor Author

@vdice This seems to be failing CI due to permission issues. Any idea what the problem is?

@Joshua-Anderson Joshua-Anderson force-pushed the update-go-dev branch 2 times, most recently from 3283bb9 to 1abfb0f Compare July 26, 2016 20:52
@Joshua-Anderson Joshua-Anderson changed the title chore(Makefile): update docker-go-dev to latest revision fix(tests): set owner of files created by containers to the local user Jul 26, 2016
@Joshua-Anderson
Copy link
Contributor Author

I'm changing strategy here. Instead of trying to create files with jenkins's specific UID and GID, chown the created files to the local user.

@Joshua-Anderson
Copy link
Contributor Author

@mboersma @vdice Could someone please double check on the jenkins nodes that the fileperms have been successfully set?

@Joshua-Anderson
Copy link
Contributor Author

Joshua-Anderson commented Jul 26, 2016

I'm going to unset the LGTMs because I completely redid the code.

@vdice
Copy link
Member

vdice commented Jul 26, 2016

file perms looking good on Jenkins (uid/gid of user jenkins used):

/home/jenkins/workspace/Deis/workflow-cli$ ls -haltr PR-151/gopath/src/github.com/deis/workflow-cli/vendor/
total 20K
drwxr-xr-x  8 jenkins jenkins 4.0K Jul 26 18:31 github.com
drwxr-xr-x  3 jenkins jenkins 4.0K Jul 26 18:31 golang.org
drwxr-xr-x  3 jenkins jenkins 4.0K Jul 26 18:31 gopkg.in
drwxr-xr-x  5 jenkins jenkins 4.0K Jul 26 18:31 .
drwxr-xr-x 13 jenkins jenkins 4.0K Jul 26 21:31 ..

@@ -6,11 +6,20 @@ def getBasePath = { String filepath ->
return filepath.substring(0, filename)
}

def make = { String target ->
try {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious if this could be rewritten/simplified to:

def make = { String target ->
    try {
        sh "make ${target}"
    } catch(error) {
        false
    }
    sh "make fileperms"
}

... or would that last sh invocation not get run?

Copy link
Contributor Author

@Joshua-Anderson Joshua-Anderson Jul 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false kills the build, so it wouldn't run

@vdice vdice added the LGTM1 label Jul 26, 2016
@vdice
Copy link
Member

vdice commented Jul 26, 2016

curiosity note/question; otherwise LGTM

@Joshua-Anderson
Copy link
Contributor Author

For some reason the status links to pipeline build #7, which failed, but the most recent build is pipeline build #8 which passed.

@Joshua-Anderson Joshua-Anderson merged commit 89e4177 into deis:master Jul 27, 2016
@Joshua-Anderson Joshua-Anderson deleted the update-go-dev branch July 27, 2016 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants