├── .gitignore
├── README.md
├── docs
├── assets
│ ├── css
│ │ └── styling.css
│ └── img
│ │ └── codemc_logo.png
├── faq
│ ├── adding-your-project.md
│ ├── build-jdk-8-project.md
│ ├── cannot-access-folders.md
│ ├── index.md
│ ├── non-mc-projects.md
│ └── using-nms-repository.md
├── index.md
├── jenkins
│ ├── deploy.md
│ ├── github-integration.md
│ ├── gradle.md
│ ├── index.md
│ └── maven.md
├── services
│ ├── ci
│ │ ├── index.md
│ │ ├── integrations
│ │ │ ├── index.md
│ │ │ ├── setup-bitbucket.md
│ │ │ ├── setup-gitea.md
│ │ │ ├── setup-github.md
│ │ │ └── setup-gitlab.md
│ │ └── setups
│ │ │ ├── gradle-job.md
│ │ │ └── maven-job.md
│ ├── index.md
│ └── nexus
│ │ ├── deploy.md
│ │ └── index.md
└── usage-guidelines.md
├── mkdocs.yml
├── renovate.json
├── requirements.txt
└── theme
└── .icons
└── jenkins
├── LICENSE
├── environment.svg
├── freestyle-project.svg
├── play.svg
├── post-build.svg
├── settings.svg
├── source-code-management.svg
└── timer.svg
/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore .cache folder created by git-committers plugin
2 | .cache/
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [badge]: https://img.shields.io/discord/405915656039694336?color=7289DA&label=Discord&logo=discord
2 | [discord]: https://discord.gg/AGcFMu6
3 |
4 | # Documentation
5 | A repository explaining how to make use of our Jenkins and Nexus instances. The documentation is hosted over Cloudflare Pages.
6 |
7 | View documentation: [https://docs.codemc.io/](https://docs.codemc.io/)
8 |
9 | Jenkins CI: [https://ci.codemc.io](https://ci.codemc.io/)
10 | Maven repository: [https://repo.codemc.io](https://repo.codemc.io/)
11 |
12 | ## About
13 | Welcome to CodeMC, a public Jenkins instance and Maven repository for open-source Minecraft projects.
14 | If you want to add your build job to our instance please [contact us](#support-), we'd love to support your project(s)!
15 |
16 | ## Support ![badge]
17 | If you need help or you have a question, feel free to join our [Discord server][discord]!
18 |
--------------------------------------------------------------------------------
/docs/assets/css/styling.css:
--------------------------------------------------------------------------------
1 | :root > * {
2 | --md-primary-fg-color: #0172ba;
3 | }
4 |
5 | .md-header__button.md-logo img {
6 | height: 2.5rem;
7 | width: auto;
8 | }
9 |
10 | .md-nav__title > .md-nav__button.md-logo img {
11 | height: 2.5rem;
12 | width: auto;
13 | }
14 |
15 | [dir="ltr"] .md-header__title {
16 | margin-left: 0;
17 | }
18 |
--------------------------------------------------------------------------------
/docs/assets/img/codemc_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeMC/Documentation/806a17f6b50c564cfdfc016224e0f14cd58bdc82/docs/assets/img/codemc_logo.png
--------------------------------------------------------------------------------
/docs/faq/adding-your-project.md:
--------------------------------------------------------------------------------
1 | # How to add your project to CodeMC?
2 |
3 | CodeMC is open for join requests, as we want to offer a free and reliable CI-Service to everyone that needs one.
4 |
5 | In order to join will you need to join the [Discord Server](https://discord.gg/AGcFMu6). There, head to the `#request-access` channel and read the Pinned Message as it contains important info on what requirements you need to fulfill and how to request being added.
6 |
7 | /// note
8 | You are only required to make one join request with a project.
9 | If you are accepted to the CI, you can create new projects by yourself without additional approval.
10 |
11 | Keep in mind however, that any new project you make needs to follow our [Usage Guidelines](../usage-guidelines.md) and that failing to do so may result in punishments outlined [here](../usage-guidelines.md#punishments).
12 | ///
13 |
--------------------------------------------------------------------------------
/docs/faq/build-jdk-8-project.md:
--------------------------------------------------------------------------------
1 | # How do I build a Maven Project with JDK 8/11?
2 |
3 | Jenkins dropped official support for JDK 8/11 Maven builds. To still build projects using this Java version, you can either use our custom Maven plugin to select a JDK Toolchain based on your `maven-compiler-plugin` settings, or cross-compile with a newer JDK Version.
4 |
5 | ## Toolchain Plugin
6 |
7 | Our custom Maven Plugin can select a toolchain (e.g. JDK 8/11) during the build process. For this, the following workaround is required:
8 |
9 | 1. Set the JDK version to JDK 17.
10 | 2. Add the following maven goal to the command line:
11 | `io.codemc.maven.plugins.toolchain:codemc-toolchain-selector:0.0.2-SNAPSHOT:select`
12 |
13 | ## Cross-Compiling
14 |
15 | Cross-compiling is the process of targeting a different platform than the compiler itself.
16 | In this case, it allows to use any JDK beyond Java 8 to generate a build that is still compatible with the older version.
17 |
18 | You can achieve this by using `source` and `target` in the `maven-compiler-plugin` configuration. However, the usage of `release` is recommended in order to verify that you don't use any Java API methods introduced in later Java versions:
19 |
20 | ```xml
21 |
22 |
23 | org.apache.maven.plugins
24 | maven-compiler-plugin
25 | 3.10.1
26 |
27 | 8
28 |
29 |
30 |
31 | ```
32 |
--------------------------------------------------------------------------------
/docs/faq/cannot-access-folders.md:
--------------------------------------------------------------------------------
1 | # Why can I not access Job Configurations/Folders?
2 |
3 | This is usually only the case for organizations that have been added to CodeMC.
4 | Should you encounter this with an organization, head over to your [Connection Settings on GitHub](https://github.com/settings/applications) and make sure you granted the [CodeMC Application](https://github.com/settings/connections/applications/2debe3b061b244423bf5) access to your User Account and Organization in question. This is indicated by a green checkmark next to the Organization displayed.
5 |
--------------------------------------------------------------------------------
/docs/faq/index.md:
--------------------------------------------------------------------------------
1 | # FAQ
2 |
3 | This section of the Wiki contains common questions you may have.
4 |
5 |
6 |
7 | - ### [How to add your project to CodeMC?](adding-your-project.md)
8 |
9 | ----
10 |
11 | How you can get your project added to the CodeMC Services and what you need to keep in mind.
12 |
13 | - ### [Are non-Minecraft projects allowed?](non-mc-projects.md)
14 |
15 | ----
16 |
17 | Answers to the question wether only MC related projects are allowed or not.
18 |
19 | - ### [Why can I not access Job Configurations/Folders?](cannot-access-folders.md)
20 |
21 | ----
22 |
23 | Common reasons for why you can't access a Job Configuration.
24 |
25 | - ### [How to use the NMS Repository?](using-nms-repository.md)
26 |
27 | ----
28 |
29 | Information on how you can utilize the NMS Repository of CodeMC in your projects.
30 |
31 | - ### [How do I build a Maven Project with JDK 8/11?](build-jdk-8-project.md)
32 |
33 | ----
34 |
35 | How you can build a project for and/or with Java 8 on the Jenkins Service of CodeMC.
36 |
37 |
38 |
--------------------------------------------------------------------------------
/docs/faq/non-mc-projects.md:
--------------------------------------------------------------------------------
1 | # Are non-Minecraft projects allowed?
2 |
3 | **Short Answer:** Yes
4 |
5 | **Long Answer:** CodeMC accepts any Java (or Java-related) project that shows thorough quality and usefulness for the overall programming community, be it a library, software, or even a game. If you're using Kotlin or Scala, your project should compile to the JVM while continuing to provide services intended for the community.
6 | What matters is, that the project is following our [Usage Guidelines](../usage-guidelines.md) to remain on our Services.
7 |
--------------------------------------------------------------------------------
/docs/faq/using-nms-repository.md:
--------------------------------------------------------------------------------
1 | # How to use the NMS Repository?
2 |
3 | CodeMC offers a NMS Repository that allows you to download and use specific NMS content from a particular version, without having to do things like running BuildTools yourself.
4 | To use the Repository, add the below displayed content to your `pom.xml` or `build.gradle(.kts)` file.
5 |
6 | /// tab | :simple-apachemaven: pom.xml
7 |
8 | //// info |
9 | Press the :material-plus-circle: icon for extra info.
10 | ////
11 |
12 | ```xml { .annotated title="pom.xml" }
13 |
14 |
15 | codemc-nms-repository
16 | https://repo.codemc.io/repository/nms/
17 |
18 |
19 |
20 |
21 |
22 | org.spigotmc
23 | spigot
24 | {version}
25 | provided
26 |
27 |
28 | ```
29 |
30 | 1. Replace `{version}` with the same version you would use for the Spigot API.
31 | As an example, if you use `1.21-R0.1-SNAPSHOT` for the Spigot API would you also need to use it for the NMS repository.
32 | ///
33 |
34 | /// tab | :simple-gradle: build.gradle
35 |
36 | //// info |
37 | Press the :material-plus-circle: icon for extra info.
38 | ////
39 |
40 | ```groovy { .annotated title="build.gradle" }
41 | repositories {
42 | maven{ url = "https://repo.codemc.io/repository/nms/" }
43 | }
44 |
45 | dependencies {
46 | compileOnly("org.spigotmc:spigot:{version}") // (1)
47 | }
48 | ```
49 |
50 | 1. Replace `{version}` with the same version you would use for the Spigot API.
51 | As an example, if you use `1.21-R0.1-SNAPSHOT` for the Spigot API would you also need to use it for the NMS repository.
52 | ///
53 |
54 | /// tab | :simple-kotlin: build.gradle.kts
55 |
56 | //// info |
57 | Press the :material-plus-circle: icon for extra info.
58 | ////
59 |
60 | ```kotlin { .annotated title="build.gradle.kts" }
61 | repositories {
62 | maven("https://repo.codemc.io/repository/nms/")
63 | }
64 |
65 | dependencies {
66 | compileOnly("org.spigotmc:spigot:{version}") // (1)
67 | }
68 | ```
69 |
70 | 1. Replace `{version}` with the same version you would use for the Spigot API.
71 | As an example, if you use `1.21-R0.1-SNAPSHOT` for the Spigot API would you also need to use it for the NMS repository.
72 | ///
73 |
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | # Welcome to CodeMC
2 |
3 | This site contains important pages around our CI site and how you can use it.
4 |
5 | ## Jenkins Docs
6 |
7 |
8 |
9 | - ### [FAQ](faq/index.md)
10 |
11 | ----
12 |
13 | Frequently asked questions about our Services.
14 |
15 | - ### [CI Service](services/ci/index.md)
16 |
17 | ----
18 |
19 | Our CI Service allows you to build new jars for your project.
20 |
21 | - ### [Nexus Service](services/nexus/deploy.md)
22 |
23 | ----
24 |
25 | CodeMC offers a Nexus for you to deploy your projects towards, so that others can use them.
26 |
27 | - ### [Usage Guidelines](usage-guidelines.md)
28 |
29 | ----
30 |
31 | We have specific rules and guidelines in place to keep a healthy ecosystem. Read them.
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/docs/jenkins/deploy.md:
--------------------------------------------------------------------------------
1 | ---
2 | template: redirect.html
3 | location: '../../services/nexus/deploy'
4 | ---
5 |
6 |
--------------------------------------------------------------------------------
/docs/jenkins/github-integration.md:
--------------------------------------------------------------------------------
1 | ---
2 | template: redirect.html
3 | location: '../../services/ci/integrations/setup-github'
4 | ---
5 |
6 |
--------------------------------------------------------------------------------
/docs/jenkins/gradle.md:
--------------------------------------------------------------------------------
1 | ---
2 | template: redirect.html
3 | location: '../../services/ci/setups/gradle-job'
4 | ---
5 |
6 |
--------------------------------------------------------------------------------
/docs/jenkins/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | template: redirect.html
3 | location: '../../services'
4 | ---
5 |
6 |
--------------------------------------------------------------------------------
/docs/jenkins/maven.md:
--------------------------------------------------------------------------------
1 | ---
2 | template: redirect.html
3 | location: '../../services/ci/setups/maven-job'
4 | ---
5 |
6 |
--------------------------------------------------------------------------------
/docs/services/ci/index.md:
--------------------------------------------------------------------------------
1 | # CI Service
2 |
3 | CodeMC allows you to configure steps for your project to execute whenever a new build is triggered.
4 | It also has integrated support for automatic builds from all Remote Repository hosts that support [Git](https://git-scm.com).
5 |
6 | ## Git Integrations
7 |
8 | CodeMC supports any remote Git Repository, but also has support for specific Repository Hosts such as GitHub, GitLab or Gitea/Forgejo.
9 |
10 |
11 |
12 | - ### [Setup Git Integration](integrations/index.md)
13 |
14 | ----
15 |
16 | How to setup a general Git Repository integration in CodeMC.
17 |
18 | - ### [Setup GitHub Integration](integrations/setup-github.md)
19 |
20 | ----
21 |
22 | How to setup webhook-based triggers for GitHub hosted repositories.
23 |
24 | - ### [Setup GitLab Integration](integrations/setup-gitlab.md)
25 |
26 | ----
27 |
28 | How to setup webhook-based triggers for GitLab hosted repositories.
29 |
30 | - ### [Setup Gitea Integration](integrations/setup-gitea.md)
31 |
32 | ----
33 |
34 | How to setup webhook-based triggers for Gitea/Forgejo hosted repositories.
35 |
36 | - ### [Setup BitBucket Integration](integrations/setup-bitbucket.md)
37 |
38 | ----
39 |
40 | How to setup webhook-based triggers for BitBucket hosted repositories.
41 |
42 |
43 |
44 | ## Project Setups
45 |
46 | These pages explain how you can setup your project to build your content whenever a trigger is executed.
47 |
48 |
49 |
50 | - ### [Setup a Gradle Job](setups/gradle-job.md)
51 |
52 | ----
53 |
54 | How to setup a Gradle Build job.
55 |
56 | - ### [Setup a Maven Job](setups/maven-job.md)
57 |
58 | ----
59 |
60 | How to setup a Maven Build Job.
61 |
62 |
--------------------------------------------------------------------------------
/docs/services/ci/integrations/index.md:
--------------------------------------------------------------------------------
1 | # Setup Git Integration
2 |
3 | CodeMC automatically links with any Git provider upon initial acceptance of your project. In addition to this, CodeMC automatically configures your project to be polled over SCM every 15 minutes.
4 |
5 | If you're using a specific provider, you can navigate through this section to link with your specific Source Control Management provider for additional features, such as building on a commit basis or reporting CI status. Otherwise, no additonal setup is required.
6 |
7 | ## Specific SCM Providers
8 |
9 |
--------------------------------------------------------------------------------
/docs/services/ci/integrations/setup-bitbucket.md:
--------------------------------------------------------------------------------
1 | # Setup BitBucket Integration
2 |
3 | CodeMC supports integrating with [BitBucket](https://bitbucket.org){ target="_blank" rel="nofollow" } for creating new builds on commits, pull requests, or other events.
4 |
5 | ## Setup Automatic Builds
6 |
7 | CodeMC allows to create new builds whenever commits are done to a connected BitBucket Repository.
8 |
9 | 1. Go to your repository and press the :octicons-gear-16: **Settings** Tab.
10 | 2. Click :octicons-webhook-16: **Webhooks** inside the column.
11 | 3. Click the **Add Webhook** Button on the top-right of the page.
12 | 4. Add `https://ci.codemc.io/bitbucket-webhook/` as the value of the **URL**.
13 | 5. For **Title**, set it to something recognizable (e.g. `CodeMC`).
14 | 6. For **Which events would you like to trigger this webhook?** either leave it at *"Repository push"* or select *"Choose from a full list of triggers"* and select the following options:
15 | - `Pull requests`
16 | - `Pushes`
17 | - `Repositories`
18 | 7. Save your Webhook by clicking the **Add webhook** button at the bottom.
--------------------------------------------------------------------------------
/docs/services/ci/integrations/setup-gitea.md:
--------------------------------------------------------------------------------
1 | # Setup Gitea/Forgejo support
2 |
3 | /// note
4 | The following instructions also apply to [Forgejo instances](https://forgejo.org/){ target="_blank" rel="nofollow" }.
5 | ///
6 |
7 | CodeMC supports hooking into [Gitea](https://about.gitea.com/){ target="_blank" rel="nofollow" } instances for creating new builds whenever a commit is done to your project.
8 |
9 | ## Setup automatic Builds
10 |
11 | CodeMC allows you to create builds whenever a commit is pushed to your repository.
12 | Unlike other Sites is the setup for Gitea/Forgejo a little more complicated and requires some steps on the CI first.
13 |
14 | /// warning | Important
15 | Using this setup will trigger a build, no matter the changes or targeted files.
16 | It will ignore any exclusion/inclusion settings of the Polling options.
17 |
18 | Use the [Periodic Builds](#setup-periodic-builds) setup to avoid this.
19 | ///
20 |
21 | 1. Login to your account on `https://ci.codemc.io` if you haven't already.
22 | 2. Click your username on the top-right.
23 | 3. Click **Security** on the left-hand side.
24 | 4. Under **API Token** press **Add new Token**, give the token a proper name and press **Generate**.
25 | 5. Copy the token.
26 | 6. Encode the token alongside your Username in the format `{username}:{token}` using a Base64 encoder (i.e. [base64encode.org](https://base64encode.org){ target="_blank" rel="nofollow" }).
27 | 7. Copy the generated Base64 code for later.
28 |
29 | After completing the above steps, head over to your Gitea/Forgejo repository and follow these steps.
30 |
31 | 1. Press :octicons-tools-16: **Settings**
32 | 2. Press **Webhooks** on the left-hand side.
33 | 3. Press the **Add Webhook** button and select :simple-gitea: **Gitea** (:simple-forgejo: **Forgejo** may also work).
34 | 4. Add `https://ci.codemc.io/job/{username}/job/{project}/build` as the target URL.
35 | 5. Under **Trigger on** either leave it at `push events` or chose `Custom events...` and choose the following:
36 | - `Pull request`
37 | - `Push`
38 | 6. Under **Authorization-Header** put `Basic {code}` where `{code}` is the Base64-encoded text you've created previously.
39 | 7. Press **Add Webhook** to save your new Webhook.
40 |
41 | ## Setup periodic Builds
42 |
43 | If you don't need to have builds made when a commit is pushed, periodic builds can be used instead to check your repository for changes and build those regularly.
44 |
45 | 1. Login to your account on `https://ci.codemc.io` if you haven't already.
46 | 2. Head over to your project on CodeMC and open the settings by clicking :jenkins-settings: **Configure**.
47 | 3. Under :jenkins-source-code-management: **Source Code Management** make sure that **Git** is selected and that the URL to your repository is configured under **Repository URL**
48 | - Make sure that **Branch Specifier (blank for 'any')** is set to the default branch of your repository (Usually `*/master` or `*/main`).
49 | - *Optional:* Under **Additional Behaviours** press the **Add** button and add **Polling ignores commits in certain paths** to add settings to define paths that should be included or excluded during a poll.
50 | 4. Scroll down to the :jenkins-timer: **Triggers** section and make sure to check **Poll SCM**
51 | 5. In the **Schedule** field, add a cron-job-compatible pattern. [crontab.guru]{ target="_blank" rel="nofollow" } can be used to create one.
52 | Please keep the frequency of polls to a reasonable number such as every 15 minutes (`H/15 * * * *`). Cron jobs that make excessive calls will be removed.
53 |
54 | /// tip
55 | `H` should be used instead of `*` when defining a interval for the polling.
56 |
57 | Using `H` tells the CI to delay the poll should too many other polls already be run at the same time, reducing load on the CI in general.
58 | Note that `H` is not a supported cron-job pattern and specific to the CI. Sites such as [crontab.guru]{ target="_blank" rel="nofollow" } will not support it.
59 | ///
60 |
61 | 6. Press **Save** to save and apply your changes.
62 |
63 | [crontab.guru]: https://crontab.guru/
--------------------------------------------------------------------------------
/docs/services/ci/integrations/setup-github.md:
--------------------------------------------------------------------------------
1 | # Setup GitHub Integration
2 |
3 | CodeMC supports integrating with [GitHub](https://github.com){ target="_blank" rel="nofollow" } for features such as creating new builds on commits or return a build status on Pull requests, commits, etc.
4 | This page tries to explain how you can enable such features.
5 |
6 | ## Setup Automatic Builds
7 |
8 | CodeMC allows to create new builds whenever commits are done to a connected GitHub Repository.
9 | The setup can be done either for an entire Organization, meaning that it applies to all repositories hosted on that Organization, or for a specific repository alone. The steps are the same, except for where you access the settings:
10 |
11 | /// note
12 | Organizations require to have the [CodeMC Application](https://github.com/settings/connections/applications/2debe3b061b244423bf5){ target="_blank" rel="nofollow" } approved to properly access the Organization on the CI.
13 | ///
14 |
15 | 1. Go to your Organization/Repository and press the :octicons-gear-16: **Settings** Tab.
16 | 2. Click :octicons-webhook-16: **Webhooks** on the left sidebar.
17 | 3. Click the **Add Webhook** Button on the top-right of the page.
18 | 4. Add `https://ci.codemc.io/github-webhook/` as the value of **Payload URL**.
19 | 5. For **Which events would you like to trigger this webhook?** either leave it at *"Just the `push` event."* or select *"Let me select individual events."* and select the following options:
20 | - `Pull requests`
21 | - `Pushes`
22 | - `Repositories`
23 | 6. Save your Webhook by clicking the **Add webhook** button at the bottom.
24 |
25 | ## Setup a Commit Status
26 |
27 | /// danger | Work in Progress
28 | This section is currently being reworked and not available right now.
29 | ///
--------------------------------------------------------------------------------
/docs/services/ci/integrations/setup-gitlab.md:
--------------------------------------------------------------------------------
1 | # Setup GitLab Integration
2 |
3 | CodeMC supports integrating with [GitLab](https://gitlab.com){ target="_blank" rel="nofollow" } for features such as creating new builds on commits or return a build status on Pull requests, commits, etc.
4 | This page tries to explain how you can enable such features.
5 |
6 | ## Setup Automatic Builds
7 |
8 | CodeMC allows to create new builds whenever commits are done to a connected GitLab Repository. The full steps are available in the [GitLab Documentation](https://docs.gitlab.com/ee/integration/jenkins.html#configure-the-jenkins-project).
9 |
10 | 1. First, go to your Jenkins Job, and click on the :jenkins-settings: **Configure** tab.
11 | 2. Under :jenkins-timer: **Triggers** select *Build when a change is pushed to GitLab. GitLab webhook URL: ...* and press the *Advanced* drop-down.
12 | 3. Once you click on the Advanced drop-down, Navigate to the *Secret Token* Text Box.
13 | 4. Click on `Generate`, copy the text inside the text bar, and save your Jenkins Configuration.
14 | 5. In your GitLab Project, create a webhook with the trigger url as `https://ci.codemc.io/project/{USERNAME}/{JOB_NAME}`.
15 | The URL to use should've been mentioned in the text of the checkbox you enabled in step 2.
16 | 6. Paste the copied token in the *Secret Token* text bar.
17 | 7. Test the webhook by pressing the *Test* Button.
18 |
19 | ## Setup a Commit Status
20 |
21 | You can add a Commit Status to your repository to display wether a build was successful or not when a commit was made. Full instructions are available on [GitLab](https://docs.gitlab.com/ee/integration/jenkins.html#configure-the-jenkins-project).
22 | To add a Commit status, follow these steps:
23 |
24 | 1. In your Jenkins project, click on the :jenkins-settings: **Configure** tab.
25 | 2. Navigate to the *Post-build Actions* section.
26 | 3. Upon clicking on *Add post-build Action*, click on the one titled *Publish build status to GitLab*.
27 |
28 | If you are using a freestyle or Maven project, your process is done. However, if you are using a Pipeline project, continue with the steps below.
29 |
30 | 1. Moving back to your project, create or locate the `Jenkinsfile` inside the root directory.
31 | 2. Inside of the `Jenkinsfile`, create a stage that sets the build status for your project:
32 | ```groovy
33 | pipeline {
34 | agent any
35 |
36 | stages {
37 | stage('gitlab') {
38 | steps {
39 | echo 'Notify GitLab'
40 | updateGitlabCommitStatus name: 'build', state: 'pending'
41 | updateGitlabCommitStatus name: 'build', state: 'success'
42 | }
43 | }
44 | }
45 | }
46 | ```
47 |
--------------------------------------------------------------------------------
/docs/services/ci/setups/gradle-job.md:
--------------------------------------------------------------------------------
1 | # Setup a Gradle Build Job
2 |
3 | This page will explain to you how to setup a build job for your Maven Project.
4 |
5 | ## Creating the Job
6 |
7 | /// note
8 | You can skip these steps should you already have a project set up on the CI and instead directly go to [Configuration](#configuration).
9 | ///
10 |
11 | 1. Go to `https://ci.codemc.io/job/{user|organization}/newJob`
12 | 2. Enter a name for your new project and select :jenkins-freestyle-project: **Freestyle project**. Press the **OK** button at the bottom.
13 | 3. Jenkins should now create a new Job for you and redirect you to its configuration page once done.
14 |
15 | ## Configuration
16 |
17 | We recommend to set the following settings for your project:
18 |
19 | ### :jenkins-source-code-management: Source Code Management
20 |
21 | 1. In the :jenkins-source-code-management: **Source Code Management** Section, select **Git**
22 | 2. Press **Add Repository**.
23 | 3. Enter your repository's URL in the **Repository URL** field.
24 | 4. If you only want specific branches to trigger a Build can you add a **Branch Specifier** by pressing **Add Branch**, if there isn't already one set.
25 |
26 | ### :jenkins-timer: Triggers
27 |
28 | /// info | This is optional
29 | You can setup automatic Builds for GitHub, GitLab, or any other supported Repository Host.
30 | Tutorials can be found in the [Integration Pages](../integrations/index.md) of this documenation.
31 | ///
32 |
33 | 1. In the :jenkins-timer: **Triggers** Section, check **Poll SCM**
34 | 2. Put `H/10 * * * *` in the large text field to set CodeMC to check your remote repository every 10 minutes.
35 |
36 | ### :jenkins-environment: Environment
37 |
38 | /// info | This is optional
39 | ///
40 |
41 | We recommend enabling **Add timestamps to the Console Output**.
42 |
43 | ### :jenkins-settings: Build
44 |
45 | /// warning | Important
46 | In order to build a project with JDK 8, you need to use a [workaround](../../../faq/build-jdk-8-project.md).
47 | ///
48 |
49 | 1. In the :jenkins-settings: **Build** Section, press the **Add build step** button and select **Invoke Gradle script** from the dropdown menu.
50 | 2. Press the **Use Gradle Wrapper** Radio Button.
51 | 4. Make sure **Make gradlew executable** is selected.
52 | 5. Add your tasks in the **Tasks** field. Those are usually `clean build`, `clean shadowJar` or similar.
53 | - You can deploy your artifacts to the CodeMC Nexus. A tutorial can be found [here](../../nexus/deploy.md).
54 |
55 | ### :jenkins-post-build: Post-build Actions
56 |
57 | 1. In the :jenkins-post-build: **Post-build Actions** Section, press the **Add post-build action** button and select **Archive the artifacts** from the dropdown menu.
58 | 2. Assuming a default build-directory, set `build/libs/*.jar` (`**/build/libs/*.jar` for multi-module projects) as the value of the **Files to archive** field.
59 |
60 | ## Final Steps
61 |
62 | 1. Press the **Save** Button to save your changes, which will redirect you to your Project's Job page.
63 | 2. To start a new Build, press the :jenkins-play: **Build Now** button.
64 | 3. CodeMC will now queue a new Build to be made.
65 | To see the console of your job, press the rotating icon next to the build number in the **Build** Section.
--------------------------------------------------------------------------------
/docs/services/ci/setups/maven-job.md:
--------------------------------------------------------------------------------
1 | # Setup a Maven Build Job
2 |
3 | This page will explain to you how to setup a build job for your Maven Project.
4 |
5 | ## Creating the Job
6 |
7 | /// note
8 | You can skip these steps should you already have a project set up on the CI and instead directly go to [Configuration](#configuration).
9 | ///
10 |
11 | 1. Go to `https://ci.codemc.io/job/{user|organization}/newJob`
12 | 2. Enter a name for your new project and select :simple-apachemaven: **Maven project**. Press the **OK** button at the bottom.
13 | 3. Jenkins should now create a new Job for you and redirect you to its configuration page once done.
14 |
15 | ## Configuration
16 |
17 | We recommend to set the following settings for your project:
18 |
19 | ### :jenkins-source-code-management: Source Code Management
20 |
21 | 1. In the :jenkins-source-code-management: **Source Code Management** Section, select **Git**
22 | 2. Press **Add Repository**.
23 | 3. Enter your repository's URL in the **Repository URL** field.
24 | 4. If you only want specific branches to trigger a Build can you add a **Branch Specifier** by pressing **Add Brnach**, if there isn't already one set.
25 |
26 | ### :jenkins-timer: Triggers
27 |
28 | /// info | This is optional
29 | You can setup automatic Builds for GitHub, GitLab, or any other supported Repository Host.
30 | Tutorials can be found in the [Integration Pages](../integrations/index.md) of this documenation.
31 | ///
32 |
33 | 1. In the :jenkins-timer: **Triggers** Section, check **Poll SCM**
34 | 2. Put `H/10 * * * *` in the large text field to set CodeMC to check your remote repository every 10 minutes.
35 |
36 | ### :jenkins-environment: Environment
37 |
38 | /// info | This is optional
39 | ///
40 |
41 | We recommend enabling **Add timestamps to the Console Output**.
42 |
43 | ### :jenkins-settings: Build
44 |
45 | /// warning | Important
46 | In order to build a project with JDK 8, you need to use a [workaround](../../../faq/build-jdk-8-project.md).
47 | ///
48 |
49 | 1. In the :jenkins-settings: **Build** Section, set the path to your `pom.xml` in the **Root POM** field. This should usually just be `pom.xml`.
50 | 2. Set your default maven goals in the **Goals and options** field.
51 | - You can deploy your artifacts to the CodeMC Nexus. A tutorial can be found [here](../../nexus/deploy.md).
52 |
53 | ### :jenkins-post-build: Post-build Actions
54 |
55 | 1. In the :jenkins-post-build: **Post-build Actions** Section, press the **Add post-build action** button and select **Archive the artifacts** from the dropdown menu.
56 | 2. Assuming a default build-directory, set `target/*.jar` (`**/target/*.jar` for multi-module projects) as the value of the **Files to archive** field.
57 | 3. Press the **Advanced** button and set `target/original-*.jar` (`**/target/original-*.jar` for multi-module projects) as the value of the **Exclusion** field.
58 | - This will exclude the original (unshaded) jar from builds using the Maven Shade Plugin.
59 |
60 | ## Final Steps
61 |
62 | 1. Press the **Save** Button to save your changes and be redirected to your Project's Job page.
63 | 2. To start a new Build, press the :jenkins-play: **Build Now** button.
64 | 3. CodeMC will now queue a new Build to be made.
65 | To see the console of your job, press the rotating icon next to the build number in the **Builds** Section.
--------------------------------------------------------------------------------
/docs/services/index.md:
--------------------------------------------------------------------------------
1 | # CodeMC Services
2 |
3 | CodeMC is currently offering the following Services for you to use, once you have been approved to join:
4 |
5 |
6 |
7 | - ### [CI](ci/index.md)
8 |
9 | ----
10 |
11 | CodeMC offers a Jenkins CI instance for you to build new version with for your project.
12 |
13 | - ### [Nexus](nexus/index.md)
14 |
15 | ----
16 |
17 | CodeMC's Nexus service allows you to deploy your project for others to integrate into their own projects.
18 |
19 |