Workload artefacts

“Workload” artefacts contain a Score Workload specification which includes all the details required to launch your service.

Upload Score specification

Whenever a new version of your Workload is ready, you can notify the Humanitec Platform Orchestrator by uploading the Score Workload specification to the artefact version endpoint . This notification can trigger an Artefact Automation Pipeline for automated deployment.

This is a high level operation where the Platform Orchestrator is determining which Pipelines have an artefact trigger for that Score artefact, and then triggering asynchronous deployments of that artefact.

You can add one of the commands below to your existing CI or CD pipeline. Refer to the CI/CD Overview for a reflection on integration points.

Set the following environment variables:

Variable Example Description
HUMANITEC_TOKEN lsakdjhcals An API token of a user with at least the Artefact Contributor role in the Organization
HUMANITEC_ORG my-org The target Organization

humctl create artefact-version \
  --type workload \
  --spec ./score.yaml \
  --name myProject/myWorkloadArtefact \
  --version 1.2.3 \
  --ref refs/heads/main

curl https://api.humanitec.io/orgs/${HUMANITEC_ORG}/artefact-versions \
  -H "Authorization: Bearer ${HUMANITEC_TOKEN}" \
  -F type=workload \
  -F name=myProject/myWorkloadArtefact \
  -F [email protected] \
  -F ref=refs/heads/main
Top