summaryrefslogtreecommitdiffstats
path: root/.circleci
diff options
context:
space:
mode:
authorPerl Tidy <perltidy@bugzilla.org>2018-12-05 21:38:52 +0100
committerDylan William Hardison <dylan@hardison.net>2018-12-05 23:49:08 +0100
commit8ec8da0491ad89604700b3e29a227966f6d84ba1 (patch)
tree9d270f173330ca19700e0ba9f2ee931300646de1 /.circleci
parenta7bb5a65b71644d9efce5fed783ed545b9336548 (diff)
downloadbugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.gz
bugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.xz
no bug - reformat all the code using the new perltidy rules
Diffstat (limited to '.circleci')
-rwxr-xr-x.circleci/deploy.pl51
1 files changed, 25 insertions, 26 deletions
diff --git a/.circleci/deploy.pl b/.circleci/deploy.pl
index 391b9b660..5c7d648a6 100755
--- a/.circleci/deploy.pl
+++ b/.circleci/deploy.pl
@@ -3,50 +3,49 @@ use 5.10.1;
use strict;
use warnings;
-my ($repo, $user, $pass) = check_env(qw(DOCKERHUB_REPO DOCKER_USER DOCKER_PASS));
+my ($repo, $user, $pass)
+ = check_env(qw(DOCKERHUB_REPO DOCKER_USER DOCKER_PASS));
run("docker", "login", "-u", $user, "-p", $pass);
my @docker_tags = ($ENV{CIRCLE_SHA1});
if ($ENV{CIRCLE_TAG}) {
- push @docker_tags, $ENV{CIRCLE_TAG};
+ push @docker_tags, $ENV{CIRCLE_TAG};
}
elsif ($ENV{CIRCLE_BRANCH}) {
- if ($ENV{CIRCLE_BRANCH} eq 'master') {
- push @docker_tags, 'latest';
- }
- else {
- push @docker_tags, $ENV{CIRCLE_BRANCH};
- }
+ if ($ENV{CIRCLE_BRANCH} eq 'master') {
+ push @docker_tags, 'latest';
+ }
+ else {
+ push @docker_tags, $ENV{CIRCLE_BRANCH};
+ }
}
say "Pushing tags...";
say " $_" for @docker_tags;
foreach my $tag (@docker_tags) {
- run("docker", "tag", "bmo", "$repo:$tag");
- run("docker", "push", "$repo:$tag");
+ run("docker", "tag", "bmo", "$repo:$tag");
+ run("docker", "push", "$repo:$tag");
}
sub run {
- my (@cmd) = @_;
- my $rv = system(@cmd);
- exit 1 if $rv != 0;
+ my (@cmd) = @_;
+ my $rv = system(@cmd);
+ exit 1 if $rv != 0;
}
sub check_env {
- my (@missing, @found);
- foreach my $name (@_) {
- push @missing, $name unless $ENV{$name};
- push @found, $ENV{$name};
- }
-
- if (@missing) {
- warn "Missing environmental variables: ", join(", ", @missing), "\n";
- exit;
- }
- return @found;
+ my (@missing, @found);
+ foreach my $name (@_) {
+ push @missing, $name unless $ENV{$name};
+ push @found, $ENV{$name};
+ }
+
+ if (@missing) {
+ warn "Missing environmental variables: ", join(", ", @missing), "\n";
+ exit;
+ }
+ return @found;
}
-
-