You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by na...@apache.org on 2019/10/13 13:48:47 UTC

svn commit: r36311 - in /dev/jclouds: verify_jclouds_2.1.x-rc.cmd verify_jclouds_2.1.x-rc.sh

Author: nacx
Date: Sun Oct 13 13:48:47 2019
New Revision: 36311

Log:
Added verification scripts for 2.1.x

Added:
    dev/jclouds/verify_jclouds_2.1.x-rc.cmd   (with props)
    dev/jclouds/verify_jclouds_2.1.x-rc.sh   (with props)

Added: dev/jclouds/verify_jclouds_2.1.x-rc.cmd
==============================================================================
--- dev/jclouds/verify_jclouds_2.1.x-rc.cmd (added)
+++ dev/jclouds/verify_jclouds_2.1.x-rc.cmd Sun Oct 13 13:48:47 2019
@@ -0,0 +1,111 @@
+REM
+REM Licensed to the Apache Software Foundation (ASF) under one or more
+REM contributor license agreements.  See the NOTICE file distributed with
+REM this work for additional information regarding copyright ownership.
+REM The ASF licenses this file to You under the Apache License, Version 2.0
+REM (the "License"); you may not use this file except in compliance with
+REM the License.  You may obtain a copy of the License at
+REM
+REM     http://www.apache.org/licenses/LICENSE-2.0
+REM
+REM Unless required by applicable law or agreed to in writing, software
+REM distributed under the License is distributed on an "AS IS" BASIS,
+REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+REM See the License for the specific language governing permissions and
+REM limitations under the License.
+REM
+
+@echo off
+setlocal
+set TAR_EXEC=C:\Users\aphillips\Downloads\TarTool\TarTool.exe
+set FCIV_EXEC=C:\Users\aphillips\Downloads\fciv.exe
+set GPG_EXEC=C:\Program Files (x86)\GnuPG\gpg.exe
+set SED_EXEC=C:\Users\aphillips\Downloads\sed\sed.exe
+
+if [%1]==[] (
+  echo Usage: verify-jclouds ^<dists-directory^> [release-version]
+  exit /b 1
+)
+
+set DIST_DIR=%1
+if not [%2]==[] (
+  set RELEASE_VERSION=%2
+) else (
+  for /f "delims=- tokens=1" %%i in ("%1") do set RELEASE_VERSION=%%i
+)
+echo Release version: %RELEASE_VERSION%
+
+echo Downloading release dists
+set SVN_DIR=https://dist.apache.org/repos/dist/dev/jclouds/%1
+svn export %SVN_DIR%
+
+if ERRORLEVEL 1 (
+  echo ERROR: Unable to download distributions from "%SVN_DIR%"
+  exit /b 1
+)
+
+cd "%1"
+
+set LOGFILE=checksums.txt
+for %%i in (*.tar.gz) do (
+  echo Verifying "%%i"
+  echo ## %%i >> "%LOGFILE%"
+  echo --- >> "%LOGFILE%"
+  "%GPG_EXEC%" --verify %%i.asc >> "%LOGFILE%" 2>&1
+  echo. >> "%LOGFILE%"
+  echo. >> "%LOGFILE%"
+  echo SHA >> "%LOGFILE%"
+  "%FCIV_EXEC%" -sha512 %%i >> "%LOGFILE%"
+  type %%i.sha512 >> "%LOGFILE%"
+  echo. >> "%LOGFILE%"
+  echo. >> "%LOGFILE%"
+  echo Untarring "%%i"
+  "%TAR_EXEC%" %%i .
+)
+
+set ARCHIVES_LOGFILE=archives.txt
+for /D %%i in (jclouds*) do (
+  echo Seaching in %%i >> "%ARCHIVES_LOGFILE%"
+  for %%j in (.jar,.bin,.zip,.tar.gz) do (
+    echo Seaching for %%j... >> "%ARCHIVES_LOGFILE%"
+    dir /S /B %%i\*%%j >> "%ARCHIVES_LOGFILE%" 2>&1
+  )
+)
+
+echo Preparing clean Maven environment
+ren "%USERPROFILE%"\.m2\repository repository_orig
+ren "%USERPROFILE%"\.m2\settings.xml settings.xml.orig
+dir "%USERPROFILE%"\.m2\
+
+set MAVEN_LOGFILE=maven-log.txt
+cmd /c mvn --version >> "%MAVEN_LOGFILE%"
+echo. >> "%MAVEN_LOGFILE%"
+echo. >> "%MAVEN_LOGFILE%"
+for %%j in (jclouds,jclouds-labs,jclouds-labs-aws,jclouds-labs-google,jclouds-labs-openstack,jclouds-karaf,jclouds-cli) do (
+  if exist "%%j-%RELEASE_VERSION%" (
+    echo Building "%%j"
+    echo ## %%j >> "%MAVEN_LOGFILE%"
+    echo --- >> "%MAVEN_LOGFILE%"
+    cmd /c mvn clean install -Dmaven.javadoc.skip=true -f ".\%%j-%RELEASE_VERSION%\pom.xml" >> "%MAVEN_LOGFILE%" 2>&1
+    if ERRORLEVEL 1 echo WARN: Failure in "%%j"
+    echo. >> "%MAVEN_LOGFILE%"
+    echo. >> "%MAVEN_LOGFILE%"
+  )
+)
+
+echo Checking examples
+set EXAMPLE_LOGFILE=example-log.txt
+cmd /c git clone https://github.com/jclouds/jclouds-examples.git >> %EXAMPLE_LOGFILE% 2>&1
+pushd .\jclouds-examples\blobstore-basics
+"%SED_EXEC%" s/^<groupId^>org\.jclouds/^<groupId^>org\.apache\.jclouds/g pom.xml | "%SED_EXEC%" s/^<jclouds\.version^>.*^<\/jclouds\.version^>/^<jclouds\.version^>%RELEASE_VERSION%^<\/jclouds\.version^>/g  > pom-processed.xml
+popd
+cmd /c mvn clean package -f ./jclouds-examples/blobstore-basics/pom-processed.xml >> %EXAMPLE_LOGFILE% 2>&1
+dir .\jclouds-examples\blobstore-basics\target
+
+echo Restoring Maven environment
+ren "%USERPROFILE%"\.m2\repository repository_jclouds_verification
+ren "%USERPROFILE%"\.m2\repository_orig repository
+ren "%USERPROFILE%"\.m2\settings.xml.orig settings.xml
+dir "%USERPROFILE%"\.m2\
+endlocal
+

