Skip to content

Commit 840041d

Browse files
Merge pull request #6 from coreweave/bj/update-ci
feat(cicd): updating ci/cd for default coreweave branch
2 parents 2611cd9 + ee35c62 commit 840041d

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed

.gitlab-ci.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
default:
2+
image:
3+
name: gcr.io/kaniko-project/executor:debug
4+
entrypoint: [ "" ]
5+
tags:
6+
- ord1-tenant-acc
7+
8+
stages:
9+
- build
10+
- release
11+
12+
build:
13+
stage: build
14+
variables:
15+
REF_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
16+
FIXED_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA
17+
DOCKERFILE: ${CI_PROJECT_DIR}/Dockerfile
18+
before_script:
19+
- export HTTP_PROXY=${CACHE_PROXY}
20+
- export NO_PROXY=${CACHE_REGISTRY_HOST}
21+
- mkdir -p /kaniko/.docker
22+
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
23+
script: |-
24+
/kaniko/executor \
25+
$KANIKO_ADDTL_ARGS \
26+
--context . \
27+
--dockerfile $DOCKERFILE \
28+
--destination $REF_IMAGE \
29+
--destination $FIXED_IMAGE
30+
only:
31+
changes:
32+
- Dockerfile
33+
- entrypoint.sh
34+
- LICENSE
35+
- liveliness.sh
36+
- nginx.conf
37+
- nginx.manifest.common.conf
38+
- nginx.manifest.stale.conf
39+
- create_ca_cert.sh
40+
41+
build:release:
42+
stage: build
43+
image: node:lts-alpine3.15
44+
only:
45+
refs:
46+
- master
47+
artifacts:
48+
paths:
49+
- artifacts.env
50+
expire_in: 1 day
51+
before_script:
52+
- apk --no-cache add git
53+
script:
54+
- npm install
55+
- npx semantic-release
56+
57+
release:
58+
stage: release
59+
only:
60+
refs:
61+
- master
62+
dependencies:
63+
- build:release
64+
variables:
65+
DOCKERFILE: $CI_PROJECT_DIR/Dockerfile
66+
LATEST_IMAGE: $CI_REGISTRY_IMAGE:latest
67+
before_script:
68+
- export HTTP_PROXY=${CACHE_PROXY}
69+
- export NO_PROXY=${CACHE_REGISTRY_HOST}
70+
- mkdir -p /kaniko/.docker
71+
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
72+
- export $(cat artifacts.env | xargs)
73+
- export RELEASE_IMAGE=$CI_REGISTRY_IMAGE:$BUILD_VERSION
74+
script: |-
75+
/kaniko/executor \
76+
$KANIKO_ADDTL_ARGS \
77+
--context . \
78+
--dockerfile $DOCKERFILE \
79+
--destination $RELEASE_IMAGE \
80+
--destination $LATEST_IMAGE

.releaserc.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
branches:
2+
- master
3+
preset: "angular"
4+
tagFormat: v${version}
5+
plugins:
6+
- "@semantic-release/commit-analyzer"
7+
- "@semantic-release/exec"
8+
repositoryUrl: "[email protected]:coreweave/docker-registry-proxy.git"
9+
analyzeCommits:
10+
- path: "@semantic-release/commit-analyzer"
11+
releaseRules:
12+
- type: "feature"
13+
release: "minor"
14+
- type: "update"
15+
release: "minor"
16+
- type: "refactor"
17+
release: "patch"
18+
- type: "bugfix"
19+
release: "patch"
20+
- type: "docs"
21+
release: "patch"
22+
parserOpts:
23+
noteKeywords:
24+
- "BREAKING CHANGE"
25+
- "BREAKING CHANGES"
26+
publish:
27+
- path: "@semantic-release/exec"
28+
publishCmd: "echo \"BUILD_VERSION=\\\"v${nextRelease.version}\\\"\" > artifacts.env"

0 commit comments

Comments
 (0)