drill icon indicating copy to clipboard operation
drill copied to clipboard

DRILL-8277: Publish SNAPSHOT artifacts to the Apache snapshots repo from CI

Open jnturton opened this issue 3 years ago • 2 comments
trafficstars

DRILL-8277: Publish SNAPSHOT artifacts to the Apache snapshots repo from CI

Description

It is possible to publish snapshot artifiacts from the current, unrelased version of Drill by using the mvn deploy goal. This publishes the aritifacts to https://repository.apache.org/content/repositories/snapshots/org/apache/drill. Developers who would like to program against these artifacts in anticipation of the upcoming release, say 2.0.0, can do so by adding the Apache snapshots repository to their project and dependency entries like

    <dependency>
      <groupId>org.apache.drill.exec</groupId>
      <artifactId>drill-java-exec</artifactId>
      <version>2.0.0-SNAPSHOT</version>
    </dependency> 

Documentation

New plugin authoring documentation once the question of feasability of developing plugins away from the Drill source tree is totally settled.

Testing

I've been testing the mvn deploy command from my dev machine. The new step in the checkstyle and protobuf GitHub Actions job will be tested here in GitHub wit hthe PR in Draft mode. A final commit will modify the condition used to determine whether the new step will run so that it only runs when a new commit reaches master.

jnturton avatar Aug 10 '22 12:08 jnturton

The reason that the snapshot artifact publishing is run inside the existing checkstyle and protobufs jobs is an attempt at efficiency. Maven will not need to rebuild all the Drill artifacts since they were just built in the "Build" step. If this overly eager optimisation and it is preferred to move the snapshot artifact publishing out to its own job (which is probably more clearly reported on here in the GH web UI) then let me know...

jnturton avatar Aug 10 '22 12:08 jnturton

If this overly eager optimisation and it is preferred to move the snapshot artifact publishing out to its own job (which is probably more clearly reported on here in the GH web UI) then let me know...

It was premature optimisation. Once again the temptation was just too much to resist. This job is not that heavy and it only runs when commits reach master which is not partiicularly often. It's also nice to be able to manually launch the snapshot publishing indepedently. So I've factored it out to its own workflow.

jnturton avatar Aug 10 '22 13:08 jnturton

@vvysotskyi GitHub secrets are not visible to PRs so the new snapshot artifact deployment workflow cannot run successfully here. Therefore, please review the following workflow run which I triggered by pushing a temporary branch to this repo instead.

https://github.com/apache/drill/runs/7805509131

The outputs of that run landed here.

https://repository.apache.org/content/repositories/snapshots/org/apache/drill/

jnturton avatar Aug 12 '22 12:08 jnturton