Propchange: dev/jclouds/verify_jclouds_2.1.x-rc.cmd
------------------------------------------------------------------------------
    svn:executable = *

Added: dev/jclouds/verify_jclouds_2.1.x-rc.sh
==============================================================================
--- dev/jclouds/verify_jclouds_2.1.x-rc.sh (added)
+++ dev/jclouds/verify_jclouds_2.1.x-rc.sh Sun Oct 13 13:48:47 2019
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+set -ex
+
+RELEASE=$1
+
+curl http://www.apache.org/dist/jclouds/KEYS | gpg --import
+
+svn co https://dist.apache.org/repos/dist/dev/jclouds/$RELEASE
+
+cd $RELEASE
+
+for tarball in `ls *.tar.gz`; do
+    # Verify SHA-512 sum
+    ACTUAL=`shasum -a 512 ${tarball} | awk '{print $1}'`
+    EXPECTED=`cat ${tarball}.sha512`
+    [ "$ACTUAL" == "${EXPECTED}" ]
+    # verify signature
+    gpg --verify ${tarball}.asc ${tarball};
+    # Untar
+    tar -xzf ${tarball};
+done
+
+# When verifying old releases (2.0.x) the jclouds-labs-google repo must be included
+#for d in jclouds jclouds-labs jclouds-labs-openstack jclouds-labs-aws jclouds-labs-google jclouds-karaf jclouds-cli; do
+for d in jclouds jclouds-labs jclouds-labs-openstack jclouds-labs-aws jclouds-karaf jclouds-cli; do
+    reldir=${d}-$(echo $RELEASE | perl -pe 's/(.*)-rc.*/$1/');
+    if [ -d "${reldir}" ]; then
+	cd ${reldir};
+	mvn clean install;
+	cd ..;
+    fi
+done

Propchange: dev/jclouds/verify_jclouds_2.1.x-rc.sh
------------------------------------------------------------------------------
    svn:executable = *