Try using the \'app\' label in the cleanup job
This commit is contained in:
parent
460d4fca68
commit
489e85904d
6
scripts/check.pl
Executable file
6
scripts/check.pl
Executable file
@ -0,0 +1,6 @@
|
||||
#! /usr/bin/perl
|
||||
my $commits = "argocd app list -o yaml -l application=badhouseplants | yq '.[].metadata.labels.commit_sha'";
|
||||
my @commits_out = `$commits`;
|
||||
chomp @commits_out;
|
||||
push @commits_out, 'latest';
|
||||
print "@commits_out";
|
@ -26,7 +26,7 @@ chomp @builds_out;
|
||||
# ---------------------------------------
|
||||
# -- Get a list of all commits + 'latest'
|
||||
# ---------------------------------------
|
||||
my $commits = "argocd app list -o yaml -l application=badhouseplants | yq '.[].metadata.labels.commit_sha'";
|
||||
my $commits = "argocd app list -o yaml -l app=badhouseplants | yq '.[].metadata.labels.commit_sha'";
|
||||
my @commits_out = `$commits`;
|
||||
chomp @commits_out;
|
||||
push @commits_out, 'latest';
|
||||
|
@ -8,12 +8,10 @@ my $main_bucket = "badhouseplants-minio:/badhouseplants-net-main";
|
||||
chop($git_branch);
|
||||
chop($git_commit_sha);
|
||||
|
||||
print "Creating a new hashed dir in the common bucket\n";
|
||||
print `rclone copy -P static "$common_bucket/$git_commit_sha"`;
|
||||
|
||||
if ( $git_branch eq $main_branch) {
|
||||
print "Syncing to the production bucket\n";
|
||||
print `rclone copy -P static "$common_bucket/$git_commit_sha"`;
|
||||
print `rclone sync -P "$common_bucket/$git_commit_sha" "$main_bucket/"`;
|
||||
} else {
|
||||
print "Creating a new hashed dir in the common bucket\n";
|
||||
print `rclone copy -P static "$common_bucket/$git_commit_sha"`;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user