Hi there,
-- This might be useful for someone out there trying to implement CI for an Amber app. I was having an issue to make jenkins build an amber project that was happening only to jekings trying to get the app built. Strangely, doing it 'by hand" (1) with the jenkins user (2) in the same host that builds and (3) in the right folder, all builds nominal and I could get `the.js` being generated as expected. But... When jenkins tried to build with its job, it throws an exception right after the `grunt deploy` These were the commands that it was using to build the frontend of the app: npm install bower install amber config grunt deploy grunt cp deploy.html index.html And here is the part of the log that differs from what I see when I do it manually in a terminal: ``` Welcome to Amber version 0.15.0-pre (NodeJS 0.10.25). [4mRunning "amdconfig:app" (amdconfig) task [24m [4mRunning "requirejs:deploy" (requirejs) task [24m Error: ENOENT, no such file or directory '/var/lib/jenkins/workspace/projectName/frontend/src/App.js' In module tree: deploy { [Error: Error: ENOENT, no such file or directory '/var/lib/jenkins/workspace/projectName/frontend/src/App.js' In module tree: deploy at Object.fs.openSync (fs.js:432:18) ] originalError: { [Error: ENOENT, no such file or directory '/var/lib/jenkins/workspace/projectName/frontend/src/App.js'] errno: 34, code: 'ENOENT', path: '/var/lib/jenkins/workspace/projectName/frontend/src/App.js', syscall: 'open', fileName: '/var/lib/jenkins/workspace/projectName/frontend/src/App.js', moduleTree: [ 'deploy' ] } } [4mRunning "amberc:all" (amberc) task [24m Resolving: src/App.st Resolving: boot.js Resolving: Kernel-Objects.js Resolving: Kernel-Classes.js Resolving: Kernel-Methods.js ... Reading: src/App.st Compiling collected .st files Verifying if all .st files were compiled Compile Time: 20419ms [32mDone, without errors. [39m Enjoy your fresh frontend! ``` The solution was to run `grunt` before `grunt deploy` and after, so now the commands to get the frontend built are: npm install bower install amber config grunt grunt deploy grunt cp deploy.html index.html You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Sebastian,
thanks for reporting this sequence.... npm install bower install amber config grunt grunt deploy grunt cp deploy.html index.html --Hannes On 3/8/15, Sebastian Sastre <[hidden email]> wrote: > Hi there, > > This might be useful for someone out there trying to implement CI for an > Amber app. > > I was having an issue to make jenkins build an amber project that was > happening only to jekings trying to get the app built. > > Strangely, doing it 'by hand" (1) with the jenkins user (2) in the same > host that builds and (3) in the right folder, all builds nominal and I > could get `the.js` being generated as expected. > > But... > > When jenkins tried to build with its job, it throws an exception right > after the `grunt deploy` > > > These were the commands that it was using to build the frontend of the app: > > npm install > bower install > amber config > grunt deploy > grunt > cp deploy.html index.html > > And here is the part of the log that differs from what I see when I do it > manually in a terminal: > > ``` > Welcome to Amber version 0.15.0-pre (NodeJS 0.10.25). > [4mRunning "amdconfig:app" (amdconfig) task [24m > > [4mRunning "requirejs:deploy" (requirejs) task [24m > Error: ENOENT, no such file or directory > '/var/lib/jenkins/workspace/projectName/frontend/src/App.js' > In module tree: > deploy > > { [Error: Error: ENOENT, no such file or directory > '/var/lib/jenkins/workspace/projectName/frontend/src/App.js' > In module tree: > deploy > > at Object.fs.openSync (fs.js:432:18) > ] > originalError: > { [Error: ENOENT, no such file or directory > '/var/lib/jenkins/workspace/projectName/frontend/src/App.js'] > errno: 34, > code: 'ENOENT', > path: '/var/lib/jenkins/workspace/projectName/frontend/src/App.js', > syscall: 'open', > fileName: > '/var/lib/jenkins/workspace/projectName/frontend/src/App.js', > moduleTree: [ 'deploy' ] } } > [4mRunning "amberc:all" (amberc) task [24m > Resolving: src/App.st > Resolving: boot.js > Resolving: Kernel-Objects.js > Resolving: Kernel-Classes.js > Resolving: Kernel-Methods.js > ... > Reading: src/App.st > Compiling collected .st files > Verifying if all .st files were compiled > Compile Time: 20419ms > > [32mDone, without errors. [39m > > Enjoy your fresh frontend! > ``` > > The solution was to run `grunt` before `grunt deploy` and after, so now the > > commands to get the frontend built are: > > npm install > bower install > amber config > grunt > grunt deploy > grunt > cp deploy.html index.html > > > > > -- > You received this message because you are subscribed to the Google Groups > "amber-lang" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [hidden email]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
The question however is
I thought 'amber config' is called by 'grunt' and it is not necessary to call it explicitly. I think the correct sequence of commands for deployment should go into an FAQ. --Hannes On 3/9/15, H. Hirzel <[hidden email]> wrote: > Sebastian, > > thanks for reporting this sequence.... > > npm install > bower install > amber config > grunt > grunt deploy > grunt > cp deploy.html index.html > > --Hannes > > On 3/8/15, Sebastian Sastre <[hidden email]> wrote: >> Hi there, >> >> This might be useful for someone out there trying to implement CI for an >> Amber app. >> >> I was having an issue to make jenkins build an amber project that was >> happening only to jekings trying to get the app built. >> >> Strangely, doing it 'by hand" (1) with the jenkins user (2) in the same >> host that builds and (3) in the right folder, all builds nominal and I >> could get `the.js` being generated as expected. >> >> But... >> >> When jenkins tried to build with its job, it throws an exception right >> after the `grunt deploy` >> >> >> These were the commands that it was using to build the frontend of the >> app: >> >> npm install >> bower install >> amber config >> grunt deploy >> grunt >> cp deploy.html index.html >> >> And here is the part of the log that differs from what I see when I do it >> manually in a terminal: >> >> ``` >> Welcome to Amber version 0.15.0-pre (NodeJS 0.10.25). >> [4mRunning "amdconfig:app" (amdconfig) task [24m >> >> [4mRunning "requirejs:deploy" (requirejs) task [24m >> Error: ENOENT, no such file or directory >> '/var/lib/jenkins/workspace/projectName/frontend/src/App.js' >> In module tree: >> deploy >> >> { [Error: Error: ENOENT, no such file or directory >> '/var/lib/jenkins/workspace/projectName/frontend/src/App.js' >> In module tree: >> deploy >> >> at Object.fs.openSync (fs.js:432:18) >> ] >> originalError: >> { [Error: ENOENT, no such file or directory >> '/var/lib/jenkins/workspace/projectName/frontend/src/App.js'] >> errno: 34, >> code: 'ENOENT', >> path: '/var/lib/jenkins/workspace/projectName/frontend/src/App.js', >> syscall: 'open', >> fileName: >> '/var/lib/jenkins/workspace/projectName/frontend/src/App.js', >> moduleTree: [ 'deploy' ] } } >> [4mRunning "amberc:all" (amberc) task [24m >> Resolving: src/App.st >> Resolving: boot.js >> Resolving: Kernel-Objects.js >> Resolving: Kernel-Classes.js >> Resolving: Kernel-Methods.js >> ... >> Reading: src/App.st >> Compiling collected .st files >> Verifying if all .st files were compiled >> Compile Time: 20419ms >> >> [32mDone, without errors. [39m >> >> Enjoy your fresh frontend! >> ``` >> >> The solution was to run `grunt` before `grunt deploy` and after, so now >> the >> >> commands to get the frontend built are: >> >> npm install >> bower install >> amber config >> grunt >> grunt deploy >> grunt >> cp deploy.html index.html >> >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "amber-lang" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [hidden email]. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
H. Hirzel wrote: > The question however is > > I thought 'amber config' is called by 'grunt' and it is not necessary > to call it explicitly. Yes, `amber config` is unnecessary. Also, `cp deploy.html index.html` is against the amber project philosophy - there should _not_ be special versions of .html files for deployment. I would even doubt the need of two `grunt` commands, as `grunt deploy` does not delete anything. The first one should be enough. > > I think the correct sequence of commands for deployment should go into an FAQ. > > --Hannes > > On 3/9/15, H. Hirzel<[hidden email]> wrote: >> Sebastian, >> >> thanks for reporting this sequence.... >> >> npm install >> bower install >> amber config >> grunt >> grunt deploy >> grunt >> cp deploy.html index.html >> >> --Hannes >> >> On 3/8/15, Sebastian Sastre<[hidden email]> wrote: >>> Hi there, >>> >>> This might be useful for someone out there trying to implement CI for an >>> Amber app. >>> >>> I >>> happening only to jekings trying to get the app built. >>> >>> Strangely, doing it 'by hand" (1) with the jenkins user (2) in the same >>> host that builds and (3) in the right folder, all builds nominal and I >>> could get `the.js` being generated as expected. >>> >>> But... >>> >>> When jenkins tried to build with its job, it throws an exception right >>> after the `grunt deploy` >>> >>> >>> These were the commands that it was using to build the frontend of the >>> app: >>> >>> npm install >>> bower install >>> amber config >>> grunt deploy >>> grunt >>> cp deploy.html index.html >>> >>> And here is the part of the log that differs from what I see when I do it >>> manually in a terminal: >>> >>> ``` >>> Welcome to Amber version 0.15.0-pre (NodeJS 0.10.25). >>> [4mRunning "amdconfig:app" (amdconfig) task [24m >>> >>> [4mRunning "requirejs:deploy" (requirejs) task [24m >>> Error: ENOENT, no such file >>> '/var/lib/jenkins/workspace/projectName/frontend/src/App.js' >>> In module tree: >>> deploy >>> >>> { [Error: Error: ENOENT, no such file or directory >>> '/var/lib/jenkins/workspace/projectName/frontend/src/App.js' >>> In module tree: >>> deploy >>> >>> at Object.fs.openSync (fs.js:432:18) >>> ] >>> originalError: >>> { [Error: ENOENT, no such file or directory >>> '/var/lib/jenkins/workspace/projectName/frontend/src/App.js'] >>> errno: 34, >>> code: 'ENOENT', >>> path: '/var/lib/jenkins/workspace/projectName/frontend/src/App.js', >>> syscall: 'open', >>> fileName: >>> '/var/lib/jenkins/workspace/projectName/frontend/src/App.js', >>> moduleTree: [ 'deploy' ] } } >>> [4mRunning "amberc:all" (amberc) task [24m >>> Resolving: src/App.st >>> Resolving: boot.js >>> Resolving: Kernel-Objects.js >>> Resolving: Kernel-Classes.js >>> Resolving: Kernel-Methods.js >>> ... >>> Reading: src/App.st >>> Compiling >>> Verifying if all .st files were compiled >>> Compile Time: 20419ms >>> >>> [32mDone, without errors. [39m >>> >>> Enjoy your fresh frontend! >>> ``` >>> >>> The solution was to run `grunt` before `grunt deploy` and after, so now >>> the >>> >>> commands to get the frontend built are: >>> >>> npm install >>> bower install >>> amber config >>> grunt >>> grunt deploy >>> grunt >>> cp deploy.html index.html >>> >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "amber-lang" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [hidden email]. >>> For more options, visit https://groups.google.com/d/optout. >>> > -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |