Created
April 14, 2022 09:58
-
-
Save brk3/a3c40883635a2562397d31c4b017b27d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main [41/1408] | |
import ( | |
"dagger.io/dagger" | |
"dagger.io/dagger/core" | |
"universe.dagger.io/docker" | |
) | |
dagger.#Plan & { | |
actions: { | |
rover: { | |
rover: docker.#Pull & { | |
source: "aztfmod/rover:1.1.6-2202.2503" | |
} | |
azurecache: "/root/.azure": { | |
dest: "/root/.azure/" | |
type: "cache" | |
contents: core.#CacheDir & { | |
id: "azurecache" | |
} | |
} | |
az_login: docker.#Run & { | |
input: rover.image | |
user: "root" | |
command: name: "/bin/bash" | |
command: args: ["-c", """ | |
az login --service-principal -u xxx -p xxx --tenant xxx | |
"""] | |
mounts: _azurecache: { | |
dest: "/root/.azure/" | |
contents: azurecache.contents | |
} | |
always: true | |
} | |
az_account_show: docker.#Run & { | |
input: rover.image | |
user: "root" | |
command: name: "/bin/bash" | |
command: args: ["-c", """ | |
az account show | |
"""] | |
mounts: _azurecache: { | |
dest: "/root/.azure" | |
contents: az_login.mounts._azurecache.contents | |
} | |
env: DEP: "\(az_login.success)" | |
always: true | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment