Skip to content

Commit 538829e

Browse files
committed
Create docker image for pyxis
1 parent ff1f1c7 commit 538829e

2 files changed

Lines changed: 26 additions & 3 deletions

File tree

.gitlab-ci.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,33 @@
11
stages:
2+
- build
23
- components
34

45
default:
6+
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
57
tags:
68
- infra
79

10+
build-image:
11+
stage: build
12+
image: docker:28.5.0
13+
variables:
14+
DOCKER_MIRROR: https://mirror.gcr.io
15+
DOCKER_OPTIONS: "--registry-mirror ${DOCKER_MIRROR}"
16+
DOCKER_DRIVER: overlay2
17+
DOCKER_HOST: tcp://docker:2376
18+
DOCKER_TLS_CERTDIR: /certs
19+
services:
20+
- name: docker:29.2.1-dind
21+
alias: docker
22+
entrypoint: [ "sh", "-c", "dockerd-entrypoint.sh $DOCKER_OPTIONS" ]
23+
script:
24+
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
25+
- echo $CI_REGISTRY_PASSWORD | docker login --password-stdin --username $CI_REGISTRY_USER $CI_REGISTRY
26+
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
27+
rules:
28+
- if: $CI_PIPELINE_SOURCE == "push"
29+
830
components:update:
9-
image: ruby:3.2.2
1031
stage: components
1132
resource_group: components_update
1233
timeout: 10 min
@@ -19,7 +40,6 @@ components:update:
1940
- sculptor
2041
- taurus
2142
script:
22-
- bundle install
2343
- bin/pyxis components update --component $COMPONENT
2444
rules:
2545
- if: $UPDATE_COMPONENTS == "true"

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
FROM ruby:3.2.2
1+
FROM gcr.io/go-containerregistry/crane:v0.21.0 AS crane
2+
FROM ruby:3.2.2 AS final
3+
COPY --from=crane /ko-app/crane /ko-app/crane
4+
ENV PATH=/ko-app:$PATH
25
COPY . /pyxis
36
WORKDIR /pyxis
47
RUN bundle install

0 commit comments

Comments
 (0)