27 lines
1.1 KiB
Perl
27 lines
1.1 KiB
Perl
|
#! /usr/bin/perl
|
||
|
use strict;
|
||
|
use warnings;
|
||
|
|
||
|
my $chart_version = `cat chart/Chart.yaml | yq '.version'` or die;
|
||
|
chomp($chart_version);
|
||
|
|
||
|
my $git_branch = `git rev-parse --abbrev-ref HEAD`;
|
||
|
chomp($git_branch);
|
||
|
my $git_commit_sha = `git rev-parse HEAD`;
|
||
|
chomp($git_commit_sha);
|
||
|
my $main_branch = "main";
|
||
|
|
||
|
print
|
||
|
print $chart_version;
|
||
|
# - kubectl get -f ./kube/applicationset.yaml -o yaml > /tmp/appset.yaml
|
||
|
# - yq -i "del(.metadata.resourceVersion)" /tmp/appset.yaml
|
||
|
# - yq -i "del(.metadata.generation)" /tmp/appset.yaml
|
||
|
# - yq -i "del(.metadata.uid)" /tmp/appset.yaml
|
||
|
# - yq -i "del(.status)" /tmp/appset.yaml
|
||
|
# - yq -i "del(.spec.generators[].list.elements[] | select(.branch == \"$ARGO_APP_BRANCH\"))" /tmp/appset.yaml
|
||
|
# - yq -i "del(.spec.generators[].list.elements[] | select(.commit_sha == \"$ARGO_APP_IMAGE_TAG\"))" /tmp/appset.yaml
|
||
|
# - yq -i '. *= load("./kube/applicationset.yaml")' /tmp/appset.yaml
|
||
|
# - envsubst < ./kube/main.yaml > /tmp/elements.yaml
|
||
|
# - yq -i '.spec.generators[].list.elements += load("/tmp/elements.yaml")' /tmp/appset.yaml
|
||
|
# - kubectl apply -f /tmp/appset.yaml
|
||
|
#
|