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

customized "action hook" that does something #46

Closed
thoraxe opened this issue Mar 6, 2015 · 5 comments
Closed

customized "action hook" that does something #46

thoraxe opened this issue Mar 6, 2015 · 5 comments

Comments

@thoraxe
Copy link
Contributor

thoraxe commented Mar 6, 2015

it would be great if someone could write an sti build script that does something "Viewable/observable" to demonstrate an action hook.

@bparees
Copy link

bparees commented Mar 6, 2015

I've created a version of ruby-hello that includes a custom assemble script here:
https://github.com/bparees/ruby-hello-world/tree/custom_sti

the custom assemble script adds an additional echo command:
https://github.com/bparees/ruby-hello-world/blob/custom_sti/.sti/bin/assemble#L48

you can use the repo/branch by updating the application-template-stibuild.json BuildConfig source to this:
"source": {
"git": {
"uri": "git://github.com/bparees/ruby-hello-world.git",
"ref": "custom_sti"
},
"type": "Git"
},

notice the use of the "ref" field to point to the specific branch.

(obviously I recommend you create your own fork/branch)

you will notice in the build logs two things:

  1. 2015-03-06T21:54:48.818206106Z I0306 21:54:48.818194 1 sti.go:181] Using assemble from upload/src/.sti/bin

which indicates it picked up the assemble script from the source repo instead of from the image.

  1. the build-logs output will contain the modified output from the custom assemble script:
    [2015-03-06T21:55:26.603110030Z] I0306 21:55:26.603090 1 sti.go:357] ---> CUSTOM STI ASSEMBLE COMPLETE

@bparees
Copy link

bparees commented Mar 10, 2015

@thoraxe can we close this?

@thoraxe
Copy link
Contributor Author

thoraxe commented Mar 11, 2015

About to look at it right now.

@thoraxe
Copy link
Contributor Author

thoraxe commented Mar 11, 2015

Just merged a PR into the main sample app codebase, so now I need to test the example.

@thoraxe
Copy link
Contributor Author

thoraxe commented Mar 11, 2015

Documented for beta2. Thanks!

@thoraxe thoraxe closed this as completed Mar 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants