Skip to content

1. Cross-platform CI/CD syntax ​

Encyclopedia home · Workflow syntax

Use a shared repository script, ci/verify.sh, in each implementation. Give it one clear exit-code contract. For a minimal fixture, it can contain set -eu followed by test -s README.md. Treat event security, platform credentials and workflow scheduling as provider-specific configuration.

ConceptGitHub Actions and Gitea ActionsGitLab CIJenkins Declarative
Entry file.github/workflows/*.yml or .gitea/workflows/*.yml.gitlab-ci.ymlJenkinsfile as configured by job
Execution unitjobs.<id> with stepsTop-level job with scriptStage and steps
Shell commandsrunscriptsh on Unix and bat on Windows
Dependenciesneedsneeds DAG and optional artifact transferStage order, parallel blocks or explicit orchestration
Parallel workIndependent jobs or matrixEligible jobs in the same stage and parallelparallel stages or matrix
Runner selectionruns-on, labels and compatible executorstags plus runner settingsagent with label
Variablesenv, inputs, varsvariablesenvironment
Conditionsifrules and workflow ruleswhen
ArtifactsCompatible upload/download actionsartifacts, needs.artifactsarchiveArtifacts or in-pipeline stash
Credentialssecrets and scoped job tokenProtected/masked/file variables and job tokenwithCredentials or credentials binding
Matrixstrategy.matrixparallel.matrixmatrix.axes

1.1 GitHub and Gitea ​

Save the following in the respective workflow directory. Confirm that the chosen Gitea label is registered and that the runner resolves the checkout action. A deployment job requiring environment reviewers, OIDC, or packages write needs a platform-specific design. Gitea currently ignores the job environment key and uses different job-token permission scopes and registry credentials.

yaml
name: Common verification
on: [push, pull_request]
jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false
      - run: bash ci/verify.sh

1.2 GitLab ​

Save as .gitlab-ci.yml. Choose a runner that supports the Docker image and job runtime. This rule set starts MR pipelines for active PRs and default-branch pipelines after merging.

yaml
workflow:
  rules:
    - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
verify:
  image: bash:5.2
  script:
    - bash ci/verify.sh

1.3 Jenkins ​

Save as Jenkinsfile in a multibranch job with trusted agent selection and already configured SCM discovery. The exit status of sh marks the stage.

groovy
pipeline {
  agent { label 'linux' }
  options { timeout(time: 10, unit: 'MINUTES') }
  stages {
    stage('Verify') {
      steps { sh 'bash ci/verify.sh' }
    }
  }
}

1.4 Additional platform mappings ​

PlatformEntry and executionDependency and artifact concepts
Azure Pipelinesazure-pipelines.yml, stages/jobs/steps, pooldependsOn, publish/download pipeline artifacts
CircleCI.circleci/config.yml, jobs and an executorworkflow requires, workspaces and stored artifacts
TektonTask, Pipeline, and PipelineRun resourcesrunAfter, task results, workspaces and explicit artifact storage
BuildkiteOften .buildkite/pipeline.yml, command steps and agent queuesdepends_on, build artifacts and block steps
AWS CodeBuildbuildspec.yml, build phases and configured computeStage ordering within a build, artifact export, multi-stage delivery via CodePipeline
DaggerA project/module plus dagger call functionsTyped function outputs and content-addressed execution, with triggers supplied by the caller

Check GitHub, Gitea, GitLab, Jenkins, Azure, CircleCI, Tekton, Buildkite, CodeBuild, and Dagger for platform-specific schema and version support.