Zip the directory in Pipeline

Dear all, I want to compress my static folder in pipeline. I have used the below command for that. but it is through an error as file not found. But using ls -la command able to print it.

zip -r xxx.zip xxx/xxxx/xxxx