Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e751fdd7
Commit
e751fdd7
authored
Oct 23, 2018
by
Joshua Lambert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update maven docs
parent
288cb1a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
11 deletions
+7
-11
doc/user/project/packages/maven_repository.md
doc/user/project/packages/maven_repository.md
+7
-11
No files found.
doc/user/project/packages/maven_repository.md
View file @
e751fdd7
...
@@ -74,7 +74,7 @@ To authenticate with a CI job token, add a corresponding section to your
...
@@ -74,7 +74,7 @@ To authenticate with a CI job token, add a corresponding section to your
<httpHeaders>
<httpHeaders>
<property>
<property>
<name>
Job-Token
</name>
<name>
Job-Token
</name>
<value>
CI_JOB_TOKEN
</value>
<value>
${env.CI_JOB_TOKEN}
</value>
</property>
</property>
</httpHeaders>
</httpHeaders>
</configuration>
</configuration>
...
@@ -152,7 +152,7 @@ shows how to create a new package each time the `master` branch is updated:
...
@@ -152,7 +152,7 @@ shows how to create a new package each time the `master` branch is updated:
<httpHeaders>
<httpHeaders>
<property>
<property>
<name>Job-Token</name>
<name>Job-Token</name>
<value>
CI_JOB_TOKEN
</value>
<value>
${env.CI_JOB_TOKEN}
</value>
</property>
</property>
</httpHeaders>
</httpHeaders>
</configuration>
</configuration>
...
@@ -167,24 +167,23 @@ shows how to create a new package each time the `master` branch is updated:
...
@@ -167,24 +167,23 @@ shows how to create a new package each time the `master` branch is updated:
<repositories>
<repositories>
<repository>
<repository>
<id>gitlab-maven</id>
<id>gitlab-maven</id>
<url>https://gitlab.com/api/v4/projects/
PROJECT_ID/
packages/maven</url>
<url>https://gitlab.com/api/v4/projects/
${env.CI_PROJECT_ID}
packages/maven</url>
</repository>
</repository>
</repositories>
</repositories>
<distributionManagement>
<distributionManagement>
<repository>
<repository>
<id>gitlab-maven</id>
<id>gitlab-maven</id>
<url>https://gitlab.com/api/v4/projects/
PROJECT_ID
/packages/maven</url>
<url>https://gitlab.com/api/v4/projects/
${env.CI_PROJECT_ID}
/packages/maven</url>
</repository>
</repository>
<snapshotRepository>
<snapshotRepository>
<id>gitlab-maven</id>
<id>gitlab-maven</id>
<url>https://gitlab.com/api/v4/projects/
PROJECT_ID
/packages/maven</url>
<url>https://gitlab.com/api/v4/projects/
${env.CI_PROJECT_ID}
/packages/maven</url>
</snapshotRepository>
</snapshotRepository>
</distributionManagement>
</distributionManagement>
```
```
TIP: **Tip:**
TIP: **Tip:**
You can either leave GitLab CI/CD to replace your project ID value while
You can either let Maven utilize the CI environment variables or hardcode your project's ID.
the deploy job is running or hardcode your project's ID.
1.
Add a
`deploy`
job to your
`.gitlab-ci.yml`
file:
1.
Add a
`deploy`
job to your
`.gitlab-ci.yml`
file:
...
@@ -193,8 +192,6 @@ shows how to create a new package each time the `master` branch is updated:
...
@@ -193,8 +192,6 @@ shows how to create a new package each time the `master` branch is updated:
image: maven:3.3.9-jdk-8
image: maven:3.3.9-jdk-8
script:
script:
- 'cp ci_settings.xml /root/.m2/settings.xml'
- 'cp ci_settings.xml /root/.m2/settings.xml'
- 'sed -i "s/CI_JOB_TOKEN/${CI_JOB_TOKEN}/g" /root/.m2/settings.xml'
- 'sed -i "s/PROJECT_ID/${CI_PROJECT_ID}/g" pom.xml'
- 'mvn deploy'
- 'mvn deploy'
only:
only:
- master
- master
...
@@ -204,6 +201,5 @@ shows how to create a new package each time the `master` branch is updated:
...
@@ -204,6 +201,5 @@ shows how to create a new package each time the `master` branch is updated:
The next time the
`deploy`
job runs, it will copy
`ci_settings.xml`
to the
The next time the
`deploy`
job runs, it will copy
`ci_settings.xml`
to the
user's home location (in this case the user is
`root`
since it runs in a
user's home location (in this case the user is
`root`
since it runs in a
Docker container), and
`sed`
will replace the placeholder values with the
Docker container), and Maven will utilize the configured CI
contents of the actual
[
environment variables
](
../../../ci/variables/README.md#predefined-variables-environment-variables
)
.
[
environment variables
](
../../../ci/variables/README.md#predefined-variables-environment-variables
)
.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment