

A great way to perform continuous integration with angular CLI and Jenkins
source link: https://www.codesd.com/item/a-great-way-to-perform-continuous-integration-with-angular-cli-and-jenkins.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

A great way to perform continuous integration with angular CLI and Jenkins
I trying to configure a correct way to perform a continious integration with Angular CLI.
Just for fun, I manage my Jenkins in Windows and I have created a test project with Angular CLI.
This project is bound to Bitbucket remote and I using Sourcetree as version control system.
But I have multiple questions about the correct workflow to apply because i'm pretty confused.
1) Angular CLI allow us to build a project with command ng build
. It create a folder named dist
. Ok, but this folder is ignored in .gitignore
, why ? I mean, I need this folder because this is used by my Jenkins job for deploy it across FTP in my domain, no ? If the folder is ignored, it will not be available in remote bitbucket, so unusable by Jenkins.
2) Jenkins is used to perform some tasks for the deployment. It shouldn't be used to do the same thing like ng build
? In my mind, the concat, minification, etc... should be integrate in the job task, do I 'm right ? According this with split the "build" task ?
I need some clarification. This is the first time that I'm doing this.
Thank's you.
the build artifacts, generated code, compiled classes...etc. are NOT source controlled as a best practice. the source code is your source of truth, so anything you can build/preprocess from there is ignored from source control. typically, your the jobs in your build pipeline package your application/artifacts and deploy it some repository for future use or delivery, or archive via Jenkins.
in Jenkins, you can specify downstream jobs that can be manually or automatically triggered depending on the configuration. I personally prefer to have a base initial build job that gets triggered by SCM via a service hook when there is a push, which builds the artifacts/app first, and also archive the build artifacts to an artifact repository. you can have a downstream delivery job that can do the deployment of the build artifacts and here you can utilize several Jenkins plugins for the deployment depending on your use case. By the way, once you setup upstream/downstream relations in the build jobs, you can create a pipeline view by selecting the initial job. it creates a nice view of the pipeline.
I recommend you to also take a look at Jenkis downstream job fails to find upstream artifacts stackoverflow question. I hope this answers your question.
Recommend
-
56
-
33
You write unit tests for your code, but do you run all your tests whenever you add new code and tests? Or at least, just before you push a commit to your repository? As your app grows, the number of unit tests gro...
-
16
Jenkins is an open-source continuous integration and delivery system designed to ensure build and deploy automation. It is well...
-
6
Continuous Integration is the most important part of DevOps that is used to integrate various DevOps stages. Jenkins is the most famous Continuous Integration tool, I know...
-
9
Perform 2021 - Imperial Dade sets its sights on continuous planning with Planful Read later ...
-
6
Tutorial How To Set Up Continuous Integration Pipelines in Jenkins on Ubuntu 20.04 Ubuntu
-
5
Universal Parallel Accounting – Key to perform continuous accounting parallelly This blog is on Universal Parallel Accounting (UPA) that SAP has delivered in SAP S/4HANA 2022 and S/4HANA Cloud private edition. This functio...
-
13
Universal Parallel Accounting – Approach to perform continuous accounting parallelly This blog is on Universal Parallel Accounting (UPA) that SAP has delivered in SAP S/4HANA 2022 and S/4HANA Cloud private edition. This fu...
-
5
How to use continuous integration with Jenkins on OpenShift Skip to main content...
-
8
Continuous Integration in AWS Using Jenkins Pipelines: Best Practices and Strategies ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK