-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to share artifacts between jobs when running locally? #762
Comments
You can use Also see |
Thanks @edigaryev. This is some workaround. Actually I have a specific use-case in mind and would love to hear how you'd approach it. I have a Java program that I want to compile with modern JDK 21, but then I want to test it on an older JDK 11. I made the following Cirrus config for this purpose: build_task:
container:
image: azul/zulu-openjdk-alpine:21-latest
create_file_script: |
cat >Main.java <<EOF
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
EOF
compile_script: javac --release 11 Main.java
binary_artifacts:
path: Main.class
test_task:
name: test
container:
image: azul/zulu-openjdk-alpine:11-latest
depends_on:
- build
java_info_script: java --version
run_classfile_script: |
cd local_artifacts/build/binary
java Main It passes when I run it locally like so: cirrus run --output plain --artifacts-dir local_artifacts --dirty Output
My question is: what would be the easiest/recommended way to also make this work on Cirrus CI (the cloud)? I read the docs for |
You can use dynamic links to the current build's artifacts, explained in the "URLs to the artifacts section" of the Artifacts Instruction section: Unfortunately, Cirrus CLI doesn't support such links yet, but a possible solution is to parametrize the |
Thanks @edigaryev! I also like that idea. Being able to use |
IMO mimic the REST API is a bit too much for the CLI. @bartekpacia you can use either |
I want to create
file.txt
in the first task and then download it from the second task when running Cirrus CLI locally..cirrus.yaml
Output
Is it possible? How can I download that artifact in the second task?
The text was updated successfully, but these errors were encountered: