0

I'm wondering how to deploy artifacts to Artifactory's Distribution repo . Pushing directly to the distribution repo from gradle (using the gradle-maven plugin) results in the following error:

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':artifactoryDeploy'.
> java.io.IOException: Failed to deploy file. Status code: 404 Response message: Artifactory returned the following errors: 
  Could not find a local repository named my-distribution-repo to deploy to. Status code: 404

Seems I can't push to a repo that's not a local repo. Any ideas?

Nelson Ramirez
  • 7,864
  • 7
  • 28
  • 34

1 Answers1

3

You can push to a local repository and then distribute the build to a distribution repository.

For example, with the JFrog CLI you can distribute in 3-4 steps:

  1. Building a Gradle project.
  2. Publishing the build information.
  3. Promoting the build (Optional).
  4. Distributing the build.
yahavi
  • 5,149
  • 4
  • 23
  • 39
  • Thanks, I'll go the CLI route. kinda miffed that these new distribution repos can't be automated. :/ – Nelson Ramirez Sep 06 '19 at 20:38
  • All of this can be automated when put in a CI/CD server. Artifactory is well suited for working in teams. For example - 1. Developer pushes a commit in Git 2. The CI server build and publishes the build info. 3. The QA team approves the fix by promoting the build to the release repository. Steps 1-3 are repeated until the product is ready for release. 4. The release-build is distributed to Bintray. – yahavi Sep 07 '19 at 07:58
  • Yes, but there is no way to push directly to one of these new distribution repos. At least i haven't found a way to do so. If you know how to push directly to a distribution repo (like you can easily to do a local repo) please let me know – Nelson Ramirez Sep 09 '19 at 15:39