Commit 1c80e2ce authored by nold's avatar nold

Change: use directories instead of branches

parent 5d95bc4a
Pipeline #26 failed
......@@ -4,36 +4,41 @@ services:
- docker:dind
stages:
- build
# - test
- build:minimal
- build:default
- build:dreamshell
- release
variables:
RELEASE_TAG: latest
TEST_IMAGE: hub.nold.in/$CI_PROJECT_PATH:$CI_BUILD_REF
RELEASE_IMAGE: hub.nold.in/$CI_PROJECT_PATH:$RELEASE_TAG
DOCKER_DRIVER: overlay
before_script:
- docker info
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN hub.nold.in
build:
build:minimal:
stage: build
variables:
RELEASE_TAG: minimal
RELEASE_IMAGE: hub.nold.in/$CI_PROJECT_PATH:$RELEASE_TAG
script:
- docker build -t $TEST_IMAGE .
- docker push $TEST_IMAGE
- docker build -t $RELEASE_IMAGE minimal/Dockerfile
- docker push $RELEASE_IMAGE
#test:
# stage: test
# script:
# - docker run --rm $TEST_IMAGE /test.sh
build:default:
stage: build
variables:
RELEASE_TAG: latest
RELEASE_IMAGE: hub.nold.in/$CI_PROJECT_PATH:$RELEASE_TAG
script:
- docker build -t $RELEASE_IMAGE default/Dockerfile
- docker push $RELEASE_IMAGE
release:
stage: release
build:dreamshell:
stage: build
variables:
RELEASE_TAG: dreamshell
RELEASE_IMAGE: hub.nold.in/$CI_PROJECT_PATH:$RELEASE_TAG
script:
- docker pull $TEST_IMAGE
- docker tag $TEST_IMAGE $RELEASE_IMAGE
- docker push $RELEASE_IMAGE
only:
- master
- docker build -t $RELEASE_IMAGE dreamshell/Dockerfile
- docker push $RELEASE_IMAGE
########################################################################
# Dockerfile to build minimal KallistiOS Toolchain
########################################################################
FROM hub.nold.in/nold/docker-kallistios-sdk:minimal
RUN apt-get update && apt-get install -y autoconf && apt-get clean
RUN git clone --depth=1 https://github.com/nold360/DreamShell /opt/toolchains/dc/kos/ds
# Download & Unpack Toolchain
WORKDIR /opt/toolchains/dc/kos/ds/sdk/toolchain
RUN bash download.sh && \
bash unpack.sh && \
rm *.gz *.bz2
# Build Toolchain
RUN bash -c 'source /opt/toolchains/dc/kos/environ.sh; make makejobs=-j2 verbose=1 erase=1'
# Rebuild patched KOS
WORKDIR /opt/toolchains/dc/kos
RUN bash -c 'source /opt/toolchains/dc/kos/environ.sh; make'
# Test-Build DS-Libs
WORKDIR /opt/toolchains/dc/kos/ds/lib
RUN bash -c 'source /opt/toolchains/dc/kos/environ.sh; make'
# Test-Build Dreamshell
WORKDIR /opt/toolchains/dc/kos/ds
RUN bash -c 'source /opt/toolchains/dc/kos/environ.sh; make -j2 && make clean'
########################################################################
# Dockerfile to build minimal KallistiOS Toolchain
########################################################################
FROM debian:jessie
ENV DEBIAN_FRONTEND noninteractive
# Prerequirements / second line for libs / third line for mksdiso & img4dc
RUN apt-get update && apt-get -y install build-essential git curl texinfo python subversion \
libjpeg-dev libpng++-dev \
genisoimage p7zip-full cmake && \
apt-get clean
# Fetch sources
RUN mkdir -p /opt/toolchains/dc && \
git clone --depth=1 https://github.com/KallistiOS/KallistiOS /opt/toolchains/dc/kos && \
git clone --depth=1 https://github.com/KallistiOS/kos-ports /opt/toolchains/dc/kos-ports
# Setup KOS Environment
RUN cp /opt/toolchains/dc/kos/doc/environ.sh.sample /opt/toolchains/dc/kos/environ.sh && \
echo 'source /opt/toolchains/dc/kos/environ.sh' >> /root/.bashrc
# Build Toolchain
WORKDIR /opt/toolchains/dc/kos/utils/dc-chain
RUN bash download.sh && \
bash unpack.sh && \
make erase=1 && \
bash cleanup.sh
WORKDIR /opt/toolchains/dc/kos/utils/kmgenc
RUN bash -c 'source /opt/toolchains/dc/kos/environ.sh; make'
# Build KOS-/Ports
WORKDIR /opt/toolchains/dc/kos
RUN bash -c 'source /opt/toolchains/dc/kos/environ.sh; make ; make kos-ports_all'
# Volume to compile project sourcecode
VOLUME /src
WORKDIR /src
COPY ./run.sh /run.sh
ENTRYPOINT [ "/run.sh" ]
CMD [ "make" ]
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