gitlab
This commit is contained in:
parent
8833a48605
commit
138545d9ab
@ -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:
|
||||
|
12
gitlab-runner/Dockerfile
Normal file
12
gitlab-runner/Dockerfile
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user