0

I want to try to upload any set of artifacts from any type of project ( Java, node, PHP, .net, go ).

I know that once a developer pushes a code to git, Jenkins should take it and run the test case on it.

If it is success then push it to production? Am I right? I'm not sure about the flow.

I wonder how Nexus and Maven ( is it needed, if so why? ) will come into a picture of DevOps flow?

I know Nexus it's repository manager ( which store artifacts [ final executable file after code compilation ( which we can see in Java, go but not in PHP or node ) ] ) please, correct me if I wrong.

Do I need Maven?

2

No, you don't need maven.

Maven is a build automation tool as ant and gradle are, generally, but not limited to, jvm based projects.

Nexus is an artifact repository, but some others exists. Artifact repositories software have different set of features (license, different storage options, different repositories type support like gems or npm ..., search support, web interface ...).

I know that once a developer pushes a code to git, Jenkins should take it and run the test case on it.

If it is success then push it to production? Am I right? I'm not sure about the flow.

Generally, in order to achieve continuous deployment, which is what you are asking for precisely here, you would:

  1. setup a hook when you commit
  2. have a continuous integration tool that receive the hook
  3. the CI does whatever needs to be done for the project to be tested / build / runnable
  4. the CI deploys the previously built software

Jenkins, for example, supports pipeline as code, it would allow you to put a Jenkinsfile in your repository, that would tell Jenkins how to do step 3 and 4 (travis and circleCI and others CI also supports this).

You can tell your CI in steps 3 to upload some artifacts to an artifact repository and on step 4, to retrieve them in order to deploy the software, but you don't need to.

My advice would be to design your CD system the simplest way you can, don't introduce not necessary parts like an artifact repository if you don't need it, add it when you face a problem that needs it.

As a first step, your CI, can during the deployment steps, simply copy your artifacts to the target server.

  • I have regularly seen people call a 'maven repository's dependency' a 'maven dependency' and some people incorrectly don't distinguish between the repository/repository manger and the type of repository that is being hosted. – Cinderhaze May 31 at 17:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.