OCCRA
Go to Post [In FIRST]...Arab and Israeli students speak on the same level, because they are alliance partners. - Tottanka [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 12-04-2018, 10:43 PM
gerthworm's Avatar
gerthworm gerthworm is online now
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 737
gerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond repute
Gradle fileTreeArtifact not replacing files

Hi all, gradle question for the experts. I'm fairly certain I'm just not googling the right terms, so figured I'd describe it here.

We have a set of extra files we are looking to copy from the local repo over to the roboRIO on every deploy. Build avoidance is great, but I'd be fine if we just blindly copied over the files each time. Gradle, however, is reporting that every time we attempt to run the deploy, the files are "up to date" and doesn't attempt to copy them, even if we changed them relative to what is on the RIO.

For now we're just ssh'ing into the roboRIO and removing the folder on the remote target any time we know we want the files to update, but this is not optimal for the build season.

The snippet of how we're currently attempting to do it:
Code:
    artifacts {
    
        //Main roboRIO Java .jar artifact
        artifact('frcJava', edu.wpi.first.gradlerio.frc.FRCJavaArtifact) {
            targets << "roborio"
            // Debug can be overridden by command line, for use with VSCode
            debug = getDebugOrDefault(false)
        }
        
        // Casserole WebServer support Files Deploy
        fileTreeArtifact('CasseroleWebServerFileDeploy') {
            targets << "roborio"                   // Web server should deploy to RIO
            files = fileTree(dir: './resources')   // Dev PC location for files
            directory = '/home/lvuser/resources/'  // RoboRIO location to deploy to
        }

        //Build info file deploy 
        fileArtifact('BuildInfoDeploy') {
            targets << "roborio"                  // build info should deploy to RIO 
            file = file(BUILD_INFO_FILE)          // Dev PC location for file
            directory = '/home/lvuser/resources/' // RoboRIO location to deploy to
        }
    }
So, the question: Is there any easy way to get the fileTreeArtifact() to "always copy"? Mark the files as always dirty, or never up-to-date? Or is there something more fundamental about what we're doing that's incorrect?
Reply With Quote
  #2   Spotlight this post!  
Unread 12-05-2018, 12:57 AM
Jaci's Avatar
Jaci Jaci is online now
http://imjac.in/ta/name
AKA: Jaci R Brunning
FRC #5333 (Can't C#) #5663 (Ground Control) | (OpenRIO, FRC West Aus)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 633
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: Gradle fileTreeArtifact not replacing files

Two things:

Can you run with `--debug` and send me the log? Gradle checks for file changes by taking the MD5 sum of the two files.

You can skip the cache check by setting `cache = null` or `cache = false` in your artifact block. (Make sure you do this after doing the debug build, not before!)
__________________

Curtin FRC (5333+5663) : Head Mentor
WPILib : Developer

Website | Github
jaci.brunning@gmail.com
Reply With Quote
  #3   Spotlight this post!  
Unread 12-08-2018, 07:35 AM
gerthworm's Avatar
gerthworm gerthworm is online now
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 737
gerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond repute
Re: Gradle fileTreeArtifact not replacing files

Public followup: Seems like the issue was non-reproducible. Logs confirm in the alpha software the Hash-based mechanism for comparing files and only deploying changed ones is up and functional....
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 08:18 PM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi