From ad63258b11ef452119a2ab3f5fbc084c50d78294 Mon Sep 17 00:00:00 2001 From: avahoffman Date: Thu, 16 May 2024 22:39:26 -0400 Subject: [PATCH 01/67] Add anvil image --- ottr_anvil/Dockerfile | 78 ++++++++++++++++++++++++++++++ ottr_anvil/github_package_list.tsv | 8 +++ ottr_anvil/install_github.R | 52 ++++++++++++++++++++ 3 files changed, 138 insertions(+) create mode 100644 ottr_anvil/Dockerfile create mode 100644 ottr_anvil/github_package_list.tsv create mode 100644 ottr_anvil/install_github.R diff --git a/ottr_anvil/Dockerfile b/ottr_anvil/Dockerfile new file mode 100644 index 0000000..04dc76f --- /dev/null +++ b/ottr_anvil/Dockerfile @@ -0,0 +1,78 @@ +FROM rocker/tidyverse:4.4.0 +LABEL maintainer="avamariehoffman@gmail.com" +WORKDIR /rocker-build/ + +COPY install_github.R . + +# Install apt-getable packages to start +RUN apt-get update && apt-get install -y --no-install-recommends apt-utils dialog +RUN apt-get install -y --no-install-recommends \ + libxt6 \ + libpoppler-cpp-dev \ + vim \ + libglpk40 \ + curl \ + gpg + +# Install gh +RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg; +RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null; +RUN apt update && apt install -y gh; + +# Uninstall old version of pandoc +RUN sudo apt-get purge pandoc pandoc-citeproc pandoc-data \ + && sudo apt-get autoremove --purge + +# Install pandoc +RUN wget https://github.com/jgm/pandoc/releases/download/2.14.1/pandoc-2.14.1-1-amd64.deb \ + && sudo apt-get install ./pandoc-2.14.1-1-amd64.deb + +# Create new symlinks +RUN ln -s /usr/bin/pandoc /usr/lib/rstudio-server/bin/pandoc + +# Add curl, bzip2 +RUN apt-get update -qq && apt-get -y --no-install-recommends install \ + bzip2 \ + curl + +# Install pip3 and installation tools +RUN apt-get -y --no-install-recommends install \ + python3-pip python3-dev + +RUN Rscript -e "remove.packages('rlang')" + +# Commonly used R packages +RUN Rscript -e "options(warn = 2);install.packages( \ + c('rlang', \ + 'bookdown', \ + 'emojifont', \ + 'here', \ + 'leanpubr', \ + 'optparse', \ + 'oro.nifti', \ + 'qpdf', \ + 'R.utils', \ + 'rprojroot', \ + 'rgoogleslides', \ + 'servr', \ + 'spelling', \ + 'styler', \ + 'reticulate', \ + 'googlesheets4', \ + 'tibble'), \ + repos = 'https://cloud.r-project.org/')" + +# cow needs this dependency: +RUN Rscript -e "devtools::install_version('gitcreds', version = '0.1.1', repos = 'http://cran.us.r-project.org')" + +# Copy over git token and package list +COPY git_token.txt . +COPY github_package_list.tsv . + +# Install packages from github +RUN Rscript install_github.R \ + --packages github_package_list.tsv \ + --token git_token.txt + +# Set final workdir for commands +WORKDIR /home/rstudio diff --git a/ottr_anvil/github_package_list.tsv b/ottr_anvil/github_package_list.tsv new file mode 100644 index 0000000..d25f995 --- /dev/null +++ b/ottr_anvil/github_package_list.tsv @@ -0,0 +1,8 @@ +rstudio/rmarkdown HEAD +yihui/xfun HEAD +yihui/knitr HEAD +jhudsl/ottrpal HEAD +tidyverse/rvest 4fe39fb5089512d77b6a9cc026e5c895258ff6ce +R-lib/testthat e99155af85261e065192feb946dcfa6679cffae4 +rstudio/bookdown HEAD +jhudsl/cow HEAD \ No newline at end of file diff --git a/ottr_anvil/install_github.R b/ottr_anvil/install_github.R new file mode 100644 index 0000000..fb532ec --- /dev/null +++ b/ottr_anvil/install_github.R @@ -0,0 +1,52 @@ +#!/usr/bin/env Rscript + +if (!"optparse" %in% installed.packages()) { + install.packages("optparse") +} + +library(optparse) + +################################ Set up options ################################ +# Set up optparse options +option_list <- list( + make_option( + opt_str = c("-p", "--packages"), type = "character", + default = "github_package_list.tsv" , + help = "Path to a TSV with a list of packages to be installed through Github, + where file where the first column is the github package name e.g. + jhudsl/ottrpal and the second column is the commit ID to be installed + (to be supplied to the ref argument). + ", + metavar = "character" + ), + make_option( + opt_str = c("--token"), type = "character", + default = NULL, + help = "GITHUB PAT file", + metavar = "character" + ) +) + +# Parse options +opt <- parse_args(OptionParser(option_list = option_list)) + +# Read in the token +token <- as.character(readLines(opt$token)[1]) + +# Reset GITHUB PAT to be token +Sys.unsetenv("GITHUB_PAT") +Sys.setenv(GITHUB_PAT = token) + +# set up list of packages to install +packages <- readr::read_tsv(opt$packages, + col_names = c("package_name", "ref")) + +purrr::pmap( + packages, + ~remotes::install_github(..1, + auth_token = token, + ref = ..2) + ) + +# Remove the file after we are done +file.remove(opt$token) From df968ad325bd3bbdcf30e0cbb95dc6715c87f5f4 Mon Sep 17 00:00:00 2001 From: avahoffman Date: Thu, 16 May 2024 22:49:14 -0400 Subject: [PATCH 02/67] remove old pandoc --- ottr_anvil/Dockerfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ottr_anvil/Dockerfile b/ottr_anvil/Dockerfile index 04dc76f..85923c8 100644 --- a/ottr_anvil/Dockerfile +++ b/ottr_anvil/Dockerfile @@ -19,10 +19,6 @@ RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | g RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null; RUN apt update && apt install -y gh; -# Uninstall old version of pandoc -RUN sudo apt-get purge pandoc pandoc-citeproc pandoc-data \ - && sudo apt-get autoremove --purge - # Install pandoc RUN wget https://github.com/jgm/pandoc/releases/download/2.14.1/pandoc-2.14.1-1-amd64.deb \ && sudo apt-get install ./pandoc-2.14.1-1-amd64.deb From 24fc62036e25b05ba84896c23699a8767618afc6 Mon Sep 17 00:00:00 2001 From: avahoffman Date: Thu, 16 May 2024 23:01:34 -0400 Subject: [PATCH 03/67] pivot, use quarto --- ottr_anvil/Dockerfile | 78 +++++++------------------------------------ 1 file changed, 12 insertions(+), 66 deletions(-) diff --git a/ottr_anvil/Dockerfile b/ottr_anvil/Dockerfile index 85923c8..cc8d25f 100644 --- a/ottr_anvil/Dockerfile +++ b/ottr_anvil/Dockerfile @@ -1,74 +1,20 @@ -FROM rocker/tidyverse:4.4.0 -LABEL maintainer="avamariehoffman@gmail.com" -WORKDIR /rocker-build/ +FROM jhudsl/base_ottr:main +LABEL maintainer="cansav09@gmail.com" -COPY install_github.R . - -# Install apt-getable packages to start -RUN apt-get update && apt-get install -y --no-install-recommends apt-utils dialog -RUN apt-get install -y --no-install-recommends \ - libxt6 \ - libpoppler-cpp-dev \ - vim \ - libglpk40 \ +RUN apt-get update && apt-get install -y --no-install-recommends \ + pandoc \ + pandoc-citeproc \ curl \ - gpg - -# Install gh -RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /usr/share/keyrings/githubcli-archive-keyring.gpg; -RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null; -RUN apt update && apt install -y gh; - -# Install pandoc -RUN wget https://github.com/jgm/pandoc/releases/download/2.14.1/pandoc-2.14.1-1-amd64.deb \ - && sudo apt-get install ./pandoc-2.14.1-1-amd64.deb - -# Create new symlinks -RUN ln -s /usr/bin/pandoc /usr/lib/rstudio-server/bin/pandoc - -# Add curl, bzip2 -RUN apt-get update -qq && apt-get -y --no-install-recommends install \ - bzip2 \ - curl + gdebi-core \ + && rm -rf /var/lib/apt/lists/* -# Install pip3 and installation tools -RUN apt-get -y --no-install-recommends install \ - python3-pip python3-dev +RUN curl -LO https://quarto.org/download/latest/quarto-linux-amd64.deb +RUN gdebi --non-interactive quarto-linux-amd64.deb -RUN Rscript -e "remove.packages('rlang')" - -# Commonly used R packages +# Install quarto R package RUN Rscript -e "options(warn = 2);install.packages( \ - c('rlang', \ - 'bookdown', \ - 'emojifont', \ - 'here', \ - 'leanpubr', \ - 'optparse', \ - 'oro.nifti', \ - 'qpdf', \ - 'R.utils', \ - 'rprojroot', \ - 'rgoogleslides', \ - 'servr', \ - 'spelling', \ - 'styler', \ - 'reticulate', \ - 'googlesheets4', \ - 'tibble'), \ - repos = 'https://cloud.r-project.org/')" - -# cow needs this dependency: -RUN Rscript -e "devtools::install_version('gitcreds', version = '0.1.1', repos = 'http://cran.us.r-project.org')" - -# Copy over git token and package list -COPY git_token.txt . -COPY github_package_list.tsv . - -# Install packages from github -RUN Rscript install_github.R \ - --packages github_package_list.tsv \ - --token git_token.txt + c('tidyverse', 'googlesheets4'), \ + repos = 'https://cloud.r-project.org/')" # Set final workdir for commands WORKDIR /home/rstudio From 87e01980f7212da118b26d5bbe420c5199ed4da8 Mon Sep 17 00:00:00 2001 From: avahoffman Date: Wed, 22 May 2024 13:36:38 -0400 Subject: [PATCH 04/67] simplify --- ottr_anvil/Dockerfile | 17 ++-------- ottr_anvil/github_package_list.tsv | 8 ----- ottr_anvil/install_github.R | 52 ------------------------------ 3 files changed, 2 insertions(+), 75 deletions(-) delete mode 100644 ottr_anvil/github_package_list.tsv delete mode 100644 ottr_anvil/install_github.R diff --git a/ottr_anvil/Dockerfile b/ottr_anvil/Dockerfile index cc8d25f..20aaf70 100644 --- a/ottr_anvil/Dockerfile +++ b/ottr_anvil/Dockerfile @@ -1,20 +1,7 @@ FROM jhudsl/base_ottr:main -LABEL maintainer="cansav09@gmail.com" +LABEL maintainer="avamariehoffman@gmail.com" -RUN apt-get update && apt-get install -y --no-install-recommends \ - pandoc \ - pandoc-citeproc \ - curl \ - gdebi-core \ - && rm -rf /var/lib/apt/lists/* - -RUN curl -LO https://quarto.org/download/latest/quarto-linux-amd64.deb -RUN gdebi --non-interactive quarto-linux-amd64.deb - -# Install quarto R package +# Install googlesheets4 and tidyverse RUN Rscript -e "options(warn = 2);install.packages( \ c('tidyverse', 'googlesheets4'), \ repos = 'https://cloud.r-project.org/')" - -# Set final workdir for commands -WORKDIR /home/rstudio diff --git a/ottr_anvil/github_package_list.tsv b/ottr_anvil/github_package_list.tsv deleted file mode 100644 index d25f995..0000000 --- a/ottr_anvil/github_package_list.tsv +++ /dev/null @@ -1,8 +0,0 @@ -rstudio/rmarkdown HEAD -yihui/xfun HEAD -yihui/knitr HEAD -jhudsl/ottrpal HEAD -tidyverse/rvest 4fe39fb5089512d77b6a9cc026e5c895258ff6ce -R-lib/testthat e99155af85261e065192feb946dcfa6679cffae4 -rstudio/bookdown HEAD -jhudsl/cow HEAD \ No newline at end of file diff --git a/ottr_anvil/install_github.R b/ottr_anvil/install_github.R deleted file mode 100644 index fb532ec..0000000 --- a/ottr_anvil/install_github.R +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env Rscript - -if (!"optparse" %in% installed.packages()) { - install.packages("optparse") -} - -library(optparse) - -################################ Set up options ################################ -# Set up optparse options -option_list <- list( - make_option( - opt_str = c("-p", "--packages"), type = "character", - default = "github_package_list.tsv" , - help = "Path to a TSV with a list of packages to be installed through Github, - where file where the first column is the github package name e.g. - jhudsl/ottrpal and the second column is the commit ID to be installed - (to be supplied to the ref argument). - ", - metavar = "character" - ), - make_option( - opt_str = c("--token"), type = "character", - default = NULL, - help = "GITHUB PAT file", - metavar = "character" - ) -) - -# Parse options -opt <- parse_args(OptionParser(option_list = option_list)) - -# Read in the token -token <- as.character(readLines(opt$token)[1]) - -# Reset GITHUB PAT to be token -Sys.unsetenv("GITHUB_PAT") -Sys.setenv(GITHUB_PAT = token) - -# set up list of packages to install -packages <- readr::read_tsv(opt$packages, - col_names = c("package_name", "ref")) - -purrr::pmap( - packages, - ~remotes::install_github(..1, - auth_token = token, - ref = ..2) - ) - -# Remove the file after we are done -file.remove(opt$token) From 0c56103728e1eb0c91dd7b854aa3f138f6cb1f4d Mon Sep 17 00:00:00 2001 From: AM Hoffman Date: Thu, 30 May 2024 15:56:33 -0400 Subject: [PATCH 05/67] Add `kableExtra` --- ottr_anvil/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ottr_anvil/Dockerfile b/ottr_anvil/Dockerfile index 20aaf70..a688561 100644 --- a/ottr_anvil/Dockerfile +++ b/ottr_anvil/Dockerfile @@ -3,5 +3,5 @@ LABEL maintainer="avamariehoffman@gmail.com" # Install googlesheets4 and tidyverse RUN Rscript -e "options(warn = 2);install.packages( \ - c('tidyverse', 'googlesheets4'), \ + c('tidyverse', 'googlesheets4', 'kableExtra'), \ repos = 'https://cloud.r-project.org/')" From 1c13cbe05b59bd94dcb5e90ce5f07f0540511a0c Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Fri, 28 Jun 2024 11:55:25 -0400 Subject: [PATCH 06/67] Rearrnage order of install steps --- base_ottr/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/base_ottr/Dockerfile b/base_ottr/Dockerfile index 17bc514..97a2511 100644 --- a/base_ottr/Dockerfile +++ b/base_ottr/Dockerfile @@ -46,9 +46,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ RUN Rscript -e "remove.packages('rlang')" -RUN curl -LO https://quarto.org/download/latest/quarto-linux-amd64.deb -RUN gdebi --non-interactive quarto-linux-amd64.deb - # Commonly used R packages RUN Rscript -e "options(warn = 2);install.packages( \ c('rlang', \ @@ -73,6 +70,9 @@ RUN Rscript -e "options(warn = 2);install.packages( \ 'quarto'), \ repos = 'https://cloud.r-project.org/')" +RUN curl -LO https://quarto.org/download/latest/quarto-linux-amd64.deb +RUN gdebi --non-interactive quarto-linux-amd64.deb + # cow needs this dependency: RUN Rscript -e "devtools::install_version('gitcreds', version = '0.1.1', repos = 'http://cran.us.r-project.org')" From f6f42e0d03c042c86aa20fea405d9557bfcfcd23 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Thu, 15 Aug 2024 13:45:07 -0400 Subject: [PATCH 07/67] Update docker-test.yml --- .github/workflows/docker-test.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index 2e6f684..bbf87e9 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -51,15 +51,6 @@ jobs: restore-keys: | ${{ runner.os }}-buildx- - - name: Build - uses: docker/build-push-action@v4 - with: - push: false - context: ${{ inputs.directory }} - file: ${{ inputs.directory }}/Dockerfile - platforms: linux/amd64 - tags: ${{ inputs.tag }} - # Login to Dockerhub - name: Login to DockerHub if: ${{ inputs.dockerhubpush != 'false' }} @@ -67,8 +58,13 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build + uses: docker/build-push-action@v4 + with: + push: ${{ inputs.dockerhubpush }} + context: ${{ inputs.directory }} + file: ${{ inputs.directory }}/Dockerfile + platforms: linux/amd64 + tags: ${{ inputs.tag }} - # Push the Docker image if set to true from a manual trigger - - name: Push Docker image if manual trigger set to true - if: ${{ inputs.dockerhubpush != 'false' }} - run: docker push ${{ inputs.tag }} From 71fab318915b50166e818e05811ef4e4ccbe59c8 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Thu, 15 Aug 2024 13:51:07 -0400 Subject: [PATCH 08/67] Update docker-test.yml --- .github/workflows/docker-test.yml | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index bbf87e9..c4c80e4 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -38,29 +38,18 @@ jobs: - name: checkout repo uses: actions/checkout@v3 - # Set up Docker build - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - # Setup layer cache - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - # Login to Dockerhub - - name: Login to DockerHub + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub if: ${{ inputs.dockerhubpush != 'false' }} - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v6 with: push: ${{ inputs.dockerhubpush }} context: ${{ inputs.directory }} From a45c8610e9e63e111774b4b6913fab0ba0e4c0c5 Mon Sep 17 00:00:00 2001 From: avahoffman Date: Fri, 30 Aug 2024 14:28:52 -0400 Subject: [PATCH 09/67] Add a usage note --- ottr_anvil/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ottr_anvil/Dockerfile b/ottr_anvil/Dockerfile index a688561..c155415 100644 --- a/ottr_anvil/Dockerfile +++ b/ottr_anvil/Dockerfile @@ -1,3 +1,5 @@ +# Usage: for running the analysis part of the AnVIL User Poll + FROM jhudsl/base_ottr:main LABEL maintainer="avamariehoffman@gmail.com" From 9bad23c9729842fa636d78303a9abb50ad2f6187 Mon Sep 17 00:00:00 2001 From: avahoffman Date: Fri, 30 Aug 2024 14:29:37 -0400 Subject: [PATCH 10/67] Change the folder name --- {ottr_anvil => ottr_anvil_poll}/Dockerfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {ottr_anvil => ottr_anvil_poll}/Dockerfile (100%) diff --git a/ottr_anvil/Dockerfile b/ottr_anvil_poll/Dockerfile similarity index 100% rename from ottr_anvil/Dockerfile rename to ottr_anvil_poll/Dockerfile From c9d37e5419bf067b362ae97be3231ce44d491240 Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:09:41 -0500 Subject: [PATCH 11/67] docker request from cw --- ottr_website/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 ottr_website/Dockerfile diff --git a/ottr_website/Dockerfile b/ottr_website/Dockerfile new file mode 100644 index 0000000..957d4b6 --- /dev/null +++ b/ottr_website/Dockerfile @@ -0,0 +1,9 @@ +# Usage: for running the analysis part of the AnVIL User Poll + +FROM jhudsl/base_ottr:main +LABEL maintainer="avamariehoffman@gmail.com" + +# Install googlesheets4 and plotting packages +RUN Rscript -e "options(warn = 2);install.packages( \ + c('ggpubr', 'patchwork', 'broom', 'googlesheets4'), \ + repos = 'https://cloud.r-project.org/')" From 83b7477d4617403cf8769637e29efa36b3309a79 Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:11:21 -0500 Subject: [PATCH 12/67] switch out maintainer --- ottr_website/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ottr_website/Dockerfile b/ottr_website/Dockerfile index 957d4b6..0e70d19 100644 --- a/ottr_website/Dockerfile +++ b/ottr_website/Dockerfile @@ -1,7 +1,7 @@ # Usage: for running the analysis part of the AnVIL User Poll FROM jhudsl/base_ottr:main -LABEL maintainer="avamariehoffman@gmail.com" +LABEL maintainer="cansav09@gmail.com" # Install googlesheets4 and plotting packages RUN Rscript -e "options(warn = 2);install.packages( \ From 0f3ca87f31f4eff68974bc8753f2c3b6c45c2eff Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:35:47 -0500 Subject: [PATCH 13/67] add cmake for dependencies --- ottr_website/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ottr_website/Dockerfile b/ottr_website/Dockerfile index 0e70d19..3065317 100644 --- a/ottr_website/Dockerfile +++ b/ottr_website/Dockerfile @@ -3,6 +3,10 @@ FROM jhudsl/base_ottr:main LABEL maintainer="cansav09@gmail.com" +# Install cmake + +RUN apt-get update && apt-get install -y cmake + # Install googlesheets4 and plotting packages RUN Rscript -e "options(warn = 2);install.packages( \ c('ggpubr', 'patchwork', 'broom', 'googlesheets4'), \ From 6f48a6a49b3495a7973eb63aad6c60b99115c668 Mon Sep 17 00:00:00 2001 From: Kate Isaac <41767733+kweav@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:45:16 -0500 Subject: [PATCH 14/67] try cmake install again --- ottr_website/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ottr_website/Dockerfile b/ottr_website/Dockerfile index 3065317..22cd18a 100644 --- a/ottr_website/Dockerfile +++ b/ottr_website/Dockerfile @@ -5,7 +5,7 @@ LABEL maintainer="cansav09@gmail.com" # Install cmake -RUN apt-get update && apt-get install -y cmake +RUN apt-get update && apt-get install -y --no-install-recommends cmake # Install googlesheets4 and plotting packages RUN Rscript -e "options(warn = 2);install.packages( \ From 65b61e04c7bcbb3f9b0bab8bf665da13df8d5958 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 09:48:57 -0500 Subject: [PATCH 15/67] Make it easier to add images --- .github/workflows/merge.yml | 87 ++++++++----------------------------- 1 file changed, 17 insertions(+), 70 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 7ec8977..d0b9fe3 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -8,9 +8,16 @@ on: jobs: - dockerfiles-changed: - name: Detect changed Dockerfiles + dockerfile-check: + name: Detect changed Dockerfile - ${{ matrix.config.dir }} runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + config: + - {dir: base_ottr, name: 'jhudsl/base_ottr'} + steps: - name: Checkout uses: actions/checkout@v3 @@ -18,83 +25,23 @@ jobs: fetch-depth: 0 - name: Get specific changed files - id: base_ottr + id: image_name uses: tj-actions/changed-files@v14.5 with: - files: base_ottr/* - - - name: Get specific changed files - id: ottrpal - uses: tj-actions/changed-files@v14.5 - with: - files: ottrpal/* - - - name: Get specific changed files - id: bioconductor - uses: tj-actions/changed-files@v14.5 - with: - files: bioconductor/* + files: ${{ matrix.config.dir }}/* - run: | - echo ${{steps.base_ottr.outputs.any_changed}} - echo ${{steps.ottrpal.outputs.any_changed}} - echo ${{steps.bioconductor.outputs.any_changed}} + echo ${{steps.image_name.outputs.any_changed}} outputs: - base_ottr_changed: ${{steps.base_ottr.outputs.any_changed}} - ottrpal_changed: ${{steps.ottrpal.outputs.any_changed}} - bioconductor_changed: ${{steps.bioconductor.outputs.any_changed}} - - build-base: - name: Build base ottr image - needs: dockerfiles-changed - if: ${{needs.dockerfiles-changed.outputs.base_ottr_changed == 'true'}} - uses: ./.github/workflows/docker-test.yml - with: - directory: base_ottr - tag: jhudsl/course_template - dockerhubpush: true - secrets: - GH_PAT: ${{ secrets.GH_PAT }} - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} - - build-ottrpal: - name: Build ottrpal image - needs: dockerfiles-changed - if: ${{needs.dockerfiles-changed.outputs.ottrpal_changed == 'true'}} - uses: ./.github/workflows/docker-test.yml - with: - directory: ottrpal - tag: jhudsl/ottrpal - dockerhubpush: true - secrets: - GH_PAT: ${{ secrets.GH_PAT }} - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} - - build-bioconductor: - name: Build bioconductor image - needs: dockerfiles-changed - if: ${{needs.dockerfiles-changed.outputs.bioconductor_changed == 'true'}} - uses: ./.github/workflows/docker-test.yml - with: - directory: bioconductor - tag: jhudsl/ottr_bioconductor - dockerhubpush: true - secrets: - GH_PAT: ${{ secrets.GH_PAT }} - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + image_name_changed: ${{steps.image_name.outputs.any_changed}} - build-quarto: - name: Build quarto image - needs: dockerfiles-changed - if: ${{needs.dockerfiles-changed.outputs.quarto_changed == 'true'}} + name: Build ${{ matrix.config.dir }} image + if: ${{needs.dockerfiles-changed.outputs.image_name_changed == 'true'}} uses: ./.github/workflows/docker-test.yml with: - directory: ottr_quarto - tag: jhudsl/ottr_quarto + directory: image_name + tag: ${{ matrix.config.name }} dockerhubpush: true secrets: GH_PAT: ${{ secrets.GH_PAT }} From 2ffdd4b4b4cf53554fe30aee973dd7752faf4e8d Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 09:51:01 -0500 Subject: [PATCH 16/67] Indents needed --- .github/workflows/merge.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index d0b9fe3..025912d 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -36,14 +36,13 @@ jobs: outputs: image_name_changed: ${{steps.image_name.outputs.any_changed}} - name: Build ${{ matrix.config.dir }} image - if: ${{needs.dockerfiles-changed.outputs.image_name_changed == 'true'}} - uses: ./.github/workflows/docker-test.yml - with: - directory: image_name - tag: ${{ matrix.config.name }} - dockerhubpush: true - secrets: - GH_PAT: ${{ secrets.GH_PAT }} - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Get specific changed files + if: ${{needs.dockerfiles-changed.outputs.image_name_changed == 'true'}} + uses: ./.github/workflows/docker-test.yml + with: + tag: ${{ matrix.config.name }} + dockerhubpush: true + secrets: + GH_PAT: ${{ secrets.GH_PAT }} + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} From 7c219abc490447be6099afe898ae5d8a1f9b3d4b Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 09:52:46 -0500 Subject: [PATCH 17/67] Does this work? --- .github/workflows/merge.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 025912d..c6b9543 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -30,14 +30,10 @@ jobs: with: files: ${{ matrix.config.dir }}/* - - run: | - echo ${{steps.image_name.outputs.any_changed}} + - run: echo ${{steps.image_name.outputs.any_changed}} - outputs: - image_name_changed: ${{steps.image_name.outputs.any_changed}} - - - name: Get specific changed files - if: ${{needs.dockerfiles-changed.outputs.image_name_changed == 'true'}} + - name: Build it + if: ${{steps.image_name.outputs.any_changed == 'true'}} uses: ./.github/workflows/docker-test.yml with: tag: ${{ matrix.config.name }} From dac82ce1497810115491bc64a399f02bc80daa2c Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 09:56:59 -0500 Subject: [PATCH 18/67] update --- .github/workflows/merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index c6b9543..c470fee 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -33,8 +33,8 @@ jobs: - run: echo ${{steps.image_name.outputs.any_changed}} - name: Build it - if: ${{steps.image_name.outputs.any_changed == 'true'}} uses: ./.github/workflows/docker-test.yml + if: ${{steps.image_name.outputs.any_changed == 'true'}} with: tag: ${{ matrix.config.name }} dockerhubpush: true From 5ab754e7c223b812d63acc846aac6b73d5441757 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 10:02:55 -0500 Subject: [PATCH 19/67] Add it as a matrix --- .github/workflows/merge.yml | 5 +- .github/workflows/pull_request.yml | 119 ++++++----------------------- 2 files changed, 28 insertions(+), 96 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index c470fee..5e01d36 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -1,4 +1,4 @@ -# Candace Savonen May 2022 +# Candace Savonen Jan 2025 name: Pull Request @@ -17,6 +17,9 @@ jobs: matrix: config: - {dir: base_ottr, name: 'jhudsl/base_ottr'} + - {dir: ottrpal, name: 'jhudsl/ottrpal'} + - {dir: bioconductor, name: 'jhudsl/ottr_bioconductor'} + - {dir: ottr_website, name: 'jhudsl/ottr_website'} steps: - name: Checkout diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index e8f85f1..ea069cc 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -1,4 +1,4 @@ -# Candace Savonen March 2024 +# Candace Savonen Jan 2025 name: Pull Request @@ -8,9 +8,19 @@ on: jobs: - dockerfiles-changed: - name: Detect changed Dockerfiles + dockerfile-check: + name: Detect changed Dockerfile - ${{ matrix.config.dir }} runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + config: + - {dir: base_ottr, name: 'jhudsl/base_ottr'} + - {dir: ottrpal, name: 'jhudsl/ottrpal'} + - {dir: bioconductor, name: 'jhudsl/ottr_bioconductor'} + - {dir: ottr_website, name: 'jhudsl/ottr_website'} + steps: - name: Checkout uses: actions/checkout@v3 @@ -18,100 +28,19 @@ jobs: fetch-depth: 0 - name: Get specific changed files - id: base_ottr - uses: tj-actions/changed-files@v14.5 - with: - files: base_ottr/* - - - name: Get specific changed files - id: ottrpal + id: image_name uses: tj-actions/changed-files@v14.5 with: - files: ottrpal/* + files: ${{ matrix.config.dir }}/* - - name: Get specific changed files - id: bioconductor - uses: tj-actions/changed-files@v14.5 - with: - files: bioconductor/* - - - name: Get specific changed files - id: python - uses: tj-actions/changed-files@v14.5 - with: - files: ottr_python/* + - run: echo ${{steps.image_name.outputs.any_changed}} - - name: Get specific changed files - id: quarto - uses: tj-actions/changed-files@v14.5 + - name: Build it + uses: ./.github/workflows/docker-test.yml + if: ${{steps.image_name.outputs.any_changed == 'true'}} with: - files: ottr_quarto/* - - - run: | - echo ${{steps.base_ottr.outputs.any_changed}} - echo ${{steps.ottrpal.outputs.any_changed}} - echo ${{steps.bioconductor.outputs.any_changed}} - echo ${{steps.python.outputs.any_changed}} - echo ${{steps.quarto.outputs.any_changed}} - - outputs: - base_ottr_changed: ${{steps.base_ottr.outputs.any_changed}} - ottrpal_changed: ${{steps.ottrpal.outputs.any_changed}} - bioconductor_changed: ${{steps.bioconductor.outputs.any_changed}} - python_changed: ${{steps.python.outputs.any_changed}} - quarto_changed: ${{steps.quarto.outputs.any_changed}} - - build-base: - name: Build base ottr image - needs: dockerfiles-changed - if: ${{needs.dockerfiles-changed.outputs.base_ottr_changed == 'true'}} - uses: ./.github/workflows/docker-test.yml - with: - directory: base_ottr - tag: jhudsl/base_ottr - secrets: - GH_PAT: ${{ secrets.GH_PAT }} - - build-ottrpal: - name: Build ottrpal image - needs: dockerfiles-changed - if: ${{needs.dockerfiles-changed.outputs.ottrpal_changed == 'true'}} - uses: ./.github/workflows/docker-test.yml - with: - directory: ottrpal - tag: jhudsl/ottrpal - secrets: - GH_PAT: ${{ secrets.GH_PAT }} - - build-bioconductor: - name: Build bioconductor image - needs: dockerfiles-changed - if: ${{needs.dockerfiles-changed.outputs.bioconductor_changed == 'true'}} - uses: ./.github/workflows/docker-test.yml - with: - directory: bioconductor - tag: jhudsl/ottr_bioconductor - secrets: - GH_PAT: ${{ secrets.GH_PAT }} - - build-python: - name: Build python image - needs: dockerfiles-changed - if: ${{needs.dockerfiles-changed.outputs.python_changed == 'true'}} - uses: ./.github/workflows/docker-test.yml - with: - directory: ottr_python - tag: jhudsl/ottr_python - secrets: - GH_PAT: ${{ secrets.GH_PAT }} - - build-quarto: - name: Build quarto ottr image - needs: dockerfiles-changed - if: ${{needs.dockerfiles-changed.outputs.quarto_changed == 'true'}} - uses: ./.github/workflows/docker-test.yml - with: - directory: ottr_quarto - tag: jhudsl/ottr_quarto - secrets: - GH_PAT: ${{ secrets.GH_PAT }} + directory: ${{ matrix.config.dir }} + tag: ${{ matrix.config.name }} + dockerhubpush: false + secrets: + GH_PAT: ${{ secrets.GH_PAT }} From fe0a417c643646c3356d106d8a236008abcef90f Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 10:05:58 -0500 Subject: [PATCH 20/67] Fix secrets --- .github/workflows/merge.yml | 11 ++++++----- .github/workflows/pull_request.yml | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 5e01d36..7803421 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -20,7 +20,8 @@ jobs: - {dir: ottrpal, name: 'jhudsl/ottrpal'} - {dir: bioconductor, name: 'jhudsl/ottr_bioconductor'} - {dir: ottr_website, name: 'jhudsl/ottr_website'} - +# NEW IMAGES HERE: # +####### - {dir: directory_path, name: 'name its called on dockerhub'} steps: - name: Checkout uses: actions/checkout@v3 @@ -41,7 +42,7 @@ jobs: with: tag: ${{ matrix.config.name }} dockerhubpush: true - secrets: - GH_PAT: ${{ secrets.GH_PAT }} - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + secrets: + GH_PAT: ${{ secrets.GH_PAT }} + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index ea069cc..46ac6c5 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -42,5 +42,5 @@ jobs: directory: ${{ matrix.config.dir }} tag: ${{ matrix.config.name }} dockerhubpush: false - secrets: - GH_PAT: ${{ secrets.GH_PAT }} + secrets: + GH_PAT: ${{ secrets.GH_PAT }} From 9c261d06ada8a2ad45de2872927b248bc943c35a Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 10:11:12 -0500 Subject: [PATCH 21/67] Update secrets arg --- .github/workflows/docker-test.yml | 14 +++++--------- .github/workflows/merge.yml | 4 ---- .github/workflows/pull_request.yml | 2 -- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index c4c80e4..ce04924 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -17,12 +17,9 @@ on: default: 'false' type: string secrets: - GH_PAT: - required: true - DOCKERHUB_USERNAME: - required: false - DOCKERHUB_TOKEN: - required: false + GH_PAT: ${{ secrets.GH_PAT }} + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} defaults: run: @@ -40,14 +37,14 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - + - name: Login to Docker Hub if: ${{ inputs.dockerhubpush != 'false' }} uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - + - name: Build uses: docker/build-push-action@v6 with: @@ -56,4 +53,3 @@ jobs: file: ${{ inputs.directory }}/Dockerfile platforms: linux/amd64 tags: ${{ inputs.tag }} - diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 7803421..3f4715c 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -42,7 +42,3 @@ jobs: with: tag: ${{ matrix.config.name }} dockerhubpush: true - secrets: - GH_PAT: ${{ secrets.GH_PAT }} - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 46ac6c5..22bff19 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -42,5 +42,3 @@ jobs: directory: ${{ matrix.config.dir }} tag: ${{ matrix.config.name }} dockerhubpush: false - secrets: - GH_PAT: ${{ secrets.GH_PAT }} From 5fd2c3578c0515aac8cde1d15265a20b11a856f1 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 10:13:00 -0500 Subject: [PATCH 22/67] Add a checkout --- .github/workflows/docker-test.yml | 4 +++- .github/workflows/pull_request.yml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index ce04924..91d765f 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -32,8 +32,10 @@ jobs: runs-on: ubuntu-latest steps: - - name: checkout repo + - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 22bff19..5551e7e 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -9,7 +9,7 @@ on: jobs: dockerfile-check: - name: Detect changed Dockerfile - ${{ matrix.config.dir }} + name: Test changed Dockerfile - ${{ matrix.config.dir }} runs-on: ubuntu-latest strategy: From a9168c76bc3b6d5d3857e57e2bea829d3969b049 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 15:08:36 -0500 Subject: [PATCH 23/67] wonky file path --- .github/workflows/pull_request.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 5551e7e..2769fe6 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -33,7 +33,9 @@ jobs: with: files: ${{ matrix.config.dir }}/* - - run: echo ${{steps.image_name.outputs.any_changed}} + - run: | + echo ${{steps.image_name.outputs.any_changed}} + echo ${{ matrix.config.dir }} - name: Build it uses: ./.github/workflows/docker-test.yml From a52a3ad70c4142e4638b14cb8ce0d51ca67b46b3 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 15:11:51 -0500 Subject: [PATCH 24/67] fix file path --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 2769fe6..d152260 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -38,7 +38,7 @@ jobs: echo ${{ matrix.config.dir }} - name: Build it - uses: ./.github/workflows/docker-test.yml + uses: .github/workflows/docker-test.yml if: ${{steps.image_name.outputs.any_changed == 'true'}} with: directory: ${{ matrix.config.dir }} From becf3b4e96f6bcfa760bb8cd9d3a15ea74e0a377 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 15:13:02 -0500 Subject: [PATCH 25/67] Fix ref --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index d152260..fe182ce 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -38,7 +38,7 @@ jobs: echo ${{ matrix.config.dir }} - name: Build it - uses: .github/workflows/docker-test.yml + uses: jhudsl/ottr-reports/.github/workflows/docker-test.yml@main if: ${{steps.image_name.outputs.any_changed == 'true'}} with: directory: ${{ matrix.config.dir }} From 30c0e4266d9f666e5b463098e87ddd48a152e893 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 15:17:57 -0500 Subject: [PATCH 26/67] Change level --- .github/workflows/pull_request.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index fe182ce..a6c5d3b 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -34,13 +34,18 @@ jobs: files: ${{ matrix.config.dir }}/* - run: | - echo ${{steps.image_name.outputs.any_changed}} + echo ${{ steps.image_name.outputs.any_changed }} echo ${{ matrix.config.dir }} - - name: Build it - uses: jhudsl/ottr-reports/.github/workflows/docker-test.yml@main - if: ${{steps.image_name.outputs.any_changed == 'true'}} - with: - directory: ${{ matrix.config.dir }} - tag: ${{ matrix.config.name }} - dockerhubpush: false + outputs: + any_changed: "${{ steps.image_name.outputs.any_changed }}" + + build-it: + name: Build it + needs: dockerfiles-check + if: ${{needs.dockerfiles-check.outputs.any_changed == 'true'}} + uses: jhudsl/ottr-reports/.github/workflows/docker-test.yml@main + with: + directory: ${{ matrix.config.dir }} + tag: ${{ matrix.config.name }} + dockerhubpush: false From 5a36aff3ed150de56b4de66929d9fa7f1665db14 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 15:19:15 -0500 Subject: [PATCH 27/67] ottr-docker not ottr-reports --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index a6c5d3b..4201c0f 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -44,7 +44,7 @@ jobs: name: Build it needs: dockerfiles-check if: ${{needs.dockerfiles-check.outputs.any_changed == 'true'}} - uses: jhudsl/ottr-reports/.github/workflows/docker-test.yml@main + uses: jhudsl/ottr-docker/.github/workflows/docker-test.yml@main with: directory: ${{ matrix.config.dir }} tag: ${{ matrix.config.name }} From 9afc0a01477d5cd360d6af657643c4f172826659 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 15:19:57 -0500 Subject: [PATCH 28/67] dockerfile not dockerfiles --- .github/workflows/pull_request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 4201c0f..4d4045c 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -42,8 +42,8 @@ jobs: build-it: name: Build it - needs: dockerfiles-check - if: ${{needs.dockerfiles-check.outputs.any_changed == 'true'}} + needs: dockerfile-check + if: ${{needs.dockerfile-check.outputs.any_changed == 'true'}} uses: jhudsl/ottr-docker/.github/workflows/docker-test.yml@main with: directory: ${{ matrix.config.dir }} From 96b638a5d4c13588b54680ea970ecd3a7463a91a Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 15:21:09 -0500 Subject: [PATCH 29/67] Update docker-test.yml --- .github/workflows/docker-test.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index c4c80e4..cc137c6 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -17,12 +17,10 @@ on: default: 'false' type: string secrets: - GH_PAT: + GH_PAT: ${{ secrets.GH_PAT }} required: true - DOCKERHUB_USERNAME: - required: false - DOCKERHUB_TOKEN: - required: false + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} defaults: run: From c8793a692b473ce611b47efdca1ac3b99c7cc171 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 15:23:41 -0500 Subject: [PATCH 30/67] get rid of required --- .github/workflows/docker-test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index aea5468..91d765f 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -18,7 +18,6 @@ on: type: string secrets: GH_PAT: ${{ secrets.GH_PAT }} - required: true DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} From 71bc244474c5ec77c468e1fe4456d682b66f8e8b Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 15:25:22 -0500 Subject: [PATCH 31/67] Update docker-test.yml --- .github/workflows/docker-test.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index cc137c6..b3f4232 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -17,11 +17,15 @@ on: default: 'false' type: string secrets: - GH_PAT: ${{ secrets.GH_PAT }} + GH_PAT: required: true - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} - + default: ${{ secrets.GH_PAT }} + DOCKERHUB_USERNAME: + required: false + default: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_TOKEN: + required: false + default: ${{ secrets.DOCKERHUB_TOKEN }} defaults: run: working-directory: ./ From f0e3de7e31adb9838225ecaa50dd13d20606381f Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 15:28:58 -0500 Subject: [PATCH 32/67] secrets: inherit --- .github/workflows/docker-test.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index b3f4232..505daee 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -1,4 +1,4 @@ -# Candace Savonen Apr 2022 +# Candace Savonen Jan 2025 name: Build Docker Image @@ -16,16 +16,8 @@ on: required: false default: 'false' type: string - secrets: - GH_PAT: - required: true - default: ${{ secrets.GH_PAT }} - DOCKERHUB_USERNAME: - required: false - default: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: - required: false - default: ${{ secrets.DOCKERHUB_TOKEN }} + secrets: inherit + defaults: run: working-directory: ./ @@ -42,14 +34,14 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - + - name: Login to Docker Hub if: ${{ inputs.dockerhubpush != 'false' }} uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - + - name: Build uses: docker/build-push-action@v6 with: @@ -58,4 +50,3 @@ jobs: file: ${{ inputs.directory }}/Dockerfile platforms: linux/amd64 tags: ${{ inputs.tag }} - From 1e35c1af76466116a91f1d56d516febee1df33ba Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 15:36:26 -0500 Subject: [PATCH 33/67] revert back to original secret passing strategy --- .github/workflows/docker-test.yml | 10 ++++++++-- .github/workflows/merge.yml | 19 +++++++++++++------ .github/workflows/pull_request.yml | 2 ++ 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index bc20e5c..d600e0c 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -1,4 +1,4 @@ -# Candace Savonen Jan 2025 +# Candace Savonen Apr 2022 name: Build Docker Image @@ -16,7 +16,13 @@ on: required: false default: 'false' type: string - secrets: inherit + secrets: + GH_PAT: + required: true + DOCKERHUB_USERNAME: + required: false + DOCKERHUB_TOKEN: + required: false defaults: run: diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 3f4715c..306991d 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -36,9 +36,16 @@ jobs: - run: echo ${{steps.image_name.outputs.any_changed}} - - name: Build it - uses: ./.github/workflows/docker-test.yml - if: ${{steps.image_name.outputs.any_changed == 'true'}} - with: - tag: ${{ matrix.config.name }} - dockerhubpush: true + build-it: + name: Build it + needs: dockerfile-check + if: ${{needs.dockerfile-check.outputs.any_changed == 'true'}} + uses: jhudsl/ottr-docker/.github/workflows/docker-test.yml@main + with: + directory: ${{ matrix.config.dir }} + tag: ${{ matrix.config.name }} + dockerhubpush: true + secrets: + GH_PAT: ${{ secrets.GH_PAT }} + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 4d4045c..8b072c1 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -49,3 +49,5 @@ jobs: directory: ${{ matrix.config.dir }} tag: ${{ matrix.config.name }} dockerhubpush: false + secrets: + GH_PAT: ${{ secrets.GH_PAT }} From 8e2b514270f46512ef4ae6d15d548f8d8d51c659 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 15:36:55 -0500 Subject: [PATCH 34/67] Update docker-test.yml --- .github/workflows/docker-test.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index 505daee..619b384 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -16,7 +16,13 @@ on: required: false default: 'false' type: string - secrets: inherit + secrets: + GH_PAT: + required: true + DOCKERHUB_USERNAME: + required: false + DOCKERHUB_TOKEN: + required: false defaults: run: From 80bc30dfa5867ab4d487f8a76865232e586b18c9 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 15:56:01 -0500 Subject: [PATCH 35/67] IDK if this will work --- .github/workflows/pull_request.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 8b072c1..9d5b6bd 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -11,7 +11,6 @@ jobs: dockerfile-check: name: Test changed Dockerfile - ${{ matrix.config.dir }} runs-on: ubuntu-latest - strategy: fail-fast: false matrix: @@ -36,14 +35,23 @@ jobs: - run: | echo ${{ steps.image_name.outputs.any_changed }} echo ${{ matrix.config.dir }} - - outputs: - any_changed: "${{ steps.image_name.outputs.any_changed }}" + echo "${{ matrix.config.dir }}_changed=${{ steps.image_name.outputs.any_changed }}" >> $GITHUB_OUTPUT build-it: + name: Build image - ${{ matrix.config.dir }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + config: + - {dir: base_ottr, name: 'jhudsl/base_ottr'} + - {dir: ottrpal, name: 'jhudsl/ottrpal'} + - {dir: bioconductor, name: 'jhudsl/ottr_bioconductor'} + - {dir: ottr_website, name: 'jhudsl/ottr_website'} + name: Build it needs: dockerfile-check - if: ${{needs.dockerfile-check.outputs.any_changed == 'true'}} + if: ${{needs.dockerfile-check.outputs.${{ matrix.config.dir }}_changed == 'true'}} uses: jhudsl/ottr-docker/.github/workflows/docker-test.yml@main with: directory: ${{ matrix.config.dir }} From 268bc77aefee810c6d49742eee81b64a3bbf447c Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 15:57:27 -0500 Subject: [PATCH 36/67] Update to fix syntax --- .github/workflows/pull_request.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 9d5b6bd..a4f645e 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -39,6 +39,8 @@ jobs: build-it: name: Build image - ${{ matrix.config.dir }} + needs: dockerfile-check + if: ${{needs.dockerfile-check.outputs.${{ matrix.config.dir }}_changed == 'true'}} runs-on: ubuntu-latest strategy: fail-fast: false @@ -49,9 +51,6 @@ jobs: - {dir: bioconductor, name: 'jhudsl/ottr_bioconductor'} - {dir: ottr_website, name: 'jhudsl/ottr_website'} - name: Build it - needs: dockerfile-check - if: ${{needs.dockerfile-check.outputs.${{ matrix.config.dir }}_changed == 'true'}} uses: jhudsl/ottr-docker/.github/workflows/docker-test.yml@main with: directory: ${{ matrix.config.dir }} From c730be7900b64b42d30b26c620f457eb62974830 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 16:01:45 -0500 Subject: [PATCH 37/67] Is this gonna work? --- .github/workflows/pull_request.yml | 31 +++++++++--------------------- 1 file changed, 9 insertions(+), 22 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index a4f645e..43a3fb9 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -35,26 +35,13 @@ jobs: - run: | echo ${{ steps.image_name.outputs.any_changed }} echo ${{ matrix.config.dir }} - echo "${{ matrix.config.dir }}_changed=${{ steps.image_name.outputs.any_changed }}" >> $GITHUB_OUTPUT - build-it: - name: Build image - ${{ matrix.config.dir }} - needs: dockerfile-check - if: ${{needs.dockerfile-check.outputs.${{ matrix.config.dir }}_changed == 'true'}} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - config: - - {dir: base_ottr, name: 'jhudsl/base_ottr'} - - {dir: ottrpal, name: 'jhudsl/ottrpal'} - - {dir: bioconductor, name: 'jhudsl/ottr_bioconductor'} - - {dir: ottr_website, name: 'jhudsl/ottr_website'} - - uses: jhudsl/ottr-docker/.github/workflows/docker-test.yml@main - with: - directory: ${{ matrix.config.dir }} - tag: ${{ matrix.config.name }} - dockerhubpush: false - secrets: - GH_PAT: ${{ secrets.GH_PAT }} + - name: Docker build + if: ${{ steps.image_name.outputs.any_changed == 'true'}} + uses: .github/workflows/docker-test.yml + with: + directory: ${{ matrix.config.dir }} + tag: ${{ matrix.config.name }} + dockerhubpush: false + secrets: + GH_PAT: ${{ secrets.GH_PAT }} From c61f72dcebc209f21295b80967c8742967f26493 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 16:02:21 -0500 Subject: [PATCH 38/67] make it a path --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 43a3fb9..9d2d262 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -38,7 +38,7 @@ jobs: - name: Docker build if: ${{ steps.image_name.outputs.any_changed == 'true'}} - uses: .github/workflows/docker-test.yml + uses: ./.github/workflows/docker-test.yml with: directory: ${{ matrix.config.dir }} tag: ${{ matrix.config.name }} From 20b8255dc634a352887cf41f3bb5b1e5bdeb9eca Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 16:04:55 -0500 Subject: [PATCH 39/67] secrets: inherit take 2? --- .github/workflows/pull_request.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 9d2d262..85fd276 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -43,5 +43,4 @@ jobs: directory: ${{ matrix.config.dir }} tag: ${{ matrix.config.name }} dockerhubpush: false - secrets: - GH_PAT: ${{ secrets.GH_PAT }} + secrets: inherit From c4bd7d0bc45960f79b3b65ff4c6f4ab8e8bb1c34 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 16:07:00 -0500 Subject: [PATCH 40/67] Maybe its in the wrong spot --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 85fd276..f60fa4b 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -11,6 +11,7 @@ jobs: dockerfile-check: name: Test changed Dockerfile - ${{ matrix.config.dir }} runs-on: ubuntu-latest + secrets: inherit strategy: fail-fast: false matrix: @@ -43,4 +44,3 @@ jobs: directory: ${{ matrix.config.dir }} tag: ${{ matrix.config.name }} dockerhubpush: false - secrets: inherit From 090049002ba3d0ae4816a029c13a443b64be685a Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 16:10:50 -0500 Subject: [PATCH 41/67] Maybe we don't need anything? --- .github/workflows/docker-test.yml | 2 +- .github/workflows/pull_request.yml | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index d600e0c..761e575 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -18,7 +18,7 @@ on: type: string secrets: GH_PAT: - required: true + required: false DOCKERHUB_USERNAME: required: false DOCKERHUB_TOKEN: diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index f60fa4b..17a9e58 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -11,7 +11,6 @@ jobs: dockerfile-check: name: Test changed Dockerfile - ${{ matrix.config.dir }} runs-on: ubuntu-latest - secrets: inherit strategy: fail-fast: false matrix: From 9dccb4361f1abd0341be17ce146b55af0efee2df Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 16:18:41 -0500 Subject: [PATCH 42/67] jhudsl/ottr-docker --- .github/workflows/pull_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 17a9e58..325ee82 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -38,7 +38,7 @@ jobs: - name: Docker build if: ${{ steps.image_name.outputs.any_changed == 'true'}} - uses: ./.github/workflows/docker-test.yml + uses: jhudsl/ottr-docker/.github/workflows/docker-test.yml with: directory: ${{ matrix.config.dir }} tag: ${{ matrix.config.name }} From b6c9491974f47dc2a5a7dfce2a165b6ecfd3e234 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 16:30:39 -0500 Subject: [PATCH 43/67] Try doing less --- .github/workflows/docker-test.yml | 7 ------- .github/workflows/pull_request.yml | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/docker-test.yml index 761e575..6501cb6 100644 --- a/.github/workflows/docker-test.yml +++ b/.github/workflows/docker-test.yml @@ -16,13 +16,6 @@ on: required: false default: 'false' type: string - secrets: - GH_PAT: - required: false - DOCKERHUB_USERNAME: - required: false - DOCKERHUB_TOKEN: - required: false defaults: run: diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 325ee82..17a9e58 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -38,7 +38,7 @@ jobs: - name: Docker build if: ${{ steps.image_name.outputs.any_changed == 'true'}} - uses: jhudsl/ottr-docker/.github/workflows/docker-test.yml + uses: ./.github/workflows/docker-test.yml with: directory: ${{ matrix.config.dir }} tag: ${{ matrix.config.name }} From 0abb5db19391ee84b0d2cdfb9e342723490f2065 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 16:32:37 -0500 Subject: [PATCH 44/67] Can I point to it this way? --- .github/workflows/{docker-test.yml => action.yml} | 0 .github/workflows/pull_request.yml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{docker-test.yml => action.yml} (100%) diff --git a/.github/workflows/docker-test.yml b/.github/workflows/action.yml similarity index 100% rename from .github/workflows/docker-test.yml rename to .github/workflows/action.yml diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 17a9e58..7b2b3e1 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -38,7 +38,7 @@ jobs: - name: Docker build if: ${{ steps.image_name.outputs.any_changed == 'true'}} - uses: ./.github/workflows/docker-test.yml + uses: ./.github/workflows/ with: directory: ${{ matrix.config.dir }} tag: ${{ matrix.config.name }} From 7c6b2997d97144f32afa31a2b9e262f3fce21f43 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 16:37:09 -0500 Subject: [PATCH 45/67] Try inherit secrets again --- .github/workflows/pull_request.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 7b2b3e1..d8f569f 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -43,3 +43,4 @@ jobs: directory: ${{ matrix.config.dir }} tag: ${{ matrix.config.name }} dockerhubpush: false + secrets: inherit From 2aa341e3cdf17e72eab37707e584ac5dcd1a92f3 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 16:43:38 -0500 Subject: [PATCH 46/67] No that doesn't work --- .github/workflows/pull_request.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index d8f569f..7b2b3e1 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -43,4 +43,3 @@ jobs: directory: ${{ matrix.config.dir }} tag: ${{ matrix.config.name }} dockerhubpush: false - secrets: inherit From 169f3362afde1bb771a6125efc9a16578e797f11 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 16:55:40 -0500 Subject: [PATCH 47/67] Use composite action --- .github/workflows/action.yml | 74 ++++++++++++++++-------------- .github/workflows/pull_request.yml | 3 ++ 2 files changed, 42 insertions(+), 35 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 6501cb6..45d5601 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -6,48 +6,52 @@ on: workflow_call: inputs: directory: + description: 'What's the file path to this Dockerfile's folder in this repo' required: true type: string tag: + description: 'What is this called on Dockerhub? e.g. jhudsl/base_ottr' required: true type: string dockerhubpush: - description: 'Push to Dockerhub?' + description: 'Should this be pushed to Dockerhub?' required: false default: 'false' type: string + token: + description: 'A GitHub Personal Access Token' + required: false + dockerhub_username: + description: 'A Dockerhub username that has access to this image' + required: false + dockerhub_token: + description: 'A Dockerhub token that has persmissions to push to this image' + required: false -defaults: - run: - working-directory: ./ - -jobs: - - build-docker: - name: Build Docker image - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub - if: ${{ inputs.dockerhubpush != 'false' }} - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build - uses: docker/build-push-action@v6 - with: - push: ${{ inputs.dockerhubpush }} - context: ${{ inputs.directory }} - file: ${{ inputs.directory }}/Dockerfile - platforms: linux/amd64 - tags: ${{ inputs.tag }} +runs: + using: "composite" + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + token: ${{ inputs.token }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + if: ${{ inputs.dockerhubpush != 'false' }} + uses: docker/login-action@v3 + with: + username: ${{ inputs.DOCKERHUB_USERNAME }} + password: ${{ inputs.DOCKERHUB_TOKEN }} + + - name: Build + uses: docker/build-push-action@v6 + with: + push: ${{ inputs.dockerhubpush }} + context: ${{ inputs.directory }} + file: ${{ inputs.directory }}/Dockerfile + platforms: linux/amd64 + tags: ${{ inputs.tag }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 7b2b3e1..743f48d 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -43,3 +43,6 @@ jobs: directory: ${{ matrix.config.dir }} tag: ${{ matrix.config.name }} dockerhubpush: false + token: ${ secrets.GH_PAT } + dockerhub_username: ${ secrets.DOCKERHUB_USERNAME } + dockerhub_token: ${ secrets.DOCKERHUB_TOKEN } From 9f1fcd347b5dc0e117b3d38c2db1c3bd02bd0350 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 17:00:15 -0500 Subject: [PATCH 48/67] Update composite action --- .github/workflows/action.yml | 53 ++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 45d5601..a14192d 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -1,32 +1,31 @@ # Candace Savonen Apr 2022 name: Build Docker Image - +description: "Build and push from a dockerfile in the repository" on: - workflow_call: - inputs: - directory: - description: 'What's the file path to this Dockerfile's folder in this repo' - required: true - type: string - tag: - description: 'What is this called on Dockerhub? e.g. jhudsl/base_ottr' - required: true - type: string - dockerhubpush: - description: 'Should this be pushed to Dockerhub?' - required: false - default: 'false' - type: string - token: - description: 'A GitHub Personal Access Token' - required: false - dockerhub_username: - description: 'A Dockerhub username that has access to this image' - required: false - dockerhub_token: - description: 'A Dockerhub token that has persmissions to push to this image' - required: false +inputs: + directory: + description: 'What's the file path to this Dockerfile's folder in this repo' + required: true + type: string + tag: + description: 'What is this called on Dockerhub? e.g. jhudsl/base_ottr' + required: true + type: string + dockerhubpush: + description: 'Should this be pushed to Dockerhub?' + required: false + default: 'false' + type: string + token: + description: 'A GitHub Personal Access Token' + required: false + dockerhub_username: + description: 'A Dockerhub username that has access to this image' + required: false + dockerhub_token: + description: 'A Dockerhub token that has persmissions to push to this image' + required: false runs: using: "composite" @@ -44,8 +43,8 @@ runs: if: ${{ inputs.dockerhubpush != 'false' }} uses: docker/login-action@v3 with: - username: ${{ inputs.DOCKERHUB_USERNAME }} - password: ${{ inputs.DOCKERHUB_TOKEN }} + username: ${{ inputs.dockerhub_username }} + password: ${{ inputs.dockerhub_token }} - name: Build uses: docker/build-push-action@v6 From cfbb2b1a73380549797ce830ce92ae154f79faa5 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 17:01:20 -0500 Subject: [PATCH 49/67] No ON: --- .github/workflows/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index a14192d..3bba33f 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -2,7 +2,6 @@ name: Build Docker Image description: "Build and push from a dockerfile in the repository" -on: inputs: directory: description: 'What's the file path to this Dockerfile's folder in this repo' From d60c24e6fdadfa257f3ed56d932d043e2230b35b Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 17:05:08 -0500 Subject: [PATCH 50/67] Maybe output is required? --- .github/workflows/action.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 3bba33f..2120b95 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -1,7 +1,7 @@ -# Candace Savonen Apr 2022 +# Candace Savonen Apr 2025 -name: Build Docker Image -description: "Build and push from a dockerfile in the repository" +name: 'Build Docker Image' +description: 'Build and push from a dockerfile in the repository' inputs: directory: description: 'What's the file path to this Dockerfile's folder in this repo' @@ -25,7 +25,10 @@ inputs: dockerhub_token: description: 'A Dockerhub token that has persmissions to push to this image' required: false - +outputs: + success: + value: ${{ steps.push.outcome }} + runs: using: "composite" steps: @@ -46,6 +49,7 @@ runs: password: ${{ inputs.dockerhub_token }} - name: Build + id: push uses: docker/build-push-action@v6 with: push: ${{ inputs.dockerhubpush }} From b9bc86786ac279483571dc64703150236b1758b6 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 17:07:33 -0500 Subject: [PATCH 51/67] Fix quote --- .github/workflows/action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 2120b95..16f799e 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -1,14 +1,13 @@ # Candace Savonen Apr 2025 - name: 'Build Docker Image' description: 'Build and push from a dockerfile in the repository' inputs: directory: - description: 'What's the file path to this Dockerfile's folder in this repo' + description: "What's the file path to this Dockerfile's folder in this repo" required: true type: string tag: - description: 'What is this called on Dockerhub? e.g. jhudsl/base_ottr' + description: 'What is this called on Dockerhub? e.g. jhudslbase_ottr' required: true type: string dockerhubpush: @@ -25,10 +24,11 @@ inputs: dockerhub_token: description: 'A Dockerhub token that has persmissions to push to this image' required: false + outputs: success: value: ${{ steps.push.outcome }} - + runs: using: "composite" steps: From fee08de7e1d0adc8c959cd685173567ea02dbd92 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 17:08:48 -0500 Subject: [PATCH 52/67] Fix input token --- .github/workflows/pull_request.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 743f48d..7c632fd 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -43,6 +43,6 @@ jobs: directory: ${{ matrix.config.dir }} tag: ${{ matrix.config.name }} dockerhubpush: false - token: ${ secrets.GH_PAT } - dockerhub_username: ${ secrets.DOCKERHUB_USERNAME } - dockerhub_token: ${ secrets.DOCKERHUB_TOKEN } + token: ${{ secrets.GH_PAT }} + dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} From 9a43470bffd11b3ca3d8d90ff5d310757121e9d8 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 17:10:41 -0500 Subject: [PATCH 53/67] v4 --- .github/workflows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 16f799e..9e41ddb 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -33,7 +33,7 @@ runs: using: "composite" steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 token: ${{ inputs.token }} From 9f58812fe002316180ccd193189d34157167e52e Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 19:08:34 -0500 Subject: [PATCH 54/67] Update comment --- .github/workflows/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml index 9e41ddb..f79829c 100644 --- a/.github/workflows/action.yml +++ b/.github/workflows/action.yml @@ -7,7 +7,7 @@ inputs: required: true type: string tag: - description: 'What is this called on Dockerhub? e.g. jhudslbase_ottr' + description: 'What is this called on Dockerhub? e.g. jhudsl/base_ottr' required: true type: string dockerhubpush: From fa07b600db75bd4655d65035d1ecc92bd00461b9 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 19:13:22 -0500 Subject: [PATCH 55/67] What needs cmake? --- ottr_website/Dockerfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ottr_website/Dockerfile b/ottr_website/Dockerfile index 22cd18a..0e70d19 100644 --- a/ottr_website/Dockerfile +++ b/ottr_website/Dockerfile @@ -3,10 +3,6 @@ FROM jhudsl/base_ottr:main LABEL maintainer="cansav09@gmail.com" -# Install cmake - -RUN apt-get update && apt-get install -y --no-install-recommends cmake - # Install googlesheets4 and plotting packages RUN Rscript -e "options(warn = 2);install.packages( \ c('ggpubr', 'patchwork', 'broom', 'googlesheets4'), \ From e9fb7dbf13a924ba12050dac99aece71306c5107 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 19:20:33 -0500 Subject: [PATCH 56/67] Add comments --- .github/workflows/merge.yml | 23 ++++++++----------- .github/workflows/pull_request.yml | 3 ++- README.md | 37 ++++++++++++++++++++++++------ 3 files changed, 42 insertions(+), 21 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index 306991d..e7f648c 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -36,16 +36,13 @@ jobs: - run: echo ${{steps.image_name.outputs.any_changed}} - build-it: - name: Build it - needs: dockerfile-check - if: ${{needs.dockerfile-check.outputs.any_changed == 'true'}} - uses: jhudsl/ottr-docker/.github/workflows/docker-test.yml@main - with: - directory: ${{ matrix.config.dir }} - tag: ${{ matrix.config.name }} - dockerhubpush: true - secrets: - GH_PAT: ${{ secrets.GH_PAT }} - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Docker build + if: ${{ steps.image_name.outputs.any_changed == 'true'}} + uses: ./.github/workflows/ + with: + directory: ${{ matrix.config.dir }} + tag: ${{ matrix.config.name }} + dockerhubpush: false + token: ${{ secrets.GH_PAT }} + dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }} + dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 7c632fd..f5907f1 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -19,7 +19,8 @@ jobs: - {dir: ottrpal, name: 'jhudsl/ottrpal'} - {dir: bioconductor, name: 'jhudsl/ottr_bioconductor'} - {dir: ottr_website, name: 'jhudsl/ottr_website'} - +# NEW IMAGES HERE: # +####### - {dir: directory_path, name: 'name its called on dockerhub'} steps: - name: Checkout uses: actions/checkout@v3 diff --git a/README.md b/README.md index 7888b2f..9885cc7 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ # ottr_docker -This repository stores the Dockerfiles and associated files for images that can be used by OTTR for rendering (or other items underneath the hood). +This repository stores the Dockerfiles and associated files for images that can be used by OTTR for rendering (or other items underneath the hood). ## How to use -In your OTTR repositories, you can specify a different docker image for rendering in the `config_automation.yml` file. +In your OTTR repositories, you can specify a different docker image for rendering in the `config_automation.yml` file. -Currently the only supported docker images for rendering purposes are `base_ottr` and `bioconductor`. +Currently the only supported docker images for rendering purposes are `base_ottr` and `bioconductor`. -Read more about docker customization on [ottrproject.org](https://www.ottrproject.org/customize-docker.html). +Read more about docker customization on [ottrproject.org](https://www.ottrproject.org/customize-docker.html). -## To rebuild an image: +## To rebuild an image: Go to Actions > Manual build of docker image > Run workflow @@ -18,9 +18,32 @@ For directory, put the directory/docker image name that you'd like to rebuild. e For tag, put the full name of the docker image as it is called on dockerhub. e.g. "jhudsl/base_ottr:main" -For "Push to Dockerhub" either put "true" if you'd like to push to dockerhub or "false" if you just want to test the build but not push it. +For "Push to Dockerhub" either put "true" if you'd like to push to dockerhub or "false" if you just want to test the build but not push it. -Example of a docker image manual rebuild settings: +Example of a docker image manual rebuild settings: Screen Shot 2023-02-28 at 2 34 23 PM +## Adding a new image + +1. Make a new directory +2. Put your Dockerfile in this directory. Make sure it is named "Dockerfile" exactly. +3. Open up `pull_request.yml` and find where there is a comment like this: +``` +# NEW IMAGES HERE: # +####### - {dir: directory_path, name: 'name its called on dockerhub'} +``` +4. Follow the same format as the other images in this repository and add a line to this list underneath `matrix:` +``` +- {dir: directory_path, name: 'name its called on dockerhub'} +``` +For example it should look something like: +``` +- {dir: base_ottr, name: 'jhudsl/base_ottr'} +``` +Where `base_ottr` is the path to the directory where the Dockerfile is stored inside the folder named `base_ottr` and `jhudsl/base_ottr` is what it is called on Dockerhub. +5. Develop your Dockerfile as your normally would but with each push to your open pull request `pull_request.yml` will attempt to rebuild it to test it. +6. When it successfully builds and it has what you want then you can have it reviewed and merged. +7. Upon merging `merge.yml` will rebuild the image one more time and then push to Dockerhub (if it has proper credentials to do so). Dockerhub username and Dockerhub token stored in this repository as GitHub secrets needs to have push access to the image on Dockerhub. + +For more information on any of this ask @cansavvy. From 40f3875b586c052c71627623cfa545bb1dcae174 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 19:21:10 -0500 Subject: [PATCH 57/67] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 128 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..6bab32b --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +* Focusing on what is best not just for us as individuals, but for the + overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or + advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email + address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +csavonen@fredhutch.org. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at +https://www.contributor-covenant.org/translations. From 16188cf01fa1998fb16c5ab4972d68d85e5c3926 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 19:30:14 -0500 Subject: [PATCH 58/67] Create CONTRIBUTING.md --- CONTRIBUTING.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..810ed95 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,14 @@ +# Contibuting + +This repository is a part of the [Open Source Tools for Training Resources project!](https://www.ottrproject.org/)_ +It stores all docker images related to this project. Individuals who use OTTR are welcome and encouraged to contribute ideas for new images to support OTTR courses! + +Thanks for your interest in contributing to this library! +Read the README and Code of Conduct in this repository to get started. + +If you have an idea for a new Docker image needed here, please create an issue and tag @cansavvy or @kweav. +After discussion we can tell you if your idea for a Docker image is potnetially met by an existing image or will require a new image. +If it requires a new image, you are welcome to file a pull request with a new Dockerfile [following the instructions here](https://github.com/jhudsl/ottr-docker?tab=readme-ov-file#adding-a-new-image) + +After you file this pull request and it passes the incoming Dockerfile build test, tag @cansavvy to review it. +Contact @cansavvy with any additional questions! From 98682e1e5d88fbb2d4b1e4d3e50f4595b36fcf6c Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 19:30:41 -0500 Subject: [PATCH 59/67] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7888b2f..49bb39a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# ottr_docker +# OTTR Docker library This repository stores the Dockerfiles and associated files for images that can be used by OTTR for rendering (or other items underneath the hood). From 17cf73744f60c9e1ede9b8e5cfcf88bb57593114 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 19:31:31 -0500 Subject: [PATCH 60/67] Create LICENSE --- LICENSE | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0e259d4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,121 @@ +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. From 395a73804c1fd8b40c9ce4a9e1e828089fa2a7ef Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 19:32:00 -0500 Subject: [PATCH 61/67] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From 40c6487e57274c582dd69ffe61089b94625a92dd Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 19:33:34 -0500 Subject: [PATCH 62/67] Create SECURITY.md --- SECURITY.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..2cafcdf --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,14 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 2.0.x | :white_check_mark: | + +## Reporting a Vulnerability + +Please report vulnerabilties to csavonen@fredhutch.orh From 1d8524afafc7572dcbfcbdbd1b83455b8004d135 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 19:35:04 -0500 Subject: [PATCH 63/67] Add files via upload --- .github/pull_request_template.md | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..a129617 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,34 @@ + + +# Description + + + +Fixes # (issue) + +## Type of change + + + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update + +# How Has This Been Tested? + + + +- [ ] Test A +- [ ] Test B + +# Checklist: + +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] Any dependent changes have been merged and published in downstream modules From e8cbebeea4692decd23c05ac95925243ef4f0423 Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 20:15:45 -0500 Subject: [PATCH 64/67] Add images --- .github/workflows/merge.yml | 4 +++- .github/workflows/pull_request.yml | 4 +++- ottr_website/Dockerfile | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index e7f648c..801a0e1 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -17,8 +17,10 @@ jobs: matrix: config: - {dir: base_ottr, name: 'jhudsl/base_ottr'} - - {dir: ottrpal, name: 'jhudsl/ottrpal'} - {dir: bioconductor, name: 'jhudsl/ottr_bioconductor'} + - {dir: ottrpal, name: 'jhudsl/ottrpal'} + - {dir: ottr_anvil_poll, name: 'jhudsl/anvil-poll-2024'} + - {dir: ottr_datatables, name: 'jhudsl/ottr_datatables'} - {dir: ottr_website, name: 'jhudsl/ottr_website'} # NEW IMAGES HERE: # ####### - {dir: directory_path, name: 'name its called on dockerhub'} diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index f5907f1..4cb4e33 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -16,8 +16,10 @@ jobs: matrix: config: - {dir: base_ottr, name: 'jhudsl/base_ottr'} - - {dir: ottrpal, name: 'jhudsl/ottrpal'} - {dir: bioconductor, name: 'jhudsl/ottr_bioconductor'} + - {dir: ottrpal, name: 'jhudsl/ottrpal'} + - {dir: ottr_anvil_poll, name: 'jhudsl/anvil-poll-2024'} + - {dir: ottr_datatables, name: 'jhudsl/ottr_datatables'} - {dir: ottr_website, name: 'jhudsl/ottr_website'} # NEW IMAGES HERE: # ####### - {dir: directory_path, name: 'name its called on dockerhub'} diff --git a/ottr_website/Dockerfile b/ottr_website/Dockerfile index 0e70d19..1445222 100644 --- a/ottr_website/Dockerfile +++ b/ottr_website/Dockerfile @@ -3,6 +3,11 @@ FROM jhudsl/base_ottr:main LABEL maintainer="cansav09@gmail.com" +RUN Rscript -e "install.packages('BiocManager', repos = 'https://packagemanager.rstudio.com/all/__linux__/centos7/latest')" \ + +## Install ggpubr dependency +RUN BiocManager::install("nloptr") + # Install googlesheets4 and plotting packages RUN Rscript -e "options(warn = 2);install.packages( \ c('ggpubr', 'patchwork', 'broom', 'googlesheets4'), \ From 9be2739192341ec1652751613ed07924c280490a Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 20:17:27 -0500 Subject: [PATCH 65/67] Fix nlopter call --- ottr_website/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ottr_website/Dockerfile b/ottr_website/Dockerfile index 1445222..7e1396a 100644 --- a/ottr_website/Dockerfile +++ b/ottr_website/Dockerfile @@ -6,7 +6,7 @@ LABEL maintainer="cansav09@gmail.com" RUN Rscript -e "install.packages('BiocManager', repos = 'https://packagemanager.rstudio.com/all/__linux__/centos7/latest')" \ ## Install ggpubr dependency -RUN BiocManager::install("nloptr") +RUN Rscript -e "options(warn = 2);install.packages( \ BiocManager::install('nloptr')" # Install googlesheets4 and plotting packages RUN Rscript -e "options(warn = 2);install.packages( \ From 23c6704a1e94f7b16fc49093053b09149066241a Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 20:17:55 -0500 Subject: [PATCH 66/67] stray / --- ottr_website/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ottr_website/Dockerfile b/ottr_website/Dockerfile index 7e1396a..612d6d4 100644 --- a/ottr_website/Dockerfile +++ b/ottr_website/Dockerfile @@ -3,7 +3,7 @@ FROM jhudsl/base_ottr:main LABEL maintainer="cansav09@gmail.com" -RUN Rscript -e "install.packages('BiocManager', repos = 'https://packagemanager.rstudio.com/all/__linux__/centos7/latest')" \ +RUN Rscript -e "install.packages('BiocManager', repos = 'https://packagemanager.rstudio.com/all/__linux__/centos7/latest')" ## Install ggpubr dependency RUN Rscript -e "options(warn = 2);install.packages( \ BiocManager::install('nloptr')" From 20ff5ce4aac1569962e2590baab7d12968b3c5ba Mon Sep 17 00:00:00 2001 From: Candace Savonen Date: Tue, 7 Jan 2025 20:21:21 -0500 Subject: [PATCH 67/67] fix it --- ottr_website/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ottr_website/Dockerfile b/ottr_website/Dockerfile index 612d6d4..4a7a832 100644 --- a/ottr_website/Dockerfile +++ b/ottr_website/Dockerfile @@ -6,7 +6,7 @@ LABEL maintainer="cansav09@gmail.com" RUN Rscript -e "install.packages('BiocManager', repos = 'https://packagemanager.rstudio.com/all/__linux__/centos7/latest')" ## Install ggpubr dependency -RUN Rscript -e "options(warn = 2);install.packages( \ BiocManager::install('nloptr')" +RUN Rscript -e "options(warn = 2);BiocManager::install('nloptr')" # Install googlesheets4 and plotting packages RUN Rscript -e "options(warn = 2);install.packages( \