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

Update Release Drafter and Traffic Capture to define a variable for publishing version based on tag #582

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ jobs:
approvers: ${{ steps.get_data.outputs.approvers }}
minimum-approvals: 2
issue-title: 'Release opensearch-migrations version ${{ steps.get_data.outputs.version }}'
issue-body: "Please approve or deny the release of opensearch-migrations **TAG**: ${{ github.ref_name }} **COMMIT**: ${{ github.sha }} **VERSION** : ${{ steps.get_data.outputs.version }} "
issue-body: "This release requires approval from at least two reviewers. Please approve or deny the release of opensearch-migrations **TAG**: ${{ github.ref_name }} **COMMIT**: ${{ github.sha }} **VERSION**: ${{ steps.get_data.outputs.version }}. The published TrafficCapture version will be 0.${{ steps.get_data.outputs.version }}."
exclude-workflow-initiator-as-approver: true
- name: Download Repo Tar
# Preface Traffic Capture version with 0. to signal interface immaturity
run: |
wget https://github.com/opensearch-project/opensearch-migrations/archive/refs/tags/${{ steps.get_data.outputs.version }}.tar.gz -O artifacts.tar.gz
(cd TrafficCapture && ./gradlew publishMavenJavaPublicationToMavenRepository -Dbuild.snapshot=false && tar -C build -cvf traffic-capture-artifacts.tar.gz repository)
(cd TrafficCapture && ./gradlew publishMavenJavaPublicationToMavenRepository -Dbuild.snapshot=false -Dbuild.version=0.${{ steps.get_data.outputs.version }} && tar -C build -cvf traffic-capture-artifacts.tar.gz repository)
- name: Draft a release
uses: softprops/action-gh-release@v2
with:
Expand Down
4 changes: 3 additions & 1 deletion TrafficCapture/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ subprojects {


group = 'org.opensearch.migrations.trafficcapture'
version = '0.1.0'

// support -Dbuild.version, but include default
version = System.getProperty("build.version", "0.1.0")

// support -Dbuild.snapshot=false, but default to true
if (System.getProperty("build.snapshot", "true") == "true") {
Expand Down