Skip to main content

 


     Automated script - Upload front end artifacts to nexus



Hello Pal


Scenario : A FE developer working in an Angular project. He is building angular using angular build command and zip the output and upload to nexus and deploy using Jenkins or any tools.


I created some file which help a developer to do all this until upload to nexus with a single command.


This command programmatically upload angular atifacts to nexus using node


Repo : https://github.com/ratheeshspiral09/angularbuidtonexus


Steps to do that


1. Install dev dependencies 


 "web-nexus-deployer": "^1.0.2",

  "archiver": "^5.3.0"

  

2. Make sure the version key in package.json matches your release 

  verison eg: "version": "5.7.0"


3. Set NEXUS_USERNAME and NEXUS_PASSWORD as env variables in the 

  terminal like below or add it in .bashrc file.


`export NEXUS_USERNAME=username

 export NEXUS_PASSWORD=password`

 

4.Run npm run deploy-to-nexus in terminal


To customize any more please check build.js and deploy.js files


Working


Here build.js file will find the files for artifacts (here in dist folder) and convert it into zip deploy.js file will deploy the same zip to nexus based on the values given in that file like grouped, artificat id etc.


Comments

Popular posts from this blog

Artificial Intelligence - AI : The Overlord We've Always Wanted to Conquer the World!

 Artificial Intelligence (AI) has become a buzzword in recent years. Many people are apprehensive about the possibility of AI taking over the world, with Hollywood films portraying AI as evil and out to destroy humanity. However, the truth is that AI has the potential to revolutionize our lives and help us conquer the world in a positive way. AI can assist us in many areas, from healthcare to finance, transportation to agriculture, and beyond. One of the biggest benefits of AI is its ability to process vast amounts of data quickly and accurately. This means that AI can help us make better decisions based on data, leading to more efficient and effective outcomes. In healthcare, for example, AI can be used to analyze medical data and predict patient outcomes. This can help doctors and nurses make better decisions about patient care, leading to better outcomes for patients. AI can also be used to develop new drugs and treatments, accelerating medical research and helping us conquer di...

Building a Clockify Agent MCP Tool with Claude AI

  🚀 From Problem to Solution: Building a Clockify MCP Tool with AI The Problem That Started It All 🤔 As someone who tracks time for multiple projects, I was constantly switching between Claude (for work assistance) and Clockify (for time tracking). The manual back-and-forth was eating into my productivity. I thought: "What if Claude could directly manage my time entries?" What is MCP? (Model Context Protocol) 🔌 Think of MCP as a "universal translator" that lets AI assistants like Claude connect to your favorite tools. Instead of copy-pasting data between apps, Claude can now directly: Fill out your timesheets Create projects Generate reports Start/stop timers It's like giving your AI assistant hands to work with your tools! The Journey: Coding WITH Claude 💻 Here's where it gets interesting - I used Claude itself to build this integration! Using "vibe coding" (collaborative coding with AI), I: Researched together : Claude helped analyze Clockify...

ChatGPT4 for Software Testing

S oftware testing is an essential part of the software development process that ensures the quality of the software product before it is released to the market. With the latest advancements in Artificial Intelligence (AI), software testing has become more efficient, accurate, and automated. One such AI-powered tool is ChatGPT4, which can be used in the software testing field to improve the quality of testing and reduce human effort. ChatGPT4 is an advanced AI-powered language model that can generate human-like responses to any given prompt or question. It is trained on a large dataset of human language and can understand the context of the input and generate appropriate responses. In the software testing field, ChatGPT4 can be used in the following ways: 1. Test Case Generation: Test case generation is a crucial step in software testing. It involves creating test cases that can identify defects and errors in the software product. With ChatGPT4, test case generation can be automated by ...