thanks for the feedback! We put a case to determine the steps within a command:
- command: >
case $(buildkite-agent meta-data get "release-type") in
"stable") buildkite-agent pipeline upload .buildkite/stable.yml ;;
"beta") buildkite-agent pipeline upload .buildkite/beta.yml ;;
*) echo "Unknown release type" && exit 1
esac
label: ":rocket: - Release"
key: "choose-release"
agents:
queue: "android"
if: build.pull_request.id != null
I’ll get that thread dirty to ask you something…We have artifact dependency between jobs, in this case, before I call stable.yml I generate an artifact. How do I get this artifact inside another step that was uploaded by the agent?
E.G:
- command:
- "gradle build'"
- "mv apk/production.apk /tmp/production.apk"
artifact_paths:
- "/tmp/production.apk"
label: "Build"
key: "production-release"
agents:
queue: "android"
-
in this case, stable is selected
- block: "Request release"
prompt: "Fill out the details for release"
fields:
- text: "Version"
key: "version"
hint: "Include the version according to the standard: 2.x.x.x"
required: true
- select: "Type"
key: "release-type"
default: "stable"
options:
- label: "Stable"
value: "stable"
- label: "Beta"
value: "beta"
- label: "Debug"
value: "debug"
key: "request-release"
- command: >
case $(buildkite-agent meta-data get "release-type") in
"stable") buildkite-agent pipeline upload .buildkite/stable.yml ;;
"beta") buildkite-agent pipeline upload .buildkite/beta.yml ;;
*) echo "Unknown release type" && exit 1
esac
label: ":rocket: - Release"
key: "choose-release"
agents:
queue: "android"
-
After uploaded I have new step, and I need to the get artifact:
steps:
- command:
- buildkite-agent artifact download /tmp/production.apk /tmp --step production-release
Can you help me with this? Again I understand that this is not the place, but I’ve been breaking my head for some time.