Posts

Showing posts from 2019

GitHub Actions - First Impressions

Image
In our earlier article on Git pipelines , we mentioned that GitHub had released a beta of Actions , their latest CI/CD workflow automation tool. Let's take a quick look at some of its features. For simplicity, we'll use the same example as in the previous article - that of rendering this article into HTML - which is more than enough to demonstrate the basic features. To recap, the workflow for Git pipelines was: Get the latest commit in the repository Install GNU Make Install pandoc which is used to render Markdown into HTML Render the HTML document from Markdown Archive HTML document The Actions based workflow is similar, but quite a bit simpler. It performs the following tasks: Get latest commit in the repository Render the HTML document from Markdown Publish the rendered HTML document to GitHub pages It's simpler, because we don't need to install the dependent software - we can use pre-prepared Docker Hub images instead. What are GitHub Actions? ...

Git Pipelines

Image
Git has become the de facto standard for version control, but until recently you needed external tools such as  Jenkins  or  GoCD  to manage Continuous Integration / Continuous Delivery (CI/CD) pipelines. Now, though, we're seeing vendors like  GitLab  and others providing pipeline features with extensible suites of tools to build, test and deploy code. These integrated CI/CD features greatly streamline solution delivery and have given rise to whole new ways of doing things like  GitOps . In this article we examine and compare some of the current pipeline features from three popular Git hosting sites:  GitLab ,  Bitbucket  and  GitHub , and ask the question: "Is it time to switch from your current CI/CD toolset?" Example Pipeline Let's use pipelines to render the  Git Markdown  version of this article into an HTML document. The pipeline features we are using: using Docker images to execute build tasks customisin...

Build R project using Make

Image
My default for building projects is to use make . I find it helps organise a projects workflow, even if there are other build tools available. It is succinct, and descriptive. A previous post showed how you can use make to build Haskell projects using GHC, Cabal and Stack. This blog show how to do the same for R projects. Below is an R script that can be used to render R markdown to PDF. It is invoked from a parent Makefile which is what is read when you call make. make.R #!/usr/bin/env R   # Render R markdown to PDF. # Invoke with: # > R -q -f make.R --args my_report.Rmd   # load packages require ( rmarkdown )   # require a parameter naming file to render if ( length ( args ) == 0 ) { stop ( "Error: missing file operand" , call. = TRUE ) } else { # read report to render from command line for ( rmd in commandArgs ( trailingOnly = TRUE ) ) { # render Rmd to PDF if ( grepl ( " \\ .Rmd$" , rmd ) &...