fix: Disable old ci
This commit is contained in:
+42
-43
@@ -3,53 +3,52 @@ default:
|
|||||||
tags:
|
tags:
|
||||||
- nix
|
- nix
|
||||||
|
|
||||||
stages:
|
|
||||||
- release
|
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- project: oceanbox/gitlab-ci
|
- project: oceanbox/gitlab-ci
|
||||||
ref: v4.5
|
ref: v4.5
|
||||||
file: template/Base.gitlab-ci.yml
|
file: template/Base.gitlab-ci.yml
|
||||||
|
# stages:
|
||||||
|
# - release
|
||||||
|
|
||||||
image:
|
# image:
|
||||||
name: alpine/helm:latest
|
# name: alpine/helm:latest
|
||||||
entrypoint: ["/bin/bash", "-c"]
|
# entrypoint: ["/bin/bash", "-c"]
|
||||||
|
|
||||||
release:
|
# release:
|
||||||
stage: release
|
# stage: release
|
||||||
rules:
|
# rules:
|
||||||
- if: "$CI_COMMIT_BRANCH =~ /^main/"
|
# - if: "$CI_COMMIT_BRANCH =~ /^main/"
|
||||||
when: always
|
# when: always
|
||||||
- when: never
|
# - when: never
|
||||||
script:
|
# script:
|
||||||
- |
|
# - |
|
||||||
cd $CI_PROJECT_DIR
|
# cd $CI_PROJECT_DIR
|
||||||
for i in $(git show --pretty="" --name-only | grep '^charts/.*/Chart.yaml' | cut -d/ -f2); do
|
# for i in $(git show --pretty="" --name-only | grep '^charts/.*/Chart.yaml' | cut -d/ -f2); do
|
||||||
pack=$(helm package ./charts/$i | sed 's/Success.*: \(.*\)/\1/')
|
# pack=$(helm package ./charts/$i | sed 's/Success.*: \(.*\)/\1/')
|
||||||
if [ ! -z $pack ]; then
|
# if [ ! -z $pack ]; then
|
||||||
chart=$(basename $pack)
|
# chart=$(basename $pack)
|
||||||
curl --request POST \
|
# curl --request POST \
|
||||||
--user gitlab-ci-token:$CI_JOB_TOKEN \
|
# --user gitlab-ci-token:$CI_JOB_TOKEN \
|
||||||
--form "chart=@${chart}" \
|
# --form "chart=@${chart}" \
|
||||||
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"
|
# "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"
|
||||||
fi
|
# fi
|
||||||
done
|
# done
|
||||||
|
|
||||||
rebuild:
|
# rebuild:
|
||||||
stage: release
|
# stage: release
|
||||||
rules:
|
# rules:
|
||||||
- when: manual
|
# - when: manual
|
||||||
allow_failure: true
|
# allow_failure: true
|
||||||
script:
|
# script:
|
||||||
- |
|
# - |
|
||||||
cd $CI_PROJECT_DIR
|
# cd $CI_PROJECT_DIR
|
||||||
for i in $(find ./charts -maxdepth 2 -name Chart.yaml | cut -d/ -f3); do
|
# for i in $(find ./charts -maxdepth 2 -name Chart.yaml | cut -d/ -f3); do
|
||||||
pack=$(helm package ./charts/$i | sed 's/Success.*: \(.*\)/\1/')
|
# pack=$(helm package ./charts/$i | sed 's/Success.*: \(.*\)/\1/')
|
||||||
if [ ! -z $pack ]; then
|
# if [ ! -z $pack ]; then
|
||||||
chart=$(basename $pack)
|
# chart=$(basename $pack)
|
||||||
curl --request POST \
|
# curl --request POST \
|
||||||
--user gitlab-ci-token:$CI_JOB_TOKEN \
|
# --user gitlab-ci-token:$CI_JOB_TOKEN \
|
||||||
--form "chart=@${chart}" \
|
# --form "chart=@${chart}" \
|
||||||
"${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"
|
# "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/helm/api/stable/charts"
|
||||||
fi
|
# fi
|
||||||
done
|
# done
|
||||||
|
|||||||
Reference in New Issue
Block a user