Artifacts not carrying over (OD-394)
Nick Leffler opened 4 years ago

Hi, when I use the * or ** for a step to carry over artifacts after the git clone no artifacts are carrier over. Is there something I'm doing wrong?

  • Robin Shen commented 4 years ago

    I am not sure what do you mean about "carry over artifacts". If you mean to pass artifacts between steps, you do not need to do anything, as all steps in a single job will run on a single node and share the same job workspace. If you mean to pass artifacts between different jobs, you will need to make the downstream job depending on the job publishing artifacts via dependencies & services section

  • Nick Leffler commented 4 years ago

    Yes moving artifacts between different jobs. I add the first job to the section for a dependency then ** to the artifacts and they don't move over.

  • Robin Shen commented 4 years ago

    Please check build result of the first job to see if the artifacts really got published. Also I set up a simple case and it works. Below is my build spec. You may copy it to a test project to check:

    version: 9
    jobs:
    - name: job1
      steps:
      - !CommandStep
        name: generate files
        image: alpine
        commands:
        - echo "hello" > somefile
        useTTY: false
        condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
      - !PublishArtifactStep
        name: publish files
        artifacts: '**'
        condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
      retryCondition: never
      maxRetries: 3
      retryDelay: 30
      cpuRequirement: 250m
      memoryRequirement: 128m
      timeout: 3600
    - name: job2
      steps:
      - !CommandStep
        name: list all files
        image: alpine
        commands:
        - ls
        useTTY: false
        condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
      jobDependencies:
      - jobName: job1
        requireSuccessful: true
        artifacts: '**'
      retryCondition: never
      maxRetries: 3
      retryDelay: 30
      cpuRequirement: 250m
      memoryRequirement: 128m
      timeout: 3600
    
  • Robin Shen changed state to 'Closed' 4 years ago
    Previous Value Current Value
    Open
    Closed
  • Nick Leffler commented 4 years ago

    OK, so this only moves files over that were done with a script? I'm trying to have a job for cloning then a job after that for building. Do the clone jobs pull any data over or is it only the data that is made via a script copied over? I apologize I'm not sure of the best way to ask.

  • Robin Shen commented 4 years ago

    This is just for an example. You can of course transfer cloned files between jobs. Please post your build spec here as well as your example git repository, and I will check what might be wrong.

  • Nick Leffler commented 4 years ago

    HERE is an example that doesn't work.

  • Robin Shen commented 4 years ago

    The checkout job needs to add an artifact publish step after checkout step to publish desired files as artifacts, the subsequent dependent job can then retrieve those published artifacts

  • Nick Leffler commented 4 years ago

    Awesome. Thanks. That worked.

issue 1/1
Type
Bug
Priority
Minor
Assignee
Affected Versions
Not Found
Issue Votes (0)
Watchers (3)
Reference
OD-394
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover