Skip to main content

Shipyard Environment Variables

Definition​

By default, every Vessel that runs in Shipyard generates a series of environment variables. These variables are invisible in the sense that you'll never see them in the platform but they can always be accessed by your scripts.

These environment variables can help your scripts be context-aware as they run, giving knowledge into the structure and placement of the Vessel in relation to other Vessels.

NameExampleDefinition
SHIPYARD_ORG_ID5c35c2da-a9a5-472a-a215-29b616ebc2c9Set to the UUIDv4 of the Organization that the Vessel belongs to.
SHIPYARD_ORG_NAMEShipyardSet to the name of the Organization that the Vessel belongs to.
SHIPYARD_PROJECT_ID03cf3d8b-95c0-4b6c-8d57-be58c252c4beSet to the UUIDv4 of the Project that the Vessel belongs to.
SHIPYARD_PROJECT_NAMEShipyard TutorialsSet to the name of the Project that the Vessel belongs to.
SHIPYARD_BLUEPRINT_IDd07f3355-ab62-479b-8756-27c7cbf48907Set to the UUIDv4 of the Blueprint that the Vessel is built from. In the case of a Code Vessel, the ID will not be UUIDv4.
SHIPYARD_BLUEPRINT_NAMEPrint TextSet to the name of the Blueprint that the Vessel is built from.
SHIPYARD_VESSEL_ID20e347ff-fe74-43dc-8f38-6a31910c0533Set to the UUIDv4 of the Vessel that the Log belongs to.
SHIPYARD_VESSEL_NAMEHello, WorldSet to the name of the Vessel that the Log belongs to.
SHIPYARD_LOG_IDc81a050c-5caf-445c-90d0-dc3b761979b0Set to the UUIDv4 of the current Log that is running.
SHIPYARD_LOG_WORKDIR/home/shipyardSet to the working directory that your Vessel is set to do its work in.
SHIPYARD_REPO_NAMEexample-repoSet to the name of the Git repository selected for Code. Only set when the Vessel is connected to Git.
SHIPYARD_CLONE_LOCATION/home/shipyard/example-repoSet to the directory where the Git repository root was cloned. Only set when the Vessel is connected to Git.
SHIPYARD_VESSEL_START_TIME2021-03-12T21:22:47ZThe time at which the Vessel started running. Formatted using the RFC3339 standard.
SHIPYARD_VESSEL_SCHEDULED_TIME2021-03-12T21:22:00ZThe time at which the Vessel started running. Formatted using the RFC3339 standard.
SHIPYARD_VESSEL_START_TIME_YEAR2022The year of the Vessel start time.
SHIPYARD_VESSEL_START_TIME_MONTH12The month of the Vessel start time in format 01-12.
SHIPYARD_VESSEL_START_TIME_DAY07The day of the Vessel start time in format 01-31.
SHIPYARD_VESSEL_START_TIME_HOUR14The hour of the Vessel start time in format 0-23.
SHIPYARD_VESSEL_START_TIME_MINUTE34The minute of the Vessel start time in format 0-59.
SHIPYARD_VESSEL_START_TIME_SECOND12The second of the Vessel start time in format 0-59.
SHIPYARD_VESSEL_START_TIME_MILLISECOND434The millisecond of the Vessel start time in format 0-999.
SHIPYARD_VESSEL_START_TIME_EPOCH1670443778The number of seconds since the Unix epoch.

Fleet Environment Variables​

When a Vessel is run as part of a Fleet, the following Environment Variables will be available. For an overview of Upstream, Currentstream, and Downstream read our Glossary of Terms.

