Skip to content

Commit e642d1d

Browse files
Open MPI Teamjsquyres
authored andcommitted
nightly tarball: put the SSH target in a variable
Just to make the scripts a little less error-prone. Also split up the ssh/scp lines just for readability. Signed-off-by: Jeff Squyres <[email protected]>
1 parent 328b654 commit e642d1d

File tree

3 files changed

+54
-15
lines changed

3 files changed

+54
-15
lines changed

contrib/build-server/hwloc-nightly-tarball.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ raw_uri=https://raw.github.com/open-mpi/hwloc
1717
# where to put built tarballs
1818
outputroot=$HOME/hwloc/nightly
1919

20+
# Target where to scp the final tarballs
21+
22+
2023
# where to find the build script
2124
script_uri=contrib/nightly/make_snapshot_tarball
2225

@@ -111,13 +114,23 @@ for branch in $branches; do
111114
fi
112115
echo "=== Posting tarball to open-mpi.org"
113116
# tell the web server to cleanup old nightly tarballs
114-
ssh -p 2222 [email protected] "git/ompi/contrib/build-server/remove-old.pl 7 public_html/software/hwloc/nightly/$branch"
117+
ssh -p 2222 \
118+
$output_ssh_target \
119+
"git/ompi/contrib/build-server/remove-old.pl 7 public_html/software/hwloc/nightly/$branch"
115120
# upload the new ones
116-
scp -P 2222 $outputroot/$branch/hwloc-$latest_snapshot.tar.* [email protected]:public_html/software/hwloc/nightly/$branch/
117-
scp -P 2222 $outputroot/$branch/latest_snapshot.txt [email protected]:public_html/software/hwloc/nightly/$branch/
121+
scp -P 2222 \
122+
$outputroot/$branch/hwloc-$latest_snapshot.tar.* \
123+
$output_ssh_target:public_html/software/hwloc/nightly/$branch/
124+
scp -P 2222 \
125+
$outputroot/$branch/latest_snapshot.txt \
126+
$output_ssh_target:public_html/software/hwloc/nightly/$branch/
118127
# direct the web server to regenerate the checksums
119-
ssh -p 2222 [email protected] "cd public_html/software/hwloc/nightly/$branch && md5sum hwloc* > md5sums.txt"
120-
ssh -p 2222 [email protected] "cd public_html/software/hwloc/nightly/$branch && sha1sum hwloc* > sha1sums.txt"
128+
ssh -p 2222 \
129+
$output_ssh_target \
130+
"cd public_html/software/hwloc/nightly/$branch && md5sum hwloc* > md5sums.txt"
131+
ssh -p 2222 \
132+
$output_ssh_target \
133+
"cd public_html/software/hwloc/nightly/$branch && sha1sum hwloc* > sha1sums.txt"
121134
fi
122135

123136
# Failed builds are not removed. But if a human forgets to come

contrib/build-server/openmpi-nightly-tarball.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ master_raw_uri=https://raw.github.com/open-mpi/ompi
1818
# adjusted to match your site!
1919
outputroot=$HOME/openmpi/nightly
2020

21+
# Target where to scp the final tarballs
22+
23+
2124
# where to find the build script
2225
script_uri=contrib/nightly/create_tarball.sh
2326

@@ -116,13 +119,23 @@ for branch in $branches; do
116119
fi
117120
echo "=== Posting tarball to open-mpi.org"
118121
# tell the web server to cleanup old nightly tarballs
119-
ssh -p 2222 [email protected] "git/ompi/contrib/build-server/remove-old.pl 7 public_html/nightly/$branch"
122+
ssh -p 2222 \
123+
$output_ssh_target \
124+
"git/ompi/contrib/build-server/remove-old.pl 7 public_html/nightly/$branch"
120125
# upload the new ones
121-
scp -P 2222 $outputroot/$branch/openmpi-$latest_snapshot.tar.* [email protected]:public_html/nightly/$branch/
122-
scp -P 2222 $outputroot/$branch/latest_snapshot.txt [email protected]:public_html/nightly/$branch/
126+
scp -P 2222 \
127+
$outputroot/$branch/openmpi-$latest_snapshot.tar.* \
128+
$output_ssh_target:public_html/nightly/$branch/
129+
scp -P 2222 \
130+
$outputroot/$branch/latest_snapshot.txt \
131+
$output_ssh_target:public_html/nightly/$branch/
123132
# direct the web server to regenerate the checksums
124-
ssh -p 2222 [email protected] "cd public_html/nightly/$branch && md5sum openmpi* > md5sums.txt"
125-
ssh -p 2222 [email protected] "cd public_html/nightly/$branch && sha1sum openmpi* > sha1sums.txt"
133+
ssh -p 2222 \
134+
$output_ssh_target \
135+
"cd public_html/nightly/$branch && md5sum openmpi* > md5sums.txt"
136+
ssh -p 2222 \
137+
$output_ssh_target \
138+
"cd public_html/nightly/$branch && sha1sum openmpi* > sha1sums.txt"
126139
fi
127140

128141
# Failed builds are not removed. But if a human forgets to come

contrib/build-server/pmix-nightly-tarball.sh

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ release_raw_uri=https://raw.github.com/pmix/releases
1919
# where to put built tarballs
2020
outputroot=$HOME/pmix/nightly
2121

22+
# Target where to scp the final tarballs
23+
24+
2225
# where to find the build script
2326
script_uri=contrib/nightly/create_tarball.sh
2427

@@ -121,13 +124,23 @@ for branch in $branches; do
121124
fi
122125
echo "=== Posting tarball to open-mpi.org"
123126
# tell the web server to cleanup old nightly tarballs
124-
ssh -p 2222 [email protected] "git/ompi/contrib/build-server/remove-old.pl 7 public_html/software/pmix/nightly/$branch"
127+
ssh -p 2222 \
128+
$output_ssh_target \
129+
"git/ompi/contrib/build-server/remove-old.pl 7 public_html/software/pmix/nightly/$branch"
125130
# upload the new ones
126-
scp -P 2222 $outputroot/$branch/pmix-$latest_snapshot.tar.* [email protected]:public_html/software/pmix/nightly/$branch/
127-
scp -P 2222 $outputroot/$branch/latest_snapshot.txt [email protected]:public_html/software/pmix/nightly/$branch/
131+
scp -P 2222 \
132+
$outputroot/$branch/pmix-$latest_snapshot.tar.* \
133+
$output_ssh_target:public_html/software/pmix/nightly/$branch/
134+
scp -P 2222 \
135+
$outputroot/$branch/latest_snapshot.txt \
136+
$output_ssh_target:public_html/software/pmix/nightly/$branch/
128137
# direct the web server to regenerate the checksums
129-
ssh -p 2222 [email protected] "cd public_html/software/pmix/nightly/$branch && md5sum pmix* > md5sums.txt"
130-
ssh -p 2222 [email protected] "cd public_html/software/pmix/nightly/$branch && sha1sum pmix* > sha1sums.txt"
138+
ssh -p 2222 \
139+
$output_ssh_target \
140+
"cd public_html/software/pmix/nightly/$branch && md5sum pmix* > md5sums.txt"
141+
ssh -p 2222 \
142+
$output_ssh_target \
143+
"cd public_html/software/pmix/nightly/$branch && sha1sum pmix* > sha1sums.txt"
131144
fi
132145

133146
# Failed builds are not removed. But if a human forgets to come

0 commit comments

Comments
 (0)