You will need to configure this integration to store credentials for artifactory.
- Click on the gear icon for Account Settings in your top navigation bar and then click on the 'Integrations' section.
- Click on the Add Integration button.
- For 'Integration type', choose JFrog Artifactory from the list of dropdown choices.
- For 'Integration Name' use a distinctive name that's easy to associate to the integration and recall. Example: jfrog
- Enter your HTTP Endpoint(url), username, password. Click on Save.
The integration will now be available to all your continuous integration.
To add JFrog Artifactory integration to your subscription, do the following:
- Select your Subscription from the dropdown burger bar menu on the top left.
- Click the 'Settings' tab and go to the 'Integrations' section.
- Click the Add Integration button.
- Provide an easy-to-remember name for the Jfrog Artifactory integration for your Subscription, such as
jfrog
, in the 'Name' field. IMPORTANT: The 'Name' you have entered in this step should be used in yourshippable.yml
file. Both names should be exactly the same. If not the build will fail with an error. - From the 'Account Integrations' dropdown select the JFrog Artifactory account integration created.
- Click the
Save
button. - The JFrog Artifactory integration will show up in the list of integrations for your subscription.
Here's an example , for reference to configure JFrog Artifactory integration in shippable.yml
.
integrations:
hub:
- integrationName: jfrog
type: artifactory
This example will use the maven artifactory plugin. You will need to edit contextUrl, username, password of plugin configuration. The HTTP Endpoint(url), username, password you gave for account integration in step 1 will be available in build enviornment variables ARTIFACTORY_URL
, ARTIFACTORY_USERNAME
and ARTIFACTORY_PASSWORD
. Maven artifactory plugin supports enviornment variables and hence mentioned envs can be used in your plugin configration.
Here's an example as of maven artifactory plugin configuration:
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>2.4.1</version>
<inherited>false</inherited>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<deployProperties>
<gradle>awesome</gradle>
</deployProperties>
<artifactory>
<includeEnvVars>true</includeEnvVars>
<timeoutSec>60</timeoutSec>
<propertiesFile>publish.properties</propertiesFile>
</artifactory>
<publisher>
<contextUrl>{{ARTIFACTORY_URL}}</contextUrl>
<username>{{ARTIFACTORY_USERNAME}}</username>
<password>{{ARTIFACTORY_PASSWORD}}</password>
<excludePatterns>*-tests.jar</excludePatterns>
<repoKey>libs-release-local</repoKey>
<snapshotRepoKey>libs-snapshot-local</snapshotRepoKey>
</publisher>
<buildInfo>
<buildName>plugin-demo</buildName>
<buildNumber>1</buildNumber>
<buildUrl>http://build-url.org</buildUrl>
</buildInfo>
<licenses>
<autoDiscover>true</autoDiscover>
<includePublishedArtifacts>false</includePublishedArtifacts>
<runChecks>true</runChecks>
<scopes>compile,runtime</scopes>
<violationRecipients>[email protected]</violationRecipients>
</licenses>
</configuration>
</execution>
</executions>
</plugin>
Now you can initiate push into your JFrog Artifactory with mvn deploy
in build ci section of shippable.yml
.
Here's an example of configuring your yml to run command during build:
build:
ci:
- mvn deploy