DEV Community

Discussion on: Deploying your first ReactJS application into the Cloud

Collapse
 
richardcharlesclarke profile image
richardcharlesclarke

This is super clear - thanks. Question: if i have deployed a working react app on the IBM cloud, can i make changes (using my .git.cloud.ibm.com repo) and expect to see those changes once the toolchain has (automatically) built and deployed the updated app? I have tried this without success. What am i missing - do i need to manually build the app first? Isn't that what the toolchain is doing before deploying? I'd really appreciate some adivce.

Collapse
 
bradstondev profile image
Bradston Henry

Hi Richard.

So from my experience using the toolchain, whenever you push new working/buildable code to your repo and if the hooks are correctly setup in your tool chain, it should initiate the build -> deploy process.

Could you give me a bit more insight into your problem? Are you seeing errors in your pipeline deployment or is it simply not working/initiating at all when you make changes to your source code?

Also, would you be okay with creating a new Dev.to post asking for help on this issue so we can discuss further on that post. You can just post the link to that post in this thread. For example, something like this: dev.to/baenencalin/how-can-i-detec...

Collapse
 
richardcharlesclarke profile image
richardcharlesclarke

sure ^ will do now

Thread Thread
 
richardcharlesclarke profile image
richardcharlesclarke

Hmm i see creating a post will take me a little time to write properly. So in the meantime i'll answer your immediate q.

Forgive the my rather slack use of terminology here - i'm a scientist not a developer, so these concepts are, as of this week, all new to me.

I have a working app built in react, (it builds, deploys ... works)
I have the code in my IBM repo
I edit the code (from src) in my repo, then commit etc.
From what i have read, the toolchain is supposed to build the app, then deploy it automatically after any commit.
The build and deploy process in the toolchain all seem to work, no errors.
The app site is, however, still the old build. Changes i make 'outside' the build (like to the index file at the root of the app) are all there, but the app clearly hasn't re-built from the src folder.
When, following your excellent post above, i edit the code locally, then build (npm run build) then push to cf, i was able to see the changes i had made - leading me to assume that the code in my IBM repo wasn't being built by the toolchain (tho as i say, it's clear that some changes i'm making to it are being seen).

I was trying to do this all thru the IBM site, and on failing, discovered your post. This allowed me to somewhat overcome my fear of the terminal/CLI - which means i solved the immediate problem (i can develop the app and build and push and see the changes).

To summarise my question then - it would be nice to understand why the 'build' process in the IBM toolchain doesn't seem to actually build the app?

Thread Thread
 
bradstondev profile image
Bradston Henry

Ahh.. I see. Once you get the post written up. We'll discuss further. And if you want, you can copy and paste what you just wrote above as the body of your new post. I think it will suffice. I think i'm getting to understand the issue.

Thanks for the clarification.