github.com/drone/go-convert@v0.0.0-20240307072510-6bd371c65e61/convert/circle/yaml/testdata/params/example1.yaml (about)

     1  # Example of global parameters
     2  # https://circleci.com/docs/pipeline-variables/#pipeline-parameters-in-configuration
     3  
     4  version: 2.1
     5  
     6  parameters:
     7    image-tag:
     8      type: string
     9      default: "current"
    10    workingdir:
    11      type: string
    12      default: "~/main"
    13  
    14  jobs:
    15    build:
    16      docker:
    17        - image: cimg/node:<< pipeline.parameters.image-tag >>
    18          auth:
    19            username: mydockerhub-user
    20            password: $DOCKERHUB_PASSWORD  # context / project UI env-var reference
    21      environment:
    22        IMAGETAG: << pipeline.parameters.image-tag >>
    23      working_directory: << pipeline.parameters.workingdir >>
    24      steps:
    25        - run: echo "Image tag used was ${IMAGETAG}"
    26        - run: echo "$(pwd) == << pipeline.parameters.workingdir >>"