diff --git a/.github/workflows/GithubActionTests.yml b/.github/workflows/GithubActionTests.yml index bb319d1a28..0f3b2348e1 100644 --- a/.github/workflows/GithubActionTests.yml +++ b/.github/workflows/GithubActionTests.yml @@ -20,6 +20,12 @@ jobs: with: fetch-depth: 0 + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + repository: 'bioconda/bioconda-containers' + path: 'bioconda-containers' + - name: set path run: echo "/opt/mambaforge/bin" >> $GITHUB_PATH @@ -35,7 +41,7 @@ jobs: - name: Build docker container run: | - docker build -t quay.io/bioconda/bioconda-utils-build-env-cos7:latest ./ + docker build --build-arg BIOCONDA_UTILS_FOLDER=./ -t quay.io/bioconda/bioconda-utils-build-env-cos7:latest -f ./bioconda-containers/images/build-env/Dockerfile ./ docker history quay.io/bioconda/bioconda-utils-build-env-cos7:latest docker run --rm -t quay.io/bioconda/bioconda-utils-build-env-cos7:latest sh -lec 'type -t conda && conda info -a && conda list' docker build -t quay.io/bioconda/bioconda-utils-test-env-cos7:latest -f ./Dockerfile.test ./ diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml deleted file mode 100644 index 1ae6a9ec7b..0000000000 --- a/.github/workflows/build-image.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: Build image -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -on: - pull_request: - paths-ignore: - - '.circleci/**' - - 'docs/**' - - 'test/**' - -jobs: - build: - name: Build image - runs-on: ubuntu-20.04 - strategy: - matrix: - include: - - arch: arm64 - image: bioconda-utils-build-env-cos7-aarch64 - base_image: quay.io/condaforge/linux-anvil-aarch64 - - arch: amd64 - image: bioconda-utils-build-env-cos7 - base_image: quay.io/condaforge/linux-anvil-cos7-x86_64 - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - id: get-tag - run: | - tag=${{ github.event.release && github.event.release.tag_name || github.sha }} - - # https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ - # printf %s "::set-output name=tag::${tag#v}" - printf %s "tag=${tag#v}" >> $GITHUB_OUTPUT - - - name: Install qemu dependency - run: | - sudo apt-get update - sudo apt-get install -y qemu-user-static - - - name: Build image - id: buildah-build - uses: redhat-actions/buildah-build@v2 - with: - image: ${{ matrix.image }} - arch: ${{ matrix.arch }} - build-args: | - BASE_IMAGE=${{ matrix.base_image }} - tags: >- - latest - ${{ steps.get-tag.outputs.tag }} - dockerfiles: | - ./Dockerfile - - - name: Test built image - run: | - image='${{ steps.buildah-build.outputs.image }}' - for tag in ${{ steps.buildah-build.outputs.tags }} ; do - podman run --rm "${image}:${tag}" bioconda-utils --version - done diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index d3adb78219..2f4b27e392 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -18,68 +18,3 @@ jobs: release-type: python package-name: bioconda-utils - publish_containers: - runs-on: ubuntu-latest - needs: release_please - if: needs.release_please.outputs.release_created - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - id: get-tag - run: | - #tag=${{ github.event.release && github.event.release.tag_name || github.sha }} - tag=${{ needs.release_please.outputs.tag_name }} - printf %s "::set-output name=tag::${tag#v}" - - - name: Install qemu dependency - run: | - sudo apt-get update - sudo apt-get install -y qemu-user-static - - - name: Build x86_64 Image - id: buildah-build - uses: redhat-actions/buildah-build@v2 - with: - image: bioconda-utils-build-env-cos7 - arch: amd64 - build-args: | - BASE_IMAGE=quay.io/condaforge/linux-anvil-cos7-x86_64 - tags: >- - latest - ${{ steps.get-tag.outputs.tag }} - dockerfiles: | - ./Dockerfile - - - name: Push To Quay - uses: redhat-actions/push-to-registry@v2 - with: - image: ${{ steps.buildah-build.outputs.image }} - tags: ${{ steps.buildah-build.outputs.tags }} - registry: ${{ secrets.QUAY_BIOCONDA_REPO }} - username: ${{ secrets.QUAY_BIOCONDA_USERNAME }} - password: ${{ secrets.QUAY_BIOCONDA_TOKEN }} - - - name: Build ARM Image - id: buildah-build-arm - uses: redhat-actions/buildah-build@v2 - with: - image: bioconda-utils-build-env-cos7-aarch64 - arch: arm64 - build-args: | - BASE_IMAGE=quay.io/condaforge/linux-anvil-aarch64 - tags: >- - latest - ${{ steps.get-tag.outputs.tag }} - dockerfiles: | - ./Dockerfile - - - name: Push To Quay - uses: redhat-actions/push-to-registry@v2 - with: - image: ${{ steps.buildah-build-arm.outputs.image }} - tags: ${{ steps.buildah-build-arm.outputs.tags }} - registry: ${{ secrets.QUAY_BIOCONDA_REPO }} - username: ${{ secrets.QUAY_BIOCONDA_USERNAME }} - password: ${{ secrets.QUAY_BIOCONDA_TOKEN }} diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 2ac4fe4177..0000000000 --- a/Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -# Specify the base image to support multi-arch images, such as -# - 'quay.io/condaforge/linux-anvil-aarch64' for Linux aarch64 -# - 'quay.io/condaforge/linux-anvil-cos7-x86_64' for Linux x86_64 -ARG BASE_IMAGE=quay.io/condaforge/linux-anvil-cos7-x86_64 - -FROM ${BASE_IMAGE} as base - -# Copy over C.UTF-8 locale from our base image to make it consistently available during build. -COPY --from=quay.io/bioconda/base-glibc-busybox-bash /usr/lib/locale/C.utf8 /usr/lib/locale/C.utf8 - -# Provide system deps unconditionally until we are able to offer per-recipe installs. -# (Addresses, e.g., "ImportError: libGL.so.1" in tests directly invoked by conda-build.) -# Also install packages that have been installed historically (openssh-client). -RUN yum install -y mesa-libGL-devel \ - && \ - yum install -y openssh-clients \ - && \ - yum clean all && \ - rm -rf /var/cache/yum/* - -# This changes root's .condarc which ENTRYPOINT copies to /home/conda/.condarc later. -RUN . /opt/conda/etc/profile.d/conda.sh && \ - conda config \ - --add channels defaults \ - --add channels bioconda \ - --add channels conda-forge \ - && \ - { conda config --remove repodata_fns current_repodata.json 2> /dev/null || true ; } && \ - conda config --prepend repodata_fns repodata.json && \ - conda config --set channel_priority strict && \ - conda config --set auto_update_conda False - -FROM base as build -WORKDIR /tmp/repo -COPY . ./ -RUN . /opt/conda/etc/profile.d/conda.sh && conda list -RUN . /opt/conda/etc/profile.d/conda.sh && conda activate base && \ - pip wheel . && \ - mkdir - /opt/bioconda-utils && \ - cp ./bioconda_utils-*.whl \ - ./bioconda_utils/bioconda_utils-requirements.txt \ - /opt/bioconda-utils/ \ - && \ - chgrp -R lucky /opt/bioconda-utils && \ - chmod -R g=u /opt/bioconda-utils - -FROM base -COPY --from=build /opt/bioconda-utils /opt/bioconda-utils -RUN . /opt/conda/etc/profile.d/conda.sh && conda activate base && \ - # Make sure we get the (working) conda we want before installing the rest. - sed -nE \ - '/^conda([>