diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f479bbc..4b2f82c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,18 @@ stages: + - build - deploy-dev - deploy-prod +build: + stage: build + tags: + - demo + script: + - echo $CI_RUNNER_SHORT_TOKEN + - docker login -u mathwave -p $DOCKERHUB_PASSWORD + - docker build -t mathwave/sprint-repo:gitlab-runner gitlab-runner + - docker push mathwave/sprint-repo:gitlab-runner + deploy-dev: stage: deploy-dev tags: diff --git a/gitlab-runner/Dockerfile b/gitlab-runner/Dockerfile new file mode 100644 index 0000000..1bf751c --- /dev/null +++ b/gitlab-runner/Dockerfile @@ -0,0 +1,12 @@ +FROM gitlab/gitlab-runner + + +RUN apt-get update +RUN apt-get install --yes ca-certificates curl gnupg lsb-release +RUN mkdir -p /etc/apt/keyrings +RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg +RUN echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null +RUN apt-get update --yes +RUN apt-get install --yes docker-ce docker-ce-cli containerd.io docker-compose-plugin \ No newline at end of file