Commit aee26322 authored by echel0n's avatar echel0n

Testing automated docker builds.

parent 9f19c8e9
......@@ -3,7 +3,7 @@ before_script:
stages:
- release
- deploy
# - deploy
variables:
CONTAINER_IMAGE: sickrage/sickrage
......@@ -32,112 +32,112 @@ sentry_release:
- develop
- master
deploy_docker_master:
stage: deploy
image: docker:latest
script:
- echo $CI_COMMIT_SHA
- echo $CONTAINER_IMAGE
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker pull $CONTAINER_IMAGE:latest || true
- docker build --network host --build-arg="SOURCE_COMMIT=$CI_COMMIT_SHA" --cache-from $CONTAINER_IMAGE:latest -t $CONTAINER_IMAGE:$(cat sickrage/version.txt) -f Dockerfile .
- docker tag $CONTAINER_IMAGE:$(cat sickrage/version.txt) $CONTAINER_IMAGE:latest
- docker push $CONTAINER_IMAGE:$(cat sickrage/version.txt)
- docker push $CONTAINER_IMAGE:latest
only:
- master
except:
- tags
deploy_docker_master_arm32v7:
stage: deploy
image: docker:latest
before_script:
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
script:
- echo $CI_COMMIT_SHA
- echo $CONTAINER_IMAGE
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker pull $CONTAINER_IMAGE:arm32v7-latest || true
- docker build --network host --build-arg="SOURCE_COMMIT=$CI_COMMIT_SHA" --cache-from $CONTAINER_IMAGE:arm32v7-latest -t $CONTAINER_IMAGE:arm32v7-$(cat sickrage/version.txt) -f Dockerfile.arm32v7 .
- docker tag $CONTAINER_IMAGE:arm32v7-$(cat sickrage/version.txt) $CONTAINER_IMAGE-arm32v7:latest
- docker push $CONTAINER_IMAGE:arm32v7-$(cat sickrage/version.txt)
- docker push $CONTAINER_IMAGE:arm32v7-latest
only:
- master
except:
- tags
deploy_docker_master_arm64v8:
stage: deploy
image: docker:latest
before_script:
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
script:
- echo $CI_COMMIT_SHA
- echo $CONTAINER_IMAGE
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker pull $CONTAINER_IMAGE:arm64v8-latest || true
- docker build --network host --build-arg="SOURCE_COMMIT=$CI_COMMIT_SHA" --cache-from $CONTAINER_IMAGE:arm64v8-latest -t $CONTAINER_IMAGE:arm64v8-$(cat sickrage/version.txt) -f Dockerfile.arm64v8 .
- docker tag $CONTAINER_IMAGE:arm64v8-$(cat sickrage/version.txt) $CONTAINER_IMAGE:arm64v8-latest
- docker push $CONTAINER_IMAGE:arm64v8-$(cat sickrage/version.txt)
- docker push $CONTAINER_IMAGE:arm64v8-latest
only:
- master
except:
- tags
deploy_docker_develop:
stage: deploy
image: docker:latest
script:
- echo $CI_COMMIT_SHA
- echo $CONTAINER_IMAGE
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker pull $CONTAINER_IMAGE:develop || true
- docker build --network host --build-arg="SOURCE_COMMIT=$CI_COMMIT_SHA" --cache-from $CONTAINER_IMAGE:develop -t $CONTAINER_IMAGE:$(cat sickrage/version.txt) -f Dockerfile .
- docker tag $CONTAINER_IMAGE:$(cat sickrage/version.txt) $CONTAINER_IMAGE:develop
- docker push $CONTAINER_IMAGE:$(cat sickrage/version.txt)
- docker push $CONTAINER_IMAGE:develop
only:
- develop
except:
- tags
deploy_docker_develop_arm32v7:
stage: deploy
image: docker:latest
before_script:
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
script:
- echo $CI_COMMIT_SHA
- echo $CONTAINER_IMAGE
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker pull $CONTAINER_IMAGE:arm32v7-develop || true
- docker build --network host --build-arg="SOURCE_COMMIT=$CI_COMMIT_SHA" --cache-from $CONTAINER_IMAGE:arm32v7-develop -t $CONTAINER_IMAGE:arm32v7-$(cat sickrage/version.txt) -f Dockerfile.arm32v7 .
- docker tag $CONTAINER_IMAGE:arm32v7-$(cat sickrage/version.txt) $CONTAINER_IMAGE:arm32v7-develop
- docker push $CONTAINER_IMAGE:arm32v7-$(cat sickrage/version.txt)
- docker push $CONTAINER_IMAGE:arm32v7-develop
only:
- develop
except:
- tags
deploy_docker_develop_arm64v8:
stage: deploy
image: docker:latest
before_script:
- docker run --rm --privileged multiarch/qemu-user-static:register --reset
script:
- echo $CI_COMMIT_SHA
- echo $CONTAINER_IMAGE
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker pull $CONTAINER_IMAGE:arm64v8-develop || true
- docker build --network host --build-arg="SOURCE_COMMIT=$CI_COMMIT_SHA" --cache-from $CONTAINER_IMAGE:arm64v8-develop -t $CONTAINER_IMAGE:arm64v8-$(cat sickrage/version.txt) -f Dockerfile.arm64v8 .
- docker tag $CONTAINER_IMAGE:arm64v8-$(cat sickrage/version.txt) $CONTAINER_IMAGE:arm64v8-develop
- docker push $CONTAINER_IMAGE:arm64v8-$(cat sickrage/version.txt)
- docker push $CONTAINER_IMAGE:arm64v8-develop
only:
- develop
except:
- tags
\ No newline at end of file
#deploy_docker_master:
# stage: deploy
# image: docker:latest
# script:
# - echo $CI_COMMIT_SHA
# - echo $CONTAINER_IMAGE
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
# - docker pull $CONTAINER_IMAGE:latest || true
# - docker build --network host --build-arg="SOURCE_COMMIT=$CI_COMMIT_SHA" --cache-from $CONTAINER_IMAGE:latest -t $CONTAINER_IMAGE:$(cat sickrage/version.txt) -f Dockerfile .
# - docker tag $CONTAINER_IMAGE:$(cat sickrage/version.txt) $CONTAINER_IMAGE:latest
# - docker push $CONTAINER_IMAGE:$(cat sickrage/version.txt)
# - docker push $CONTAINER_IMAGE:latest
# only:
# - master
# except:
# - tags
#
#deploy_docker_master_arm32v7:
# stage: deploy
# image: docker:latest
# before_script:
# - docker run --rm --privileged multiarch/qemu-user-static:register --reset
# script:
# - echo $CI_COMMIT_SHA
# - echo $CONTAINER_IMAGE
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
# - docker pull $CONTAINER_IMAGE:arm32v7-latest || true
# - docker build --network host --build-arg="SOURCE_COMMIT=$CI_COMMIT_SHA" --cache-from $CONTAINER_IMAGE:arm32v7-latest -t $CONTAINER_IMAGE:arm32v7-$(cat sickrage/version.txt) -f Dockerfile.arm32v7 .
# - docker tag $CONTAINER_IMAGE:arm32v7-$(cat sickrage/version.txt) $CONTAINER_IMAGE-arm32v7:latest
# - docker push $CONTAINER_IMAGE:arm32v7-$(cat sickrage/version.txt)
# - docker push $CONTAINER_IMAGE:arm32v7-latest
# only:
# - master
# except:
# - tags
#
#deploy_docker_master_arm64v8:
# stage: deploy
# image: docker:latest
# before_script:
# - docker run --rm --privileged multiarch/qemu-user-static:register --reset
# script:
# - echo $CI_COMMIT_SHA
# - echo $CONTAINER_IMAGE
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
# - docker pull $CONTAINER_IMAGE:arm64v8-latest || true
# - docker build --network host --build-arg="SOURCE_COMMIT=$CI_COMMIT_SHA" --cache-from $CONTAINER_IMAGE:arm64v8-latest -t $CONTAINER_IMAGE:arm64v8-$(cat sickrage/version.txt) -f Dockerfile.arm64v8 .
# - docker tag $CONTAINER_IMAGE:arm64v8-$(cat sickrage/version.txt) $CONTAINER_IMAGE:arm64v8-latest
# - docker push $CONTAINER_IMAGE:arm64v8-$(cat sickrage/version.txt)
# - docker push $CONTAINER_IMAGE:arm64v8-latest
# only:
# - master
# except:
# - tags
#
#deploy_docker_develop:
# stage: deploy
# image: docker:latest
# script:
# - echo $CI_COMMIT_SHA
# - echo $CONTAINER_IMAGE
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
# - docker pull $CONTAINER_IMAGE:develop || true
# - docker build --network host --build-arg="SOURCE_COMMIT=$CI_COMMIT_SHA" --cache-from $CONTAINER_IMAGE:develop -t $CONTAINER_IMAGE:$(cat sickrage/version.txt) -f Dockerfile .
# - docker tag $CONTAINER_IMAGE:$(cat sickrage/version.txt) $CONTAINER_IMAGE:develop
# - docker push $CONTAINER_IMAGE:$(cat sickrage/version.txt)
# - docker push $CONTAINER_IMAGE:develop
# only:
# - develop
# except:
# - tags
#
#deploy_docker_develop_arm32v7:
# stage: deploy
# image: docker:latest
# before_script:
# - docker run --rm --privileged multiarch/qemu-user-static:register --reset
# script:
# - echo $CI_COMMIT_SHA
# - echo $CONTAINER_IMAGE
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
# - docker pull $CONTAINER_IMAGE:arm32v7-develop || true
# - docker build --network host --build-arg="SOURCE_COMMIT=$CI_COMMIT_SHA" --cache-from $CONTAINER_IMAGE:arm32v7-develop -t $CONTAINER_IMAGE:arm32v7-$(cat sickrage/version.txt) -f Dockerfile.arm32v7 .
# - docker tag $CONTAINER_IMAGE:arm32v7-$(cat sickrage/version.txt) $CONTAINER_IMAGE:arm32v7-develop
# - docker push $CONTAINER_IMAGE:arm32v7-$(cat sickrage/version.txt)
# - docker push $CONTAINER_IMAGE:arm32v7-develop
# only:
# - develop
# except:
# - tags
#
#deploy_docker_develop_arm64v8:
# stage: deploy
# image: docker:latest
# before_script:
# - docker run --rm --privileged multiarch/qemu-user-static:register --reset
# script:
# - echo $CI_COMMIT_SHA
# - echo $CONTAINER_IMAGE
# - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
# - docker pull $CONTAINER_IMAGE:arm64v8-develop || true
# - docker build --network host --build-arg="SOURCE_COMMIT=$CI_COMMIT_SHA" --cache-from $CONTAINER_IMAGE:arm64v8-develop -t $CONTAINER_IMAGE:arm64v8-$(cat sickrage/version.txt) -f Dockerfile.arm64v8 .
# - docker tag $CONTAINER_IMAGE:arm64v8-$(cat sickrage/version.txt) $CONTAINER_IMAGE:arm64v8-develop
# - docker push $CONTAINER_IMAGE:arm64v8-$(cat sickrage/version.txt)
# - docker push $CONTAINER_IMAGE:arm64v8-develop
# only:
# - develop
# except:
# - tags
\ No newline at end of file
......@@ -7,7 +7,7 @@ ENV SOURCE_COMMIT $SOURCE_COMMIT
ENV TZ 'Canada/Pacific'
# install app
COPY . /opt/sickrage/
COPY .. /opt/sickrage/
RUN apk add --update --no-cache libffi-dev openssl-dev libxml2-dev libxslt-dev linux-headers build-base git tzdata unrar
RUN pip install -U pip setuptools
......
......@@ -13,7 +13,7 @@ ENV TZ 'Canada/Pacific'
COPY --from=downloader /qemu-arm-static /usr/bin/qemu-arm-static
# install app
COPY . /opt/sickrage/
COPY .. /opt/sickrage/
RUN apk add --update --no-cache libffi-dev openssl-dev libxml2-dev libxslt-dev linux-headers build-base git tzdata unrar
RUN pip install -U pip setuptools
......
......@@ -13,7 +13,7 @@ ENV TZ 'Canada/Pacific'
COPY --from=downloader /qemu-aarch64-static /usr/bin/qemu-aarch64-static
# install app
COPY . /opt/sickrage/
COPY .. /opt/sickrage/
RUN apk add --update --no-cache libffi-dev openssl-dev libxml2-dev libxslt-dev linux-headers build-base git tzdata unrar
RUN pip install -U pip setuptools
......
#!/bin/bash
# Register qemu-*-static for all supported processors except the
# current one, but also remove all registered binfmt_misc before
docker run --rm --privileged multiarch/qemu-user-static:register --reset
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment