Skip to content

Conversation

skateman
Copy link
Member

@skateman skateman commented Jul 12, 2017

It resolves #81, but still needs an username:token pair for miq-bot to set as GITHUB_AUTH in Travis' secret environment variables. Basically something similar (or even the same) as we have for font-fabulous. @Fryguy ??

@Fryguy
Copy link
Member

Fryguy commented Jul 12, 2017

still needs an username:token pair for miq-bot to set as GITHUB_AUTH in Travis' secret environment variables

not a problem, we can do that when ready.

@Fryguy Fryguy mentioned this pull request Jul 12, 2017
@Fryguy
Copy link
Member

Fryguy commented Jul 12, 2017

@skateman I commented over on #81 (comment) to keep the discussion in one place.

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

Once ManageIQ/manageiq-ui-classic#1682 is green, I'll run the script manually to update the bower-dev branch, and merge that PR. Then, we can merge this, and once GITHUB_AUTH is there, it should update the branch automagically :).

@Fryguy
Copy link
Member

Fryguy commented Jul 13, 2017

Oh I can make the GITHUB_AUTH now, I just have to remember how 😂

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

@skateman You'll also want to remove

!dist/js/ui-components.js.map
!dist/css/ui-components.css.map

from .gitignore..

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

Ran the script manually, pushed to the bower-dev branch, restarting travis on ManageIQ/manageiq-ui-classic#1682 ..

@himdel himdel mentioned this pull request Jul 13, 2017
@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

@skateman We probably also want to add

branches:
  except:
  - bower-dev

to .travis.yml, so that Travis stops trying to fail running tests on that branch :)

@skateman
Copy link
Member Author

@himdel if Travis is configured to build only when a .travis.yml is present, then you won't need that.

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

@himdel if Travis is configured to build only when a .travis.yml is present, then you won't need that.

Ok.. @Fryguy can you do that please? Or should we just add it to .travis.yml? :)

@skateman
Copy link
Member Author

Well, then we need the .travis.yml into the bower-dev branch, so easier to flip the switch 😉

@himdel himdel mentioned this pull request Jul 13, 2017
@Fryguy
Copy link
Member

Fryguy commented Jul 13, 2017

ok GITHUB_AUTH is created.

@Fryguy
Copy link
Member

Fryguy commented Jul 13, 2017

if Travis is configured to build only when a .travis.yml is present

That is the current configuration, however you may want it anyway if you decide to create things like dev branches or whatever.

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

Ok, merged the ui-classic PR, seems like the branch is working :).

So.. merging, and we should watch travis to see if it works there as well..

@himdel himdel merged commit d6060d3 into ManageIQ:master Jul 13, 2017
@himdel himdel self-assigned this Jul 13, 2017
@himdel himdel added the build label Jul 13, 2017
@Fryguy
Copy link
Member

Fryguy commented Jul 13, 2017

@skateman @himdel, we may want a README.md on that new branch to describe its purpose and how it works and whatnot.

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

@Fryguy Agreed, will do :)

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

@Fryguy I'm pretty sure Travis is attempting to run on all the branches now, regardless of .travis.yml presence.

https://travis-ci.org/ManageIQ/ui-components/builds/253175668#L6

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

@skateman So.. not sure if it works .. https://travis-ci.org/ManageIQ/ui-components/builds/253258727#L1346 would seem to indicate that yes, it ran perfectly... But I'm not seeing the commit appearing on that branch.

Not sure if we can drop that &> /dev/null temporarily without exposing the auth credential....

@skateman
Copy link
Member Author

@himdel we can't 😉

@skateman skateman deleted the bower-dev-build branch July 13, 2017 16:11
@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

Debugging by temporarily adding a git status before that commit .. and a git log -p -1 after.. 8a852d5

(The idea being that nothing added to commit but untracked files present sounds wrong.)

Travis: https://travis-ci.org/ManageIQ/ui-components/builds/253278676

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

+git add -f dist/css/ui-components.css dist/css/ui-components.css.map
+git add -f dist/js/ui-components.js dist/js/ui-components.js.map
+git add -f bower.json
+git status
On branch bower-dev
Your branch is up-to-date with 'upstream/bower-dev'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	coverage/
	dist/tmp/
	node_modules/
nothing added to commit but untracked files present (use "git add" to track)
+git commit -m 'Automated build from 8a852d52855036690f5928303c28e2a33d479748'
On branch bower-dev
Your branch is up-to-date with 'upstream/bower-dev'.
Untracked files:
	coverage/
	dist/tmp/
	node_modules/
nothing added to commit but untracked files present
+git log -p -1
commit 8890257d674dba48715eee743afed899be899390
Author: Martin Hradil <[email protected]>
Date:   Thu Jul 13 15:50:22 2017 +0000
    add README.md

So, yup, the commit didn't happen, but there's probably nothing wrong. Turns out, you need actual code changes for the compiled code to change :D.

Trying that once I find a mergable PR...

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

aaah.. found the problem...

+mv -f tmp dist
...
Untracked files:
        ...
	dist/tmp/

mv tmp dist doesn't do the right thing if dist/ already exists..

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

+git add -f dist/css/ui-components.css dist/css/ui-components.css.map
+git add -f dist/js/ui-components.js dist/js/ui-components.js.map
+git add -f bower.json
+git status
On branch bower-dev
Your branch is up-to-date with 'upstream/bower-dev'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)
	modified:   dist/js/ui-components.js.map
Untracked files:
  (use "git add <file>..." to include in what will be committed)
	coverage/
	dist/assets/
	dist/css/demo-app.css
	dist/css/demo-app.css.map
	dist/css/vendor.css
	dist/data/
	dist/index.html
	dist/js/demo-app.js
	dist/js/demo-app.js.map
	dist/js/vendor.js
	node_modules/
+git commit -m 'Automated build from a2184056e66ca016a3d280c956a5693f2ba3e71d'
[bower-dev 6c4bad1] Automated build from a2184056e66ca016a3d280c956a5693f2ba3e71d
 1 file changed, 1 insertion(+), 1 deletion(-)
+git log -p -1
commit 6c4bad14f7235bc2c5d3c2ecb23e4e2edd1882a8
Author: Travis CI User <[email protected]>
Date:   Thu Jul 13 17:00:13 2017 +0000
    Automated build from a2184056e66ca016a3d280c956a5693f2ba3e71d

Sounds better, the commit was actually created now :).

...after the diff...
+set +x
git push origin HEAD:bower-dev
Done. Your build exited with 0.

Which would sound perfect, except for the fact I can't see it in https://github.com/ManageIQ/ui-components/commits/bower-dev :(

@himdel
Copy link
Contributor

himdel commented Jul 13, 2017

Any chance you need to push HEAD:bower-dev instead of just bower-dev? Or something?

Either way, going for today, for now as a workardound, all the mergers can run the script manually to update the branch.. but we'll need to figure this out :)

@Fryguy
Copy link
Member

Fryguy commented Jul 13, 2017

I don't think you need the -f part of the git push -f. You are doing a normal commit, not force pushing. In fact, the -f could cause other problems if we protect the branch.

@Fryguy
Copy link
Member

Fryguy commented Jul 13, 2017

The idea being that nothing added to commit but untracked files present sounds wrong.

This could definitely happen if the changes in the PR are things like README changes that would not change the dist at all. I think the script needs to handle this case.

@himdel
Copy link
Contributor

himdel commented Jul 14, 2017

Removing that -f .. https://travis-ci.org/ManageIQ/ui-components/builds/253542693

I think the script needs to handle this case.

Looks like it alrady handles that case :D.

@himdel
Copy link
Contributor

himdel commented Jul 14, 2017

So.. I've updated the script to output $? after commit and push, just to verify the push isn't succeeding somewhere.. but I'm pretty much stumped. As in, can't continue without seeing the actual error message from git push.. @Fryguy I think you'll have to look into this, sorry :).

The script works, both on travis and locally, if I run the same with --dry-run and my credentials, the push pretends to succeed, so .. possibly a wrong GITHUB_AUTH value, or wrong syntax, or a leading/trailing space in the value or something like that...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Splitting dist/ from git
3 participants