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

ci: Publishing and downloading flank scripts #1361

Merged

Conversation

piotradamczyk5
Copy link
Contributor

@piotradamczyk5 piotradamczyk5 commented Nov 27, 2020

Fixes #1347

flank-scripts is now published to JFrog Bintray [1], so instead of building flank-scripts each time when running some workflow on GitHub actions or when you need it, you could just download it using simple gradle task[2].
flank-scripts support now versioning, so there is a requirement to update its version each time you changed some files inside flank-scripts directory, otherwise, detekt task will fail[3].
Each GitHub actions workflow is updated to download latest version instead of building flank-scripts to save time and resources.[4]

Test Plan

How do we know the code works?

[1]

  1. Run gradlew :flank-scripts:bintrayUpload (bintray account needed)
  2. Flank scripts should be updated on bintray

[2]

  1. Run gradlew :flank-scripts:download
  2. flankScripts.jar should be downloaded to flank-scripts/bash

[3]

  1. Change some files under flank-scripts
  2. Run gradlew check or gradlew detekt
  3. Gradle task should failed (please notice that in current PR, version is updated)
  4. Update version in flank-scripts/build.gradle.kts
  5. Run gradlew check or gradlew detekt
  6. Gradle task should succeed

[4]

  1. Check if all workflows has replaced
- name: Gradle Build flankScripts and add it to PATH
        run: |
          ./flank-scripts/bash/buildFlankScripts.sh
          echo "./flank-scripts/bash" >> $GITHUB_PATH

to

- name: Download flankScripts and add it to PATH
        run: |
          ./gradlew :flank-scripts:download
          echo "./flank-scripts/bash" >> $GITHUB_PATH

Checklist

  • Publish Flank-scripts to JFrog Bintray
  • Create Github workflow which will make it after each push to master
  • Create task to download latest version from JFrog Bintray
  • Replace Github actions Workflow building to downloading flank-scripts
  • Add method to prevent merging flank-scripts without version update

@piotradamczyk5 piotradamczyk5 force-pushed the #1347_publishing_and_downloading_flank_scripts branch from 4a4624a to 87ba5a2 Compare November 30, 2020 13:15
@piotradamczyk5 piotradamczyk5 force-pushed the #1347_publishing_and_downloading_flank_scripts branch from dc12d96 to 5fa8d7a Compare November 30, 2020 13:38
@codecov-io
Copy link

codecov-io commented Nov 30, 2020

Codecov Report

Merging #1361 (f778dcd) into master (23b269b) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1361      +/-   ##
============================================
+ Coverage     77.81%   77.83%   +0.02%     
  Complexity      705      705              
============================================
  Files           244      244              
  Lines          4693     4693              
  Branches        901      901              
============================================
+ Hits           3652     3653       +1     
  Misses          550      550              
+ Partials        491      490       -1     

@github-actions
Copy link
Contributor

github-actions bot commented Nov 30, 2020

Timestamp: 2020-12-01 09:10:10
Buildscan url for ubuntu-workflow run 393473025
https://gradle.com/s/celdo2gus7oue

@piotradamczyk5 piotradamczyk5 marked this pull request as ready for review November 30, 2020 14:14
pom {
name.set("Flank-scripts")
description.set("Scripts for Flank")
url.set("https://github.com/flank/flank")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Flank/flank

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@adamfilipow92 adamfilipow92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Tested, upload/download works
  • Code looks good

@piotradamczyk5 piotradamczyk5 merged commit f953384 into master Dec 1, 2020
@piotradamczyk5 piotradamczyk5 deleted the #1347_publishing_and_downloading_flank_scripts branch December 1, 2020 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publish Flank scripts after each change
4 participants