Upload Build artifacts from Jenkins Pipeline to Sharepoint

Goutham Nithyananda

I have a requirement to upload the build artifacts to SharePoint at the end of the build. using jenkins pipeline.

I didn't find any plugin to achieve this.

My Jenkins instance is running on a Linux machine. Please suggest the best way to achieve this

Nikolay

I am using CLI for Microsoft 365 for this (available for linux as well). Looks somewhat like this:


m365 login --authType password --userName [email protected] --password pass@word1

m365 spo file add --webUrl https://contoso.sharepoint.com/sites/project-x --folder 'Shared Documents' --path 'C:\MS365.jpg'

https://pnp.github.io/cli-microsoft365/cmd/login/

https://pnp.github.io/cli-microsoft365/cmd/spo/file/file-add/

You may need to add special account to your sharepoint for your jenkins, or add an app password to be able to upload file from a daemon process (if your sharepoint requires MFA authentication)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Deploy artifacts in lastsuccesful build jenkins pipeline

Jenkins : Copy artifacts from Multibranch pipeline

How to Copy Artifacts from other Jenkins Job from a Pipeline?

Abort current build from pipeline in Jenkins

Build Job from Jenkins Pipeline with variable

How to build and upload docker-compose file inside jenkins pipeline

jenkins build multibranch pipeline from another multibranch pipeline

S3 Copy artifacts with Jenkins pipeline

How to parameterize selector for copy artifacts in Jenkins pipeline

What is the best practice for archiving Jenkins pipeline artifacts

Get artifacts URL after rtUpload in Jenkins pipeline

Curl 28 timeout when trying to upload a file to sharepoint through a curl request in a Jenkins Pipeline

Jenkins Pipeline Job Build

Jenkins Pipeline - Build with parameters

Paramertized Build - Jenkins Pipeline

Getting original filename from Jenkins pipeline file upload

How build artifacts are managed in Azure DevOps pipeline?

See Build Artifacts in Azure DevOps with YAML Pipeline

Azure pipeline build artifacts for previous builds

Want to read xml file from published artifacts in azure devops build pipeline

How to store jenkins build output with artifacts?

Set the build name and description from a Jenkins Declarative Pipeline

Jenkins Pipeline - Set process.env variable from build parameter

Jenkins pipeline - build a job with default input value from another job

How to get latest build number from another job in jenkins pipeline

Read android's versionName from build.gradle in Jenkins pipeline

How to extract version from build.gradle to a Jenkins pipeline

Jenkins Pipeline: Get build output from slave agent

How to package multiple MSI from same Jenkins build pipeline