Skip to content

gitlab Submodule

Structs

PagesAsciiDoctorProps

Initializer

1
2
3
import { gitlab } from '@gcix/gcix'

const pagesAsciiDoctorProps: gitlab.PagesAsciiDoctorProps = { ... }

Properties

Name Type Description
outFile string Output HTML file.
source string Source .adoc files to translate to HTML files.
jobName string The name of the job.
jobStage string The stage of the job.

outFileRequired
public readonly outFile: string;
  • Type: string

Output HTML file.


sourceRequired
public readonly source: string;
  • Type: string

Source .adoc files to translate to HTML files.


jobNameOptional
public readonly jobName: string;
  • Type: string

The name of the job.


jobStageOptional
public readonly jobStage: string;
  • Type: string

The stage of the job.


Classes

GitlabScripts

GitlabScripts Class Documentation.

The GitlabScripts class provides utility methods for performing various Git-related actions in the context of GitLab.

Static Functions

Name Description
cloneRepository Clones a repository from a remote Git server using the Git command.

cloneRepository
1
2
3
import { gitlab } from '@gcix/gcix'

gitlab.GitlabScripts.cloneRepository(path: string, branch?: string)

Clones a repository from a remote Git server using the Git command.

pathRequired
  • Type: string

The path of the repository to clone.

Should start with a forward slash ("/").


branchOptional
  • Type: string

(Optional) The branch name to clone from the remote repository.

Currently, only "main" is supported.


PagesAsciiDoctor

Translate the AsciiDoc source FILE as Gitlab Pages HTML5 file.

Runs asciidoctor {source} -o public{out_file}and stores the output as artifact under the public directory.

This subclass of Job will configure following defaults for the superclass:

  • name: asciidoctor-pages
  • stage: build
  • image: ruby:3-alpine
  • artifacts: Path 'public'

Initializers

1
2
3
import { gitlab } from '@gcix/gcix'

new gitlab.PagesAsciiDoctor(props: PagesAsciiDoctorProps)
Name Type Description
props PagesAsciiDoctorProps No description.

propsRequired

Methods

Name Description
addDependencies No description.
addNeeds No description.
addParent This method is called by gcix.JobCollections when the job is added to that JobCollection.
addTags No description.
addVariables No description.
appendRules No description.
appendScripts No description.
assignAllowFailure No description.
assignArtifacts No description.
assignCache No description.
assignDependencies No description.
assignImage Sets the image of this job.
assignNeeds No description.
assignTags No description.
copy Returns an independent, deep copy object of this job.
extendName This method is used by gcix.JobCollections to populate the jobs name.
extendStage This method is used by gcix.JobCollections to populate the jobs name and stage.
extendStageValue This method is used by gcix.JobCollections to populate the jobs stage.
getAllInstanceNames Return all instance names from the given child.
isEqual isEqual checks if this object is equal to given object.
prependRules No description.
prependScripts No description.
render Returns a representation of any object which implements IBase.

addDependencies
public addDependencies(dependencies: Job | JobCollection | Need[]): Job
dependenciesRequired
  • Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]

addNeeds
public addNeeds(needs: Job | JobCollection | Need[]): Job
needsRequired
  • Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]

addParent
public addParent(parent: Job | JobCollection): void

This method is called by gcix.JobCollections when the job is added to that JobCollection.

The job needs to know its parents when getAllInstanceNames() is called.

parentRequired
  • Type: @gcix/gcix.Job | @gcix/gcix.JobCollection

addTags
public addTags(tags: string[]): Job
tagsRequired
  • Type: string[]

addVariables
public addVariables(variables: {[ key: string ]: string}): Job
variablesRequired
  • Type: {[ key: string ]: string}

appendRules
public appendRules(rules: Rule[]): Job
rulesRequired
  • Type: @gcix/gcix.Rule[]

appendScripts
public appendScripts(scripts: string[]): Job
scriptsRequired
  • Type: string[]

assignAllowFailure
public assignAllowFailure(allowFailure: boolean | number[]): Job
allowFailureRequired
  • Type: boolean | number[]

assignArtifacts
public assignArtifacts(artifacts: Artifacts): Job
artifactsRequired
  • Type: @gcix/gcix.Artifacts

assignCache
public assignCache(cache: Cache): Job
cacheRequired
  • Type: @gcix/gcix.Cache

assignDependencies
public assignDependencies(dependencies: Job | JobCollection | Need[]): Job
dependenciesRequired
  • Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]

assignImage
public assignImage(image: string | Image): Job

Sets the image of this job.

For a simple container image you can provide the origin of the image. If you want to set the entrypoint, you have to provide an Image object instead.

!! Any previous values will be overwritten.

imageRequired
  • Type: string | @gcix/gcix.Image

assignNeeds
public assignNeeds(needs: Job | JobCollection | Need[]): Job
needsRequired
  • Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]

assignTags
public assignTags(tags: string[]): Job
tagsRequired
  • Type: string[]

copy
public copy(): Job

Returns an independent, deep copy object of this job.

extendName
public extendName(name: string): void

This method is used by gcix.JobCollections to populate the jobs name.

nameRequired
  • Type: string

extendStage
public extendStage(stage: string): void

This method is used by gcix.JobCollections to populate the jobs name and stage.

stageRequired
  • Type: string

extendStageValue
public extendStageValue(stage: string): void

This method is used by gcix.JobCollections to populate the jobs stage.

stageRequired
  • Type: string

getAllInstanceNames
public getAllInstanceNames(child?: Job | JobCollection): OrderedStringSet

Return all instance names from the given child.

That means all combinations of the childs name and stage within this sequence and all parent sequences.

childOptional
  • Type: @gcix/gcix.Job | @gcix/gcix.JobCollection

isEqual
public isEqual(comparable: IBase): boolean

isEqual checks if this object is equal to given object.

comparableRequired
  • Type: @gcix/gcix.IBase

prependRules
public prependRules(rules: Rule[]): Job
rulesRequired
  • Type: @gcix/gcix.Rule[]

prependScripts
public prependScripts(scripts: string[]): Job
scriptsRequired
  • Type: string[]

render
public render(): any

Returns a representation of any object which implements IBase.

The rendered representation is used by the gcix to dump it in YAML format as part of the .gitlab-ci.yml pipeline.

Properties

Name Type Description
tags string[] Getter method to receive added tags.
allowFailure string | boolean | number[] No description.
name string No description.
orderedTags @gcix/gcix.OrderedStringSet No description.
parents @gcix/gcix.Job | @gcix/gcix.JobCollection[] No description.
scripts string[] No description.
stage string No description.
artifacts @gcix/gcix.Artifacts No description.
cache @gcix/gcix.Cache No description.
dependencies @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] No description.
image @gcix/gcix.Image No description.
needs @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[] No description.
original @gcix/gcix.Job No description.
rules @gcix/gcix.Rule[] No description.
variables {[ key: string ]: string} No description.
outFile string Output HTML file.
source string Source .adoc files to translate to HTML files.

tagsRequired
public readonly tags: string[];
  • Type: string[]

Getter method to receive added tags.


allowFailureRequired
public readonly allowFailure: string | boolean | number[];
  • Type: string | boolean | number[]

nameRequired
public readonly name: string;
  • Type: string

orderedTagsRequired
public readonly orderedTags: OrderedStringSet;
  • Type: @gcix/gcix.OrderedStringSet

parentsRequired
public readonly parents: Job | JobCollection[];
  • Type: @gcix/gcix.Job | @gcix/gcix.JobCollection[]

scriptsRequired
public readonly scripts: string[];
  • Type: string[]

stageRequired
public readonly stage: string;
  • Type: string

artifactsOptional
public readonly artifacts: Artifacts;
  • Type: @gcix/gcix.Artifacts

cacheOptional
public readonly cache: Cache;
  • Type: @gcix/gcix.Cache

dependenciesOptional
public readonly dependencies: Job | JobCollection | Need[];
  • Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]

imageOptional
public readonly image: Image;
  • Type: @gcix/gcix.Image

needsOptional
public readonly needs: Job | JobCollection | Need[];
  • Type: @gcix/gcix.Job | @gcix/gcix.JobCollection | @gcix/gcix.Need[]

originalOptional
public readonly original: Job;
  • Type: @gcix/gcix.Job

rulesOptional
public readonly rules: Rule[];
  • Type: @gcix/gcix.Rule[]

variablesOptional
public readonly variables: {[ key: string ]: string};
  • Type: {[ key: string ]: string}

outFileRequired
public readonly outFile: string;
  • Type: string

Output HTML file.


sourceRequired
public readonly source: string;
  • Type: string

Source .adoc files to translate to HTML files.


Protocols

IPagesAsciiDoctor

Properties

Name Type Description
outFile string Output HTML file.
source string Source .adoc files to translate to HTML files.

outFileRequired
public readonly outFile: string;
  • Type: string

Output HTML file.


sourceRequired
public readonly source: string;
  • Type: string

Source .adoc files to translate to HTML files.



Last update: November 14, 2023
Created: November 14, 2023