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