Skip to content
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

Migrating from CLI to Gradle Plugin #103

Open
Yay295 opened this issue Jan 22, 2024 · 0 comments
Open

Migrating from CLI to Gradle Plugin #103

Yay295 opened this issue Jan 22, 2024 · 0 comments
Labels
question Further information is requested

Comments

@Yay295
Copy link

Yay295 commented Jan 22, 2024

How can we help?

I'm currently uploading an EAR file (after building it with Gradle) using the following commands:

SET APP_NAME=my-app

REM Set JFrog variables from Jenkins variables.
SET JFROG_CLI_BUILD_NAME=%JOB_NAME:/= :: %
SET JFROG_CLI_BUILD_NUMBER=%BUILD_NUMBER%
SET JFROG_CLI_BUILD_URL=%BUILD_URL%

jf config add artifactory --overwrite --url=https://artifactory.xxx.yyy --user="%ART_USER%" --password="%ART_PASS%"
jf rt upload ".gradle_build\distributions\*.ear" "zzz/yyy/xxx/zz/%APP_NAME%/%RELEASE%-SNAPSHOT/%APP_NAME%-%RELEASE%-SNAPSHOT.ear"
jf rt build-publish

I've been looking into using the Gradle plugin instead, but I'm not sure what all needs to be set. This is what I have right now:

artifactory {
    publish {
        contextUrl = 'https://artifactory.xxx.zzz'
        repository {
            username = System.getenv('ART_USER')
            password = System.getenv('ART_PASS')
        }
        buildInfo {
            buildName = System.getenv('JOB_NAME').replace('/',' :: ')
            buildNumber = System.getenv('BUILD_NUMBER')
            buildUrl = System.getenv('BUILD_URL' )
        }
    }
}

What am I missing to get the plugin configured to work the same as the CLI commands?

@Yay295 Yay295 added the question Further information is requested label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant