I am new to Jenkins, I have a React js application where it is hosted on Amazon S3. So I wanted to make a CI/CD pipeline using Jenkins. Most of the part is done but I am stuck at the last step. Connecting Jenkins with Amazon S3. I am able to get the updated code from Github and generate a build file in the Jenkins server. Now I wanted to move this new build file to AWS S3 for static website hosting.
I hosted my Jenkins server on EC2 Instance.
Can anyone help me to achieve this? Thanks in advance
You have 2 solution to implement
1.configure aws cli on Jenkins Slave or Master where you are running build and in jenkins Step Run command to copy those file to s3bucket
ex: aws s3 cp
https://docs.aws.amazon.com/cli/latest/reference/s3/cp.html
You can use s3 publisher plugin to copy artifact to bucket
Related
Here, I am trying to deploy my build folder to AWS EC2 using GitHub actions workflows. The react app build works successfully. But the build folder could not be deployed to the target. Below is the error when scp copies the build folder to the location.
Is that issue with scp or with the .pem file?
Need to copy the build folder in the reactjs app after successful build to an AWS EC2 instance.
Your problem has little to do with AWS EC2 or GitHub actions. You are seeing a generic SSH (SCP) error. It's likely a problem with your private key. One thing you could try is to make sure the key file permissions are 400: chmod 400 private_key.pem.
I have built an app using NextJS
I would like to deploy the app on an Azure App service
the deployment WORKS on the Vercel server without any customization
I am using the DevOps tools: Pipelines and Release features
the issue
The deployment on the "Azure App Service" fails because:
The zip file containing the deployed version of the app IS NOT unzipped under the site/wwwroot directory
QUESTION: which is the missing task that will deploy the zip file into the wwwroot directory?
here is the zip file uploaded by the Release' job
here is the Pipeline description
here is the Release description
It seems the ZIP is being deployed in "run from package" mode. This should usually not be a problem. It is probably not running because something else removes the AppSetting WEBSITE_RUN_FROM_PACKAGE, or because the app needs write access to the file system.
You can either unzip the artifact before deploying with Extract Files, or try to force a different deployment method by tinkering with either the App Service Deploy task or the Azure Web App task.
created a sample react application which is running in localhost:3000. Now i need to host the same react application in sharepoint online. Any solutions to this.
Please check the steps in the blog below:
Build And Deploy The Client Side Web Part (SPFx) In SharePoint Online
1) Once you are done with the your local development, we need to configure a CDN path where we can host our files.
Go to the config > write-manifests.json file.
Here, enter your CDN path. It should be a path that can be accessible by the end users. It could be Azure or SharePoint or any thing else.
Modify it as below (sample code) and save the file:
{
"$schema": "https://dev.office.com/json-schemas/spfx-build/write-manifests.schema.json",
"cdnBasePath": ""
}
2) Now, you need to generate the files to be deployed.
For that run the below command:
gulp bundle –-ship
After this is done, you will find the a temp > deploy folder inside your solution as below:
Once this is generated, upload all the files inside the deploy folder to your CDN or Site Assets (as in our case). This task can also automated using advanced gulp tasks.
3) Now, we will create spapp file to be uploaded to app catalog.
For that, run the below command:
gulp package-solution –-ship
This will generate an sppkg file inside sharepoint folder as below:
Upload it to the app catalog. SharePoint will show you a popup and ask you to trust the client-side solution to deploy.
Click Deploy.
After that, you can add it like you add an App in a SharePoint site.
I'm trying to deploy a monorepo of 2 react packages (repos) where each package is deployed to different aws s3 bucket , is it possible ?
package A to be deployed to api.mywebsite.com
package B to be deployed to www.mywebsite.com
Welcome to Stackoverflow!
I suggest you do the following
In your build step create two artifacts (e.g. api, web). For example, if your npm build creates a ./build directory, do cp -r build api for the api project and similar for the web project
In your deployment step do something like aws s3 cp api s3://api.mywebsite.com --recursive or aws s3 sync api s3://api.mywebsite.com and same for the web artifact
I have no knowledge about deployment, production server, web server, etc. But I have a web application and my boss wants to deploy it in order to access it by web browser.
So, my application was generated by Spring Initializr.
It's using Spring (Boot, Security, Web, Data JPA), with web service REST (#RestController), HTML templates and AngularJS.
With mvn clean package, I generated a JAR file of this application. It is working on my desk. But, how can I deploy it?
I believe that my company has an OVH hosting. Can I install JBOSS or Tomcat on it, and upload my JAR on OVH?
You can deploy your application on Tomcat but you need to have a war instead of a jar to run it on an existing application server.
You can read the following documentation to create the war : http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#build-tool-plugins-maven-packaging
Once done, you just have to upload it on the server in the webapps directory of your tomcat server.