NameExampleDefinition
SHIPYARD_FLEET_ID32f0f12f-8f68-46fd-b3ab-eeddce439f49Set to the UUIDv4 of the Fleet that the Vessel belongs to.
SHIPYARD_FLEET_NAMEETL WorkflowSet to the name of the Fleet that the Vessel belongs to.
SHIPYARD_FLEET_LOG_IDac0332d3-2420-4e8e-a58c-dfe78ae5bdf0Set to the UUIDv4 of the current Fleet Log that is running. This ID will be constant for all Vessels in the current run.
SHIPYARD_FLEET_CURRENTSTREAM_INDEX0The position of the current Vessel in the currentstream. This value is 0 based. Useful for splitting tasks into chunks dynamically and consistently.
SHIPYARD_FLEET_UPSTREAM_COUNT2The number of Vessels that ran upstream.
SHIPYARD_FLEET_CURRENTSTREAM_COUNT2The number of Vessels running in the currentstream.
SHIPYARD_FLEET_DOWNSTREAM_COUNT2The number of Vessels that will run downstream.
SHIPYARD_FLEET_UPSTREAM_LOG_IDS46a41790-310b-4627-b1b7-492c6c042538,b93766e0-e89b-49d9-ae15-6045e9387b3cA comma-separated list of Log IDs from Vessels that ran upstream. The order of the IDs will match the corresponding upstream environment variables, but may change with every run.
SHIPYARD_FLEET_CURRENTSTREAM_LOG_IDSc930d35f-4396-4316-8d3b-c1ed5a1f100f,524bf2c7-18fa-47a1-bb3b-16bf487a45a9A comma-separated list of Log IDs from Vessels that are running in the currentstream. The order of the IDs will match the corresponding currentstream environment variables, but may change with every run.
SHIPYARD_FLEET_DOWNSTREAM_LOG_IDS48542f9d-fa9f-4a77-810b-417eab4fe810,030f7490-36c9-446c-9f84-5aceb03176ddA comma-separated list of Log IDs from Vessels that will run downstream. The order of the IDs will match the corresponding downstream environment variables, but may change with every run.
SHIPYARD_FLEET_UPSTREAM_VESSEL_IDS38621a35-8c94-4e41-817a-8ff2587a871d,7700aea1-599a-486d-be32-09fcb200cdceA comma-separated list of Vessel IDs from Vessels that ran upstream. The order of the IDs will match the corresponding upstream environment variables, but may change with every run.
SHIPYARD_FLEET_CURRENTSTREAM_VESSEL_IDS02ce1830-14a1-4d6b-ada1-ea39e8add14f,83ca8dcb-b2b7-4456-bbe0-ab550db98bb5A comma-separated list of Vessel IDs from Vessels that are running in the currentstream. The order of the IDs will match the corresponding currentstream environment variables, but may change with every run.
SHIPYARD_FLEET_DOWNSTREAM_VESSEL_IDS8934f43f-413a-4bc9-b267-0924035e3459,aa0c6a42-c61d-4f15-b54a-75247c4281daA comma-separated list of Vessel IDs from Vessels that will run downstream. The order of the IDs will match the corresponding downstream environment variables, but may change with every run.
SHIPYARD_FLEET_START_TIME2021-03-12T21:22:47ZThe time at which the Vessel started running. Formatted using the RFC3339 standard.
SHIPYARD_FLEET_SCHEDULED_TIME2021-03-12T21:22:00ZThe time at which the Vessel started running. Formatted using the RFC3339 standard.
SHIPYARD_FLEET_START_TIME_YEAR2022The year of the Fleet start time.
SHIPYARD_FLEET_START_TIME_MONTH12The month of the Fleet start time in format 01-12.
SHIPYARD_FLEET_START_TIME_DAY07The day of the Fleet start time in format 01-31.
SHIPYARD_FLEET_START_TIME_HOUR14The hour of the Fleet start time in format 0-23.
SHIPYARD_FLEET_START_TIME_MINUTE34The minute of the Fleet start time in format 0-59.
SHIPYARD_FLEET_START_TIME_SECOND12The second of the Fleet start time in format 0-59.
SHIPYARD_FLEET_START_TIME_MILLISECOND434The millisecond of the Fleet start time in format 0-999.
SHIPYARD_FLEET_START_TIME_EPOCH1670443778The number of seconds since the Unix epoch.
SHIPYARD_WEBHOOK_HEADERS_FILE/home/shipyard/2560137a-5360-4561-8bfb-810280dce3f0.webhook_headersThe path to the file that will be optionally created if headers are provided in the webhook invocation.
SHIPYARD_WEBHOOK_BODY_FILE/home/shipyard/2560137a-5360-4561-8bfb-810280dce3f0.webhook_bodyThe path to the file that will be optionally created if a body is provided in the webhook invocation.