Jenkins works well with Artifactory and the built artifact will be upload to the Artifactory repository automatically.
One day, i found that the artifact is built but it is not uploaded. The Linux server doesn’t have the desktop interface so i couldn’t upload the artifact through browser. An alternative way is to use the curl command to post the artifact to the repository.
curl -X POST <target url> --data <artifact>
Example:
curl -X POST http://localhost:8081/artifactory/dev-snapshot-local/eureka-v0.0.1.tar.gz --data eureka-v0.0.1.tar.gz
But sometimes we would like to have some backend endpoints for non-model actions. Here is a very good article written by Jeremy Satterfield about non-model endpoints on Django REST framework.
The Django REST framework offer us a few ways to implement the web service. Some of them are very convenience to use but in return giving you less flexibility. The following example will make use of the APIView class to create a custom GET request end point. Continue reading Django REST framework – Create endpoints for custom actions→
I would like to run the custom command in a regular interval. I could use Linux cronjob but it’s hard to manage and check the run history. It would be great if i could setup and manage these scheduled commands on the Django web portal.
django-chronograph, written by wnielson, is a Python Package which allows us to schedule any django-admin command through the web interface. It works well with the UTC timezone but if you have set the TIME_ZONE in your Django project setting.py, there would be time discrepancy.