From 0cca9a6c618ef7d9cd570c34a71924c6c27d27a8 Mon Sep 17 00:00:00 2001 From: Sam Pullman Date: Mon, 12 Feb 2024 12:19:30 -0500 Subject: [PATCH 1/5] added workflow file for testing --- .github/workflows/container_testing.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/container_testing.yml b/.github/workflows/container_testing.yml index 7d231f9..4a74b73 100644 --- a/.github/workflows/container_testing.yml +++ b/.github/workflows/container_testing.yml @@ -4,7 +4,7 @@ name: Tag, Build, and Push Docker Image with Github Workflow on: push: branches: - - main + - feature/rocker-base paths-ignore: - '**/README.md' @@ -42,7 +42,7 @@ jobs: sudo swapoff -a sudo rm -f /swapfile sudo apt clean - echo 'yes' | docker system prune + echo 'y' | docker system prune df -h sudo rm -rf /usr/share/dotnet df . -h From c90ae25f8290990fec78d1fe9fa58b0e6e2d1a4f Mon Sep 17 00:00:00 2001 From: Sam Pullman Date: Mon, 12 Feb 2024 12:21:41 -0500 Subject: [PATCH 2/5] added workflow file for testing --- .github/workflows/container_testing.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/container_testing.yml b/.github/workflows/container_testing.yml index 4a74b73..445a0dd 100644 --- a/.github/workflows/container_testing.yml +++ b/.github/workflows/container_testing.yml @@ -42,7 +42,9 @@ jobs: sudo swapoff -a sudo rm -f /swapfile sudo apt clean + yes | docker system prune echo 'y' | docker system prune + echo 'y' df -h sudo rm -rf /usr/share/dotnet df . -h From b4685ac1ee4273df4cd44921b44b6fec86930bc6 Mon Sep 17 00:00:00 2001 From: Sam Pullman Date: Mon, 12 Feb 2024 12:23:59 -0500 Subject: [PATCH 3/5] added workflow file for testing --- .github/workflows/container_testing.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/container_testing.yml b/.github/workflows/container_testing.yml index 445a0dd..7b5758c 100644 --- a/.github/workflows/container_testing.yml +++ b/.github/workflows/container_testing.yml @@ -42,9 +42,7 @@ jobs: sudo swapoff -a sudo rm -f /swapfile sudo apt clean - yes | docker system prune - echo 'y' | docker system prune - echo 'y' + docker system prune -af df -h sudo rm -rf /usr/share/dotnet df . -h From 4a1d197492dab90214afb3e786fad71476abee4b Mon Sep 17 00:00:00 2001 From: Sam Pullman Date: Mon, 12 Feb 2024 16:59:56 -0500 Subject: [PATCH 4/5] PAXMIN breaking file, re-adding to excluded files list --- Code/R/excluded_tables.tsv | 1 + 1 file changed, 1 insertion(+) diff --git a/Code/R/excluded_tables.tsv b/Code/R/excluded_tables.tsv index a0bfb35..1c68489 100644 --- a/Code/R/excluded_tables.tsv +++ b/Code/R/excluded_tables.tsv @@ -2,4 +2,5 @@ TableName Reason All Years Large File PAHS Large File PAX80 FTP Only +PAXMIN Broken DDX_2_B Broken \ No newline at end of file From 8fcd9245dbed614773dbab67a8d73edde5c3697d Mon Sep 17 00:00:00 2001 From: Sam Pullman Date: Mon, 12 Feb 2024 20:39:23 -0500 Subject: [PATCH 5/5] delete testing workflow, update cleanup process in workflow --- .github/workflows/container.yml | 2 +- .github/workflows/container_testing.yml | 60 ------------------------- Container/Dockerfile | 6 +-- Testing/Code/containerBuildTests.R | 2 +- 4 files changed, 5 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/container_testing.yml diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index e40484a..8bc20f1 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -41,7 +41,7 @@ jobs: sudo swapoff -a sudo rm -f /swapfile sudo apt clean - yes | docker system prune + docker system prune -af df -h sudo rm -rf /usr/share/dotnet df . -h diff --git a/.github/workflows/container_testing.yml b/.github/workflows/container_testing.yml deleted file mode 100644 index 7b5758c..0000000 --- a/.github/workflows/container_testing.yml +++ /dev/null @@ -1,60 +0,0 @@ -name: Tag, Build, and Push Docker Image with Github Workflow - -#Set up tagging/building only on tag releases -on: - push: - branches: - - feature/rocker-base - paths-ignore: - - '**/README.md' - -jobs: - build-container: - name: Build container - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set Tag Output - id: vars - run: if [[ ${GITHUB_REF#refs/*/} == v* ]]; then echo "tag=${{ github.ref_name }}" >> $GITHUB_OUTPUT; else echo "tag=v" >> $GITHUB_OUTPUT; fi - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_HUB_ACCESS_USERNAME }} - password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} - - - uses: mad9000/actions-find-and-replace-string@2 - id: findandreplace - with: - source: ${{ steps.vars.outputs.tag }} - find: 'v' - replace: 'version-' - - - name: free disk space - run: | - sudo swapoff -a - sudo rm -f /swapfile - sudo apt clean - docker system prune -af - df -h - sudo rm -rf /usr/share/dotnet - df . -h - sudo rm -rf ${GITHUB_WORKSPACE}/.git - df . -h - - - name: Build, Tag, and Push to Docker Hub - uses: docker/build-push-action@v4 - with: - context: . - file: ./Container/Dockerfile - push: true - tags: hmsccb/nhanes-workbench:latest, hmsccb/nhanes-workbench:${{ steps.findandreplace.outputs.value }} - cache-from: type=gha - cache-to: type=gha,mode=max diff --git a/Container/Dockerfile b/Container/Dockerfile index 33c7ebf..57725dc 100644 --- a/Container/Dockerfile +++ b/Container/Dockerfile @@ -355,7 +355,7 @@ RUN chmod -R 777 /usr/local/lib/R/doc/html/packages.html # Declare which version of the container this is, and make it available inside the container ENV EPICONDUCTOR_CONTAINER_VERSION v0.4.1 -ENV EPICONDUCTOR_COLLECTION_DATE 2024-02-09 +ENV EPICONDUCTOR_COLLECTION_DATE 2024-02-12 RUN echo "EPICONDUCTOR_CONTAINER_VERSION=$EPICONDUCTOR_CONTAINER_VERSION" >> /usr/local/lib/R/etc/Renviron.site RUN echo "EPICONDUCTOR_COLLECTION_DATE=$EPICONDUCTOR_COLLECTION_DATE" >> /usr/local/lib/R/etc/Renviron.site @@ -363,7 +363,7 @@ RUN echo "EPICONDUCTOR_COLLECTION_DATE=$EPICONDUCTOR_COLLECTION_DATE" >> /usr/lo RUN echo "EPICONDUCTOR_CONTAINER_VERSION=$EPICONDUCTOR_CONTAINER_VERSION" >> /etc/environment RUN echo "EPICONDUCTOR_COLLECTION_DATE=$EPICONDUCTOR_COLLECTION_DATE" >> /etc/environment -# RUN runuser -m -p mssql -c '/opt/mssql/bin/sqlservr &' \ -# && Rscript /NHANES/containerBuildTests.R +RUN runuser -m -p mssql -c '/opt/mssql/bin/sqlservr &' \ + && Rscript /NHANES/containerBuildTests.R CMD ["/startup/startup.sh"] diff --git a/Testing/Code/containerBuildTests.R b/Testing/Code/containerBuildTests.R index d71f25f..7406180 100644 --- a/Testing/Code/containerBuildTests.R +++ b/Testing/Code/containerBuildTests.R @@ -343,7 +343,7 @@ SqlTools::dbSendUpdate(cn, "DBCC SHRINKFILE(NhanesLandingZone_log)") SqlTools::dbSendUpdate(cn, "CHECKPOINT") #Check phonto and nhanesA installs -if (packageVersion("phonto")!="0.1.0"){stop(paste("Phonto installation failure or version 0.1.0 not matched."), sep='')} +if (packageVersion("phonto")!="0.1.1"){stop(paste("Phonto installation failure or version 0.1.1 not matched."), sep='')} if (packageVersion("nhanesA")!="1.0"){stop(paste("nhanesA installation failure or version 1.0 not matched."), sep='')} # shutdown the database engine cleanly