HIOK Cloud for Azure PipelinesShip to HIOK Cloud from Azure Pipelines with ready-made tasks — build and
push an image, roll a container app, run a job and wait for it, run a script on a VM, sync files to
storage, pull Key Vault secrets as secret variables, get a kubeconfig — plus Set up
A complete pipeline
TasksBuild & push image (
|
| Input | Required | Description |
|---|---|---|
registry |
yes | Registry — Registry name or id. |
buildContext |
Build context — Folder to docker build, e.g. .. Leave empty to push an image already built. |
|
dockerfile |
Dockerfile — When not /Dockerfile. | |
image |
Local image — An image already built on the agent, e.g. myapp:1.2 (when not building). |
|
repository |
Repository — Repository in the registry, e.g. team/web. Default: the local image name. |
|
tag |
Tag — Default: the commit SHA (12 characters). | |
buildArgs |
Build arguments — KEY=VALUE, one per line. | |
platform |
Platform — e.g. linux/amd64 |
Outputs: image (The full image reference pushed (registry/repository:tag).)
Deploy container app (HiokContainerAppDeploy@1)
Roll a HIOK Container App onto a new image as a new revision, and wait until it is serving.
| Input | Required | Description |
|---|---|---|
app |
yes | Container app — App name or id. |
image |
yes | Image — e.g. the image output of the push step. |
env |
Environment variables — KEY=VALUE, one per line. | |
port |
Target port — Default: unchanged. | |
cpu |
vCPU — Default: unchanged. | |
memory |
Memory (GiB) — Default: unchanged. | |
wait |
Wait for — How long to wait for the revision to become active; 0 to not wait. (default 5m) |
Outputs: revision (The new revision.), url (The app's URL.)
Deploy container (HiokContainerDeploy@1)
Create a HIOK container, or replace a running one with a new image while keeping its ports and environment.
| Input | Required | Description |
|---|---|---|
name |
yes | Container name |
image |
yes | Image |
ports |
Ports — HOST:CONTAINER, comma-separated. Default: the existing container's. | |
env |
Environment variables — KEY=VALUE, one per line. Default: the existing container's. | |
cpus |
CPUs | |
memory |
Memory (MiB) |
Run container job (HiokJobRun@1)
Start a HIOK Container Job and wait for it: its output is shown, and the step fails when the job fails.
| Input | Required | Description |
|---|---|---|
job |
yes | Job — Job name or id. |
wait |
Wait for — How long to wait for the run; 0 to start it and move on. (default 30m) |
|
showLogs |
Show output (default true) |
Outputs: run_id (The run.), status (succeeded, failed, timed_out or cancelled.), exit_code (The job's exit code.)
Run script on VM (HiokVmRun@1)
Run a script on a HIOK virtual machine over SSH with the VM's platform key; the step fails if the script does.
| Input | Required | Description |
|---|---|---|
vm |
yes | Virtual machine — VM name. |
script |
Script — Bash to run on the VM. | |
scriptPath |
Script file — Or a script file in the repository. | |
user |
User — Default: the account the VM was built with. |
Start / stop / restart VM (HiokVmPower@1)
Start, stop or restart a HIOK virtual machine.
| Input | Required | Description |
|---|---|---|
vm |
yes | Virtual machine |
action |
yes | Action (default start) — one of start, stop, restart |
Upload to storage (HiokStorageUpload@1)
Upload a file or a whole folder (any size) to a HIOK storage container — build output, static sites, backups.
| Input | Required | Description |
|---|---|---|
account |
yes | Storage account |
container |
yes | Container |
path |
yes | File or folder |
prefix |
Destination prefix — e.g. releases/$(Build.BuildNumber)/ | |
create |
Create container if missing — one of blob, fileshare |
Download from storage (HiokStorageDownload@1)
Download an object, or everything under a prefix, from a HIOK storage container.
| Input | Required | Description |
|---|---|---|
account |
yes | Storage account |
container |
yes | Container |
prefix |
yes | Object or prefix |
destination |
yes | Destination folder (default .) |
Key Vault secrets (HiokKeyVaultSecrets@1)
Make secrets from a HIOK Key Vault available to later steps as masked variables (DB_PASSWORD from "db-password").
| Input | Required | Description |
|---|---|---|
vault |
yes | Key vault |
names |
Secrets — Comma-separated names; empty for all. |
Kubernetes (HiokKubernetes@1)
Get a HIOK Kubernetes cluster's kubeconfig for later kubectl/helm steps, and optionally apply manifests.
| Input | Required | Description |
|---|---|---|
cluster |
yes | Cluster |
manifests |
Manifests to apply — A file or folder for kubectl apply -f (needs kubectl on the agent). |
|
namespace |
Namespace |
HIOK Cloud CLI (HiokCli@1) and API operation (HiokApi@1)
HiokCli@1 runs hiok commands, one per line; HiokApi@1 calls any API operation by
Group.Name with parameters and a JSON body. Both put the JSON answer in result.
Every task also takes region and version (hiok CLI, default latest).