Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
supabase-kubernetes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hub
supabase-kubernetes
Commits
7221bb07
Commit
7221bb07
authored
2 months ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
add gitlab-ci
parent
b7789224
No related branches found
No related tags found
No related merge requests found
Pipeline
#154406
failed
2 months ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+32
-0
32 additions, 0 deletions
.gitlab-ci.yml
with
32 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
32
−
0
View file @
7221bb07
stages
:
-
build
build
:
stage
:
build
image
:
harbor.pasteur.fr/kube-system/helm-kubectl:3.12.0
script
:
-
echo "Building helm chart"
-
CHART_VERSION=$(helm show chart . | grep version | cut -d' ' -f2)
-
CHART_NAME=$(helm show chart . | grep name | cut -d' ' -f2)
-
echo $CHART_NAME
-
echo $CHART_VERSION
-
|
if [ "main" == "${CI_COMMIT_REF_SLUG}" ]; then
export CHANNEL="stable"
else
export CHANNEL="${CI_COMMIT_REF_SLUG}"
fi
echo $CHANNEL
-
export CHART_RELEASE_NAME="${CHART_NAME}-${CHART_VERSION}.tgz"
-
echo $CHART_RELEASE_NAME
-
helm package .
-
HTTP_CODE=$(curl -o /dev/null --silent -Iw '%{http_code}' "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/${CHANNEL}/charts/${CHART_RELEASE_NAME}")
-
|
if [ $HTTP_CODE == "200" ]; then
echo "Shouln't publish this version as version ${CHART_VERSION}:"
echo "It already is in the package registry, please increase its version number"
exit 5
else
echo "Version not already published, continuing publication process"
fi
-
curl --request POST --user gitlab-ci-token:$CI_JOB_TOKEN --form "chart=@${CHART_RELEASE_NAME}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/${CHANNEL}/charts"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment