Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultContainerTimeout = time.Duration(10 * time.Minute)
)
Functions ¶
This section is empty.
Types ¶
type AssignmentInfo ¶
type AssignmentInfo struct { AssignmentName string BranchName string CreatorAccessToken string GetURL string TestURL string RandomSecret string }
AssignmentInfo holds metadata needed to fetch student code and the test repository for an assignment.
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
Docker is an implementation of the CI interface using Docker.
func NewDockerCI ¶
NewDockerCI returns a runner to run CI tests.
type Job ¶
type Job struct { // Name describes the running job; mainly used to name docker containers. Name string // Image names the image to use to run the job. Image string // Dockerfile contents Dockerfile string // Commands is a list of shell commands to run as part of the job. Commands []string }
Job describes how to execute a CI job.
type Local ¶
type Local struct{}
Local is an implementation of the CI interface executing code locally.
type RunData ¶
type RunData struct { Course *pb.Course Assignment *pb.Assignment Repo *pb.Repository BranchName string CommitID string JobOwner string Rebuild bool }
RunData stores CI data
func (RunData) RecordResults ¶
func (r RunData) RecordResults(logger *zap.SugaredLogger, db database.Database, results *score.Results) (*pb.Submission, error)
RecordResults for the course and assignment given by the run data structure. If the results argument is nil, then the submission is considered to be a manual review.
Click to show internal directories.
Click to hide internal directories.