setup-jfrog-cli icon indicating copy to clipboard operation
setup-jfrog-cli copied to clipboard

jf rt u source to destination says success but doesn't upload the artifact to the repository

Open igorcosta opened this issue 1 year ago • 3 comments

Describe the bug

Working a demo with a simple goal of uploading a terraform module to Artifactory, the workflow file works fine and everything execute according to plan, but when checking the files at Artifactory it's not uploading, it says upload but doesn't count the success as 1.

Steps to reproduce:

GitHub Workflow file.

name: "github-repo-creation-workflow"

on:
  workflow_dispatch:
  push:
    branches:
      - main
jobs:
  Plan:
    name: Plan
    runs-on: ubuntu-latest
    steps:
      - name: Checkout out code
        uses: actions/checkout@v3
      - name: Set up terraform
        uses: hashicorp/setup-terraform@v2
      - name: Terraform fmt
        run: terraform fmt -recursive
      - name: terraform init
        run: terraform init
      - name: terraform plan
        run: terraform plan
      - name: save plan
        run: | 
          mkdir artifacts
          terraform plan -out=artifacts/file_provision.zip
      - name: upload artifact
        uses: actions/upload-artifact@v3
        with:
          name: terraform-plan
          path: artifacts/file_provision.zip
  Internal:
    name: Test JFrog Artifactory
    needs: Plan
    runs-on: [ubuntu-latest]
    steps:
      - name: download artifact
        uses: actions/download-artifact@v3
        with:
          name: terraform-plan
          path: artifacts/file_provision.zip
        
      - name: Display structure of downloaded files
        run: ls -R
        working-directory: artifacts
      - name: Setup JFrog
        uses: jfrog/setup-jfrog-cli@v3
        env:
          JF_URL: ${{ vars.JFROG_URL }}
          JF_ACCESS_TOKEN: ${{ secrets.JFROG_TF }}
      - name: ping artifactory
        run: |
          jf rt ping --insecure-tls
      - name: upload artifacts 
        run: jf rt u artifacts/file_provision.zip target-repo

Current behavior

Execute successfully but it doesn't upload the file.

Run jfrog/setup-jfrog-cli@v3
Setup JFrog CLI
1s
Run jf rt ping --insecure-tls
OK
[1](https://github.com/customer-demo/jfrog-demo/actions/runs/5485004767/jobs/9993263291#step:5:1)s
Run jf rt u artifacts/file_provision.zip generic-local
{
  "status": "success",
  "totals": {
    "success": 0,
    "failure": 0
  }
}

Reproduction steps

No response

Expected behavior

To upload the file.

Setup JFrog CLI version

latest version

JFrog CLI version

lastest version

Workflow operating system type and version

ubuntu

JFrog Artifactory version (if relevant)

No response

JFrog Xray version (if relevant)

No response

igorcosta avatar Jul 07 '23 09:07 igorcosta