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

Do not remove Dockerfile in script #59

Closed
lunemec opened this Issue Sep 19, 2018 · 14 comments

Comments

Projects
None yet
3 participants
@lunemec
Copy link

lunemec commented Sep 19, 2018

Hi, I'm trying to get automatic building of my project using travis.debian.net. But I encountered a problem when the script.sh deletes Dockerfile at the end:

I: Removing Dockerfile
I: Running build
gbp:error: You have uncommitted changes in your source tree:
gbp:error: HEAD detached at 3772138
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
	deleted:    Dockerfile
no changes added to commit (use "git add" and/or "git commit -a")
gbp:error: Use --git-ignore-new to ignore.
The command "wget -O- http://travis.debian.net/script.sh | sh -" exited with 1.
Done. Your build exited with 1.

It is this build: https://travis-ci.org/lunemec/nanny/jobs/430509967 (not sure if you can see that).

Here is my .travis-ci.yml: https://github.com/lunemec/nanny/blob/travis-test/.travis.yml

How can I fix this? Thank you.

@lamby lamby closed this in 5b56b89 Sep 19, 2018

@lunemec

This comment has been minimized.

Copy link
Author

lunemec commented Sep 19, 2018

Thank you for that, but it didn't work. @lamby

https://travis-ci.org/lunemec/nanny/jobs/430689788

Maybe it would be better for your script to create Dockerfile.travis.debian.net filename, and use that. I bet nobody will use that filename compared to everyone using Dockerfile.

Thank you

@lamby lamby reopened this Sep 21, 2018

@lamby

This comment has been minimized.

Copy link
Owner

lamby commented Sep 21, 2018

@lunemec Sorry didn't see your comment until now. I don't understand why the call to git checkout… does not restore the file for you. Can you investgate?

@vranki

This comment has been minimized.

Copy link

vranki commented Nov 30, 2018

Not 100% sure if this is the same issue but also complains about Dockerfile,
although Dockerfile is not present in the project:

Successfully tagged travis.debian.net/perse:latest
I: Restoring Dockerfile to previous state
error: pathspec 'Dockerfile' did not match any file(s) known to git.
I: Running build
gbp:error: upstream/1.0.4 is not a valid treeish
The command "wget -O- http://travis.debian.net/script.sh | sh -" exited with 1.

Full build log: https://travis-ci.org/vranki/perse

Any ideas what's wrong?

@lamby

This comment has been minimized.

Copy link
Owner

lamby commented Nov 30, 2018

gbp:error: upstream/1.0.4 is not a valid treeish looks like a different error altogether. ie. you are trying to run this travis job against an upstream tag.

@vranki

This comment has been minimized.

Copy link

vranki commented Nov 30, 2018

It's trying to build branch debian. No tags in the project. I have no clue where 'upstream' comes from.

@lamby

This comment has been minimized.

Copy link
Owner

lamby commented Nov 30, 2018

Interesting. Anyway, I still think this a separate issue. Please could you file another issue, perhaps referencing this one for context? Thanks in advance.

@lamby

This comment has been minimized.

Copy link
Owner

lamby commented Dec 10, 2018

@lunemec Ping on this?

lamby added a commit that referenced this issue Dec 10, 2018

@lunemec

This comment has been minimized.

Copy link
Author

lunemec commented Dec 10, 2018

@lamby sorry I didn't get to it, I'll try to test it over christmas.

@lamby

This comment has been minimized.

Copy link
Owner

lamby commented Dec 28, 2018

Hi @lunemec Merry Christmas - any chance of having a look? :)

@lamby

This comment has been minimized.

Copy link
Owner

lamby commented Jan 7, 2019

Any luck?

@lunemec

This comment has been minimized.

Copy link
Author

lunemec commented Jan 7, 2019

@lamby sorry it took so long, but it seems that the gbp error happens before the script gets to the git checkout -- Dockerfile part.

Step 14/14 : CMD gbp buildpackage --git-submodules --git-ignore-branch --git-export-dir=/build -uc -us -sa
Removing intermediate container 16e8b8a6c37f
Successfully built e79ef5d7804c
Successfully tagged travis.debian.net/nanny:latest
I: Restoring Dockerfile to previous state (safe to ignore errors)
I: Running build
gbp:error: You have uncommitted changes in your source tree:
gbp:error: HEAD detached at 3772138
Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
	deleted:    Dockerfile
no changes added to commit (use "git add" and/or "git commit -a")
gbp:error: Use --git-ignore-new to ignore.
The command "wget -O- http://travis.debian.net/script.sh | sh -" exited with 1.
Done. Your build exited with 1.
@lamby

This comment has been minimized.

Copy link
Owner

lamby commented Jan 7, 2019

Do you have the entire build log for that? That looks like a different repo (not perse?).

When I try perse locally on the debian branch I see something different:

lamby@tinycat:~/git/forks/perse% TRAVIS_BUILD_NUMBER=0 sh ~/git/debian/github/travis.debian.net/script.sh
[…]
Setting up perse-build-deps (1.0.4-1) ...
Processing triggers for libc-bin (2.28-4) ...
Removing intermediate container a9bd59370055
 ---> e576dc75fba2
Step 11/14 : RUN rm -f Dockerfile
 ---> Running in 191cf1c213d9
Removing intermediate container 191cf1c213d9
 ---> 261394e8edb4
Step 12/14 : RUN git checkout .travis.yml || true
 ---> Running in d3b103f00344
Removing intermediate container d3b103f00344
 ---> a98eef8f5a5d
Step 13/14 : RUN mkdir -p /build
 ---> Running in 368df0eddac1
Removing intermediate container 368df0eddac1
 ---> 2884fcd75cce
Step 14/14 : CMD gbp buildpackage --git-submodules --git-ignore-branch --git-export-dir=/build -uc -us -sa
 ---> Running in 88c4d5258002
Removing intermediate container 88c4d5258002
 ---> d4b235f0e825
Successfully built d4b235f0e825
Successfully tagged travis.debian.net/perse:latest
I: Restoring Dockerfile to previous state (safe to ignore errors)
error: pathspec 'Dockerfile' did not match any file(s) known to git
I: Running build
gbp:error: upstream/1.0.4 is not a valid treeish
@lunemec

This comment has been minimized.

Copy link
Author

lunemec commented Jan 7, 2019

@lamby lamby closed this in 2e19017 Jan 7, 2019

@lamby

This comment has been minimized.

Copy link
Owner

lamby commented Jan 7, 2019

Thanks. Can we try and keep to the same issue/bug/package? :) I'm getting a little bit confused between the two... okay, I think I just fixed it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment