FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

CodeMC/API at a1e2a92b6326b661668c6156e5d5828c918bc0a0 · GitHub

Repository navigation

Public

About

The Backend API for the CodeMC Jenkins and Nexus Services

Topics

Resources

Contributing

Stars

1 star

Watchers

3 watching

Forks

Repository files navigation

CodeMC API

This is the official API for CodeMC Jenkins and Nexus services. It is used by the Discord Bot to do various tasks as a part of our service to our users.

Installation

Maven
<project>
    
    <!-- Import CodeMC Repo -->
    
    <repositories>
        <repository>
            <id>codemc-public</id>
            <url>https://repo.codemc.io/repository/maven-public/</url>
        </repository>
    </repositories>
    
    <dependencies>
        <dependency>
          <groupId>io.codemc.api</groupId>
          <artifactId>codemc-api</artifactId>
          <version>[VERSION]</version>
        </dependency>
    </dependencies>
    
</project>
Gradle (Groovy)
repositories {
    maven { url 'https://repo.codemc.io/repository/maven-public/' }
}

dependencies {
    implementation 'io.codemc.api:codemc-api:[VERSION]'
}
Gradle (Kotlin DSL)
repositories {
    maven(url = "https://repo.codemc.io/repository/maven-public/")
}

dependencies {
    implementation("io.codemc.api:codemc-api:[VERSION]")
}

Local Testing

Test suites rely on both an active Nexus and Jenkins instance at ports 8081 and 8080 respectively. Luckily, the project comes with Docker files to set these up yourself.

Without the services, some test suites will fail.

Act (preferred)

Test the project by using Act, a GitHub Action emulator. This will set up and test everything for you.

act push -j 'test'

Manual

First, build and run both containers:

# Docker
docker build -t nexus-rest/nexus src/test/docker/nexus
docker run -d -p 8081:8081 --name nexus-rest nexus-rest/nexus

# Jenkins
docker build -t jenkins-rest/jenkins src/test/docker/jenkins
docker run -d -p 8080:8080 --name jenkins-rest jenkins-rest/jenkins

Before running, copy over the admin.password file into the /tmp/ folder (yes, you will need to make it on Windows) so that the API can log in to the newly created Nexus instance.

docker cp nexus-rest:/nexus-data/admin.password /tmp/admin.password

Then, run the tests:

./gradlew test

About

The Backend API for the CodeMC Jenkins and Nexus Services

Topics

Resources

Contributing

Stars

1 star

Watchers

3 watching

Forks

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL