Adds support to upload and download maven packages from/to GitLab
What does this MR do?
Adds support to upload and download maven packages from GitLab.
- I tested upload with for both
mvn deploy
andmvn release:perform
. - EEP feature; must be enabled in config
- Uses workhorse file upload
- Should be compatible with object storage
Why was this MR needed?
So people can add GitLab to their pom.xml
file and upload/download packages from GitLab
How to test
- Checkhout this branch
- Get workhorse changes gitlab-workhorse!283 (comment 91229181)
- Setup
~/.m2/settings.xml
with username and token. See doc in diff for example - Create maven project and add GitLab repo to
pom.xml
. See doc in diff for example
Screenshots (if relevant)
No UI here. UI is in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6781/diffs
Here is terminal output from mvn deploy
:
dzaporozhets:~/Projects/mvn-example master
→ mvn deploy
...
[INFO] --- maven-install-plugin:2.4:install (default-install) @ my-app ---
[INFO] Installing /Users/dzaporozhets/Projects/mvn-example/target/my-app-1.1-SNAPSHOT.jar to /Users/dzaporozhets/.m2/repository/com/mycompany/app/my-app/1.1-SNAPSHOT/my-app-1.1-SNAPSHOT.jar
[INFO] Installing /Users/dzaporozhets/Projects/mvn-example/pom.xml to /Users/dzaporozhets/.m2/repository/com/mycompany/app/my-app/1.1-SNAPSHOT/my-app-1.1-SNAPSHOT.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ my-app ---
Downloading from gitlab-maven: http://localhost:3001/api/v4/projects/1/packages/maven/com/mycompany/app/my-app/1.1-SNAPSHOT/maven-metadata.xml
Downloaded from gitlab-maven: http://localhost:3001/api/v4/projects/1/packages/maven/com/mycompany/app/my-app/1.1-SNAPSHOT/maven-metadata.xml (767 B at 118 B/s)
Uploading to gitlab-maven: http://localhost:3001/api/v4/projects/1/packages/maven/com/mycompany/app/my-app/1.1-SNAPSHOT/my-app-1.1-20180806.161455-3.jar
Uploaded to gitlab-maven: http://localhost:3001/api/v4/projects/1/packages/maven/com/mycompany/app/my-app/1.1-SNAPSHOT/my-app-1.1-20180806.161455-3.jar (2.6 kB at 3.3 kB/s)
Uploading to gitlab-maven: http://localhost:3001/api/v4/projects/1/packages/maven/com/mycompany/app/my-app/1.1-SNAPSHOT/my-app-1.1-20180806.161455-3.pom
Uploaded to gitlab-maven: http://localhost:3001/api/v4/projects/1/packages/maven/com/mycompany/app/my-app/1.1-SNAPSHOT/my-app-1.1-20180806.161455-3.pom (2.0 kB at 3.1 kB/s)
Downloading from gitlab-maven: http://localhost:3001/api/v4/projects/1/packages/maven/com/mycompany/app/my-app/maven-metadata.xml
Downloaded from gitlab-maven: http://localhost:3001/api/v4/projects/1/packages/maven/com/mycompany/app/my-app/maven-metadata.xml (319 B at 809 B/s)
Uploading to gitlab-maven: http://localhost:3001/api/v4/projects/1/packages/maven/com/mycompany/app/my-app/1.1-SNAPSHOT/maven-metadata.xml
Uploaded to gitlab-maven: http://localhost:3001/api/v4/projects/1/packages/maven/com/mycompany/app/my-app/1.1-SNAPSHOT/maven-metadata.xml (767 B at 1.1 kB/s)
Uploading to gitlab-maven: http://localhost:3001/api/v4/projects/1/packages/maven/com/mycompany/app/my-app/maven-metadata.xml
Uploaded to gitlab-maven: http://localhost:3001/api/v4/projects/1/packages/maven/com/mycompany/app/my-app/maven-metadata.xml (319 B at 50 B/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.331 s
[INFO] Finished at: 2018-08-06T19:15:04+03:00
[INFO] Final Memory: 16M/55M
[INFO] ------------------------------------------------------------------------
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Conforms to the code review guidelines
- [-] Has been reviewed by a UX Designer
- [-] Has been reviewed by a Frontend maintainer
-
Has been reviewed by a Backend maintainer -
Has been reviewed by a Database specialist
-
EE specific content should be in the top level /ee
folder -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
If you have multiple commits, please combine them into a few logically organized commits by squashing them - [-] Internationalization required/considered
-
If paid feature, have we considered GitLab.com plan and how it works for groups and is there a design for promoting it to users who aren't on the correct plan -
End-to-end tests pass ( package-and-qa
manual pipeline job)
What are the relevant issue numbers?
Closes #5811 (closed)
Edited by Dmytro Zaporozhets (DZ)
Merge request reports
Activity
Please register or sign in to reply