Skip to content
This repository has been archived by the owner on Apr 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #155 from spectrecoin/develop
Browse files Browse the repository at this point in the history
Release build v2.2.2
  • Loading branch information
teknex committed Jan 26, 2019
2 parents 8706c85 + 4be94c7 commit 86e9b92
Show file tree
Hide file tree
Showing 13 changed files with 171 additions and 20 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -105,3 +105,7 @@ cmake-build-debug/

moc_predefs.h
/build-tests-Desktop_Qt*

# Temp build files
releaseNotesToDeploy.txt
Checksum-Spectrecoin-*
5 changes: 4 additions & 1 deletion Docker/CentOS/Dockerfile
Expand Up @@ -30,11 +30,13 @@ ARG GIT_COMMIT=unknown
ARG REPLACE_EXISTING_ARCHIVE=''
#ENV GITHUB_TOKEN=${GITHUB_TOKEN}
ENV ARCHIVE=Spectrecoin-${SPECTRECOIN_RELEASE}-${GIT_COMMIT}-CentOS.tgz
ENV CHKSUM_FILE=Checksum-Spectrecoin-CentOS.txt

RUN mkdir -p /filesToUpload/usr/local/bin

COPY --from=build /spectre/src/spectrecoind /filesToUpload/usr/local/bin/
COPY --from=build /spectre/src/spectre /filesToUpload/usr/local/bin/spectrecoin
COPY --from=build /spectre/scripts/createChecksums.sh /tmp/

RUN cd /filesToUpload \
&& tar czf ${ARCHIVE} . \
Expand All @@ -46,5 +48,6 @@ RUN cd /filesToUpload \
--name "${ARCHIVE}" \
--file "/filesToUpload/${ARCHIVE}" \
${REPLACE_EXISTING_ARCHIVE} \
&& rm -rf /filesToUpload/* \
&& chmod +x /tmp/createChecksums.sh \
&& sh /tmp/createChecksums.sh /filesToUpload/${ARCHIVE} ${CHKSUM_FILE} \
&& export GITHUB_TOKEN=---
5 changes: 4 additions & 1 deletion Docker/Debian/Dockerfile
Expand Up @@ -28,11 +28,13 @@ ARG GIT_COMMIT=unknown
ARG REPLACE_EXISTING_ARCHIVE=''
#ENV GITHUB_TOKEN=${GITHUB_TOKEN}
ENV ARCHIVE=Spectrecoin-${SPECTRECOIN_RELEASE}-${GIT_COMMIT}-Debian.tgz
ENV CHKSUM_FILE=Checksum-Spectrecoin-Debian.txt

RUN mkdir -p /filesToUpload/usr/local/bin

COPY --from=build /spectre/src/spectrecoind /filesToUpload/usr/local/bin/
COPY --from=build /spectre/src/spectre /filesToUpload/usr/local/bin/spectrecoin
COPY --from=build /spectre/scripts/createChecksums.sh /tmp/

RUN cd /filesToUpload \
&& tar czf ${ARCHIVE} . \
Expand All @@ -44,5 +46,6 @@ RUN cd /filesToUpload \
--name "${ARCHIVE}" \
--file "/filesToUpload/${ARCHIVE}" \
${REPLACE_EXISTING_ARCHIVE} \
&& rm -rf /filesToUpload/* \
&& chmod +x /tmp/createChecksums.sh \
&& sh /tmp/createChecksums.sh /filesToUpload/${ARCHIVE} ${CHKSUM_FILE} \
&& export GITHUB_TOKEN=---
5 changes: 4 additions & 1 deletion Docker/Fedora/Dockerfile
Expand Up @@ -30,11 +30,13 @@ ARG GIT_COMMIT=unknown
ARG REPLACE_EXISTING_ARCHIVE=''
#ENV GITHUB_TOKEN=${GITHUB_TOKEN}
ENV ARCHIVE=Spectrecoin-${SPECTRECOIN_RELEASE}-${GIT_COMMIT}-Fedora.tgz
ENV CHKSUM_FILE=Checksum-Spectrecoin-Fedora.txt

RUN mkdir -p /filesToUpload/usr/local/bin

COPY --from=build /spectre/src/spectrecoind /filesToUpload/usr/local/bin/
COPY --from=build /spectre/src/spectre /filesToUpload/usr/local/bin/spectrecoin
COPY --from=build /spectre/scripts/createChecksums.sh /tmp/

RUN cd /filesToUpload \
&& tar czf ${ARCHIVE} . \
Expand All @@ -46,5 +48,6 @@ RUN cd /filesToUpload \
--name "${ARCHIVE}" \
--file "/filesToUpload/${ARCHIVE}" \
${REPLACE_EXISTING_ARCHIVE} \
&& rm -rf /filesToUpload/* \
&& chmod +x /tmp/createChecksums.sh \
&& sh /tmp/createChecksums.sh /filesToUpload/${ARCHIVE} ${CHKSUM_FILE} \
&& export GITHUB_TOKEN=---
5 changes: 4 additions & 1 deletion Docker/RaspberryPi/Dockerfile
Expand Up @@ -28,11 +28,13 @@ ARG GIT_COMMIT=unknown
ARG REPLACE_EXISTING_ARCHIVE=''
#ENV GITHUB_TOKEN=${GITHUB_TOKEN}
ENV ARCHIVE=Spectrecoin-${SPECTRECOIN_RELEASE}-${GIT_COMMIT}-RaspberryPi.tgz
ENV CHKSUM_FILE=Checksum-Spectrecoin-RaspberryPi.txt

RUN mkdir -p /filesToUpload/usr/local/bin

COPY --from=build /spectre/src/spectrecoind /filesToUpload/usr/local/bin/
COPY --from=build /spectre/src/spectre /filesToUpload/usr/local/bin/spectrecoin
COPY --from=build /spectre/scripts/createChecksums.sh /tmp/

RUN cd /filesToUpload \
&& tar czf ${ARCHIVE} . \
Expand All @@ -44,5 +46,6 @@ RUN cd /filesToUpload \
--name "${ARCHIVE}" \
--file "/filesToUpload/${ARCHIVE}" \
${REPLACE_EXISTING_ARCHIVE} \
&& rm -rf /filesToUpload/* \
&& chmod +x /tmp/createChecksums.sh \
&& sh /tmp/createChecksums.sh /filesToUpload/${ARCHIVE} ${CHKSUM_FILE} \
&& export GITHUB_TOKEN=---
5 changes: 4 additions & 1 deletion Docker/Ubuntu/Dockerfile
Expand Up @@ -28,11 +28,13 @@ ARG GIT_COMMIT=unknown
ARG REPLACE_EXISTING_ARCHIVE=''
#ENV GITHUB_TOKEN=${GITHUB_TOKEN}
ENV ARCHIVE=Spectrecoin-${SPECTRECOIN_RELEASE}-${GIT_COMMIT}-Ubuntu.tgz
ENV CHKSUM_FILE=Checksum-Spectrecoin-Ubuntu.txt

RUN mkdir -p /filesToUpload/usr/local/bin

COPY --from=build /spectre/src/spectrecoind /filesToUpload/usr/local/bin/
COPY --from=build /spectre/src/spectre /filesToUpload/usr/local/bin/spectrecoin
COPY --from=build /spectre/scripts/createChecksums.sh /tmp/

RUN cd /filesToUpload \
&& tar czf ${ARCHIVE} . \
Expand All @@ -44,5 +46,6 @@ RUN cd /filesToUpload \
--name "${ARCHIVE}" \
--file "/filesToUpload/${ARCHIVE}" \
${REPLACE_EXISTING_ARCHIVE} \
&& rm -rf /filesToUpload/* \
&& chmod +x /tmp/createChecksums.sh \
&& sh /tmp/createChecksums.sh /filesToUpload/${ARCHIVE} ${CHKSUM_FILE} \
&& export GITHUB_TOKEN=---
80 changes: 70 additions & 10 deletions Jenkinsfile
Expand Up @@ -16,8 +16,8 @@ pipeline {
DISCORD_WEBHOOK = credentials('991ce248-5da9-4068-9aea-8a6c2c388a19')
GITHUB_TOKEN = credentials('cdc81429-53c7-4521-81e9-83a7992bca76')
DEVELOP_TAG = "Build${BUILD_NUMBER}"
RELEASE_TAG = '2.2.1'
BLOCKCHAIN_ARCHIVE_VERSION = "2018-12-21"
RELEASE_TAG = '2.2.2'
BLOCKCHAIN_ARCHIVE_VERSION = "2019-01-20"
GIT_TAG_TO_USE = "${DEVELOP_TAG}"
GIT_COMMIT_SHORT = sh(
script: "printf \$(git rev-parse --short ${GIT_COMMIT})",
Expand Down Expand Up @@ -132,6 +132,7 @@ pipeline {
}
}
}
/*
stage('Mac') {
agent {
label "mac"
Expand Down Expand Up @@ -184,6 +185,7 @@ pipeline {
}
}
}
*/
stage('Windows-Qt5.9.6') {
agent {
label "housekeeping"
Expand Down Expand Up @@ -394,6 +396,8 @@ pipeline {
steps {
script {
buildBranch('Docker/RaspberryPi/Dockerfile', "spectreproject/spectre-raspi:${GIT_TAG_TO_USE}", "${GIT_TAG_TO_USE}", "${GIT_COMMIT_SHORT}")
getChecksumfileFromImage("spectreproject/spectre-raspi:${GIT_TAG_TO_USE}", "Checksum-Spectrecoin-RaspberryPi.txt")
archiveArtifacts allowEmptyArchive: true, artifacts: "Checksum-Spectrecoin-RaspberryPi.txt"
}
}
post {
Expand Down Expand Up @@ -435,6 +439,8 @@ pipeline {
steps {
script {
buildBranch('Docker/Debian/Dockerfile', "spectreproject/spectre-debian:${GIT_TAG_TO_USE}", "${GIT_TAG_TO_USE}", "${GIT_COMMIT_SHORT}")
getChecksumfileFromImage("spectreproject/spectre-debian:${GIT_TAG_TO_USE}", "Checksum-Spectrecoin-Debian.txt")
archiveArtifacts allowEmptyArchive: true, artifacts: "Checksum-Spectrecoin-Debian.txt"
}
}
post {
Expand Down Expand Up @@ -471,6 +477,8 @@ pipeline {
steps {
script {
buildBranch('Docker/CentOS/Dockerfile', "spectreproject/spectre-centos:${GIT_TAG_TO_USE}", "${GIT_TAG_TO_USE}", "${GIT_COMMIT_SHORT}")
getChecksumfileFromImage("spectreproject/spectre-centos:${GIT_TAG_TO_USE}", "Checksum-Spectrecoin-CentOS.txt")
archiveArtifacts allowEmptyArchive: true, artifacts: "Checksum-Spectrecoin-CentOS.txt"
}
}
post {
Expand All @@ -487,6 +495,8 @@ pipeline {
steps {
script {
buildBranch('Docker/Fedora/Dockerfile', "spectreproject/spectre-fedora:${GIT_TAG_TO_USE}", "${GIT_TAG_TO_USE}", "${GIT_COMMIT_SHORT}")
getChecksumfileFromImage("spectreproject/spectre-fedora:${GIT_TAG_TO_USE}", "Checksum-Spectrecoin-Fedora.txt")
archiveArtifacts allowEmptyArchive: true, artifacts: "Checksum-Spectrecoin-Fedora.txt"
}
}
post {
Expand All @@ -504,6 +514,8 @@ pipeline {
steps {
script {
buildBranch('Docker/Ubuntu/Dockerfile', "spectreproject/spectre-ubuntu:${GIT_TAG_TO_USE}", "${GIT_TAG_TO_USE}", "${GIT_COMMIT_SHORT}")
getChecksumfileFromImage("spectreproject/spectre-ubuntu:${GIT_TAG_TO_USE}", "Checksum-Spectrecoin-Ubuntu.txt")
archiveArtifacts allowEmptyArchive: true, artifacts: "Checksum-Spectrecoin-Ubuntu.txt"
}
}
post {
Expand Down Expand Up @@ -532,6 +544,7 @@ pipeline {
}
}
}
/*
stage('Mac') {
agent {
label "mac"
Expand Down Expand Up @@ -605,7 +618,9 @@ pipeline {
tag: "${GIT_TAG_TO_USE}",
artifactNameRemote: "Spectrecoin-${GIT_TAG_TO_USE}-${GIT_COMMIT_SHORT}-OBFS4-Mac.dmg",
)
sh "rm -f Spectrecoin*.dmg*"
createAndArchiveChecksumFile("Spectrecoin-${GIT_TAG_TO_USE}-${GIT_COMMIT_SHORT}-Mac.dmg", "Checksum-Spectrecoin-Mac.txt")
createAndArchiveChecksumFile("Spectrecoin-${GIT_TAG_TO_USE}-${GIT_COMMIT_SHORT}-OBFS4-Mac.dmg", "Checksum-Spectrecoin-OBFS4-Mac.txt")
sh "rm -f Spectrecoin*.dmg* Checksum-Spectrecoin*"
}
}
post {
Expand All @@ -616,6 +631,7 @@ pipeline {
}
}
}
*/
stage('Windows-Qt5.9.6') {
agent {
label "housekeeping"
Expand Down Expand Up @@ -695,7 +711,9 @@ pipeline {
tag: "${GIT_TAG_TO_USE}",
artifactNameRemote: "Spectrecoin-${GIT_TAG_TO_USE}-${GIT_COMMIT_SHORT}-OBFS4-WIN64.zip",
)
sh "rm -f Spectrecoin*-WIN64.zip*"
createAndArchiveChecksumFile("Spectrecoin-${GIT_TAG_TO_USE}-${GIT_COMMIT_SHORT}-WIN64.zip", "Checksum-Spectrecoin-WIN64.txt")
createAndArchiveChecksumFile("Spectrecoin-${GIT_TAG_TO_USE}-${GIT_COMMIT_SHORT}-OBFS4-WIN64.zip", "Checksum-Spectrecoin-OBFS4-WIN64.txt")
sh "rm -f Spectrecoin*-WIN64.zip* Checksum-Spectrecoin*"
}
}
post {
Expand Down Expand Up @@ -785,7 +803,9 @@ pipeline {
tag: "${GIT_TAG_TO_USE}",
artifactNameRemote: "Spectrecoin-${GIT_TAG_TO_USE}-${GIT_COMMIT_SHORT}-Qt5.12-OBFS4-WIN64.zip",
)
sh "rm -f Spectrecoin*-WIN64.zip*"
createAndArchiveChecksumFile("Spectrecoin-${GIT_TAG_TO_USE}-${GIT_COMMIT_SHORT}-Qt5.12-WIN64.zip", "Checksum-Spectrecoin-Qt5.12-WIN64.txt")
createAndArchiveChecksumFile("Spectrecoin-${GIT_TAG_TO_USE}-${GIT_COMMIT_SHORT}-Qt5.12-OBFS4-WIN64.zip", "Checksum-Spectrecoin-Qt5.12-OBFS4-WIN64.txt")
sh "rm -f Spectrecoin*-WIN64.zip* Checksum-Spectrecoin*"
}
}
post {
Expand All @@ -797,6 +817,28 @@ pipeline {
}
}
}
post {
always {
script {
sh(
script:"""
${WORKSPACE}/scripts/createChecksumSummary.sh \
"${RELEASE_DESCRIPTION}" \
"${WORKSPACE}" \
"https://ci.spectreproject.io/job/Spectrecoin/job/spectre/job/${GIT_BRANCH}/${BUILD_NUMBER}"
"""
)
editRelease(
user: 'spectrecoin',
repository: 'spectre',
tag: "${GIT_TAG_TO_USE}",
name: "${RELEASE_NAME}",
description: "${WORKSPACE}/releaseNotesToDeploy.txt",
preRelease: "${PRERELEASE}"
)
}
}
}
}
}
post {
Expand Down Expand Up @@ -898,6 +940,19 @@ def buildBranch(String dockerfile, String dockerTag, String gitTag, String gitCo
}
}

def getChecksumfileFromImage(String dockerTag, String checksumfile) {
withDockerRegistry(credentialsId: '051efa8c-aebd-40f7-9cfd-0053c413266e') {
sh (
script: """
docker run --name tmpContainer -dit ${dockerTag} /bin/sh
docker cp tmpContainer:/filesToUpload/${checksumfile} ${checksumfile}
docker stop tmpContainer
docker rm tmpContainer
"""
)
}
}

def prepareMacDelivery() {
def exists = fileExists 'Tor.zip'
if (exists) {
Expand All @@ -916,7 +971,7 @@ def prepareMacDelivery() {
// Unzip Tor and remove debug content
fileOperations([
folderDeleteOperation(
folderPath: "${WORKSPACE}/src/bin/spectrecoin.app/Contents/MacOS/Tor"),
folderPath: "${WORKSPACE}/src/bin/Spectrecoin.app/Contents/MacOS/Tor"),
fileUnZipOperation(
filePath: "${WORKSPACE}/Tor.zip",
targetLocation: "${WORKSPACE}/"),
Expand All @@ -928,11 +983,11 @@ def prepareMacDelivery() {
def prepareMacOBFS4Delivery() {
fileOperations([
fileRenameOperation(
source: "${WORKSPACE}/src/bin/spectrecoin.app/Contents/MacOS/Tor/torrc-defaults",
destination: "${WORKSPACE}/src/bin/spectrecoin.app/Contents/MacOS/Tor/torrc-defaults_plain"),
source: "${WORKSPACE}/src/bin/Spectrecoin.app/Contents/MacOS/Tor/torrc-defaults",
destination: "${WORKSPACE}/src/bin/Spectrecoin.app/Contents/MacOS/Tor/torrc-defaults_plain"),
fileRenameOperation(
source: "${WORKSPACE}/src/bin/spectrecoin.app/Contents/MacOS/Tor/torrc-defaults_obfs4",
destination: "${WORKSPACE}/src/bin/spectrecoin.app/Contents/MacOS/Tor/torrc-defaults"),
source: "${WORKSPACE}/src/bin/Spectrecoin.app/Contents/MacOS/Tor/torrc-defaults_obfs4",
destination: "${WORKSPACE}/src/bin/Spectrecoin.app/Contents/MacOS/Tor/torrc-defaults"),
])
}

Expand Down Expand Up @@ -1080,3 +1135,8 @@ def createWindowsDelivery(String version) {
destination: "${WORKSPACE}/src/bin")
])
}

def createAndArchiveChecksumFile(String filename, String checksumfile) {
sh "./scripts/createChecksums.sh $filename $checksumfile"
archiveArtifacts allowEmptyArchive: true, artifacts: "$checksumfile"
}
19 changes: 19 additions & 0 deletions ReleaseNotes.md
Expand Up @@ -15,6 +15,10 @@ After 21/08/2018 @ 2200 hours (GMT) one in six (1 in 6) block rewards will be de
We have implemented a check for DCBs and we have implemented a replay protection mechanism. This means that after 21/08/2018 @ 2200 hours (GMT) any wallets not updated will not be able to create transactions on the Spectrecoin V2 network.

### Changelog
## 2.2.2
- New: Added cmdline option `-version` to show wallet version as usual
- Fix: Removed obsolete debug output on stdout

## 2.2.1
- Fix: Lookup for possible stealth addresses in addressbook bloated logfile and decreased performance
- Fix: Bug in fee calculation could prevent spending of SPECTRE
Expand Down Expand Up @@ -80,3 +84,18 @@ Attention: Mnemonic seed words used for sub-wallet creation pre 2.0.7 will not w
- [#50](https://github.com/spectrecoin/spectre/issues/50) Change text 'No combination of coins matches amount and ring size' to 'No combination of (mature) coins matches amount and ring size.'
- [#64](https://github.com/spectrecoin/spectre/issues/64) DCB staking rewards are labeled 'Contributed'
- Change text of donation setting

# Checksums
## Verify MacOS
```
openssl sha -sha256 <archive-name>
```
## Verify Windows
```
certUtil -hashfile "<archive-name>" SHA256
```
## Verify Linux
```
sha256sum <archive-name>
```
## List of sha256 checksums
29 changes: 29 additions & 0 deletions scripts/createChecksumSummary.sh
@@ -0,0 +1,29 @@
#!/bin/bash
# ===========================================================================
#
# Created: 2019-01-22 HLXEasy
#
# Helper script to create checksums for given file (1st parameter)
# and write them into given another file (2nd parameter)
#
# ===========================================================================

releaseDescription=$1
workspace=$2
jobURL=$3

if test -e "${releaseDescription}" ; then
cp "${releaseDescription}" ${workspace}/releaseNotesToDeploy.txt
else
echo "### ${releaseDescription}" > ${workspace}/releaseNotesToDeploy.txt
fi
for currentChecksumfile in Checksum-Spectrecoin-CentOS.txt Checksum-Spectrecoin-Debian.txt Checksum-Spectrecoin-Fedora.txt Checksum-Spectrecoin-Mac.txt Checksum-Spectrecoin-OBFS4-Mac.txt Checksum-Spectrecoin-OBFS4-WIN64.txt Checksum-Spectrecoin-Qt5.12-OBFS4-WIN64.txt Checksum-Spectrecoin-Qt5.12-WIN64.txt Checksum-Spectrecoin-RaspberryPi.txt Checksum-Spectrecoin-Ubuntu.txt Checksum-Spectrecoin-WIN64.txt ; do
# wget https://ci.spectreproject.io/job/Spectrecoin/job/spectre/job/${GIT_BRANCH}/${BUILD_NUMBER}/artifact/${currentChecksumfile} || true
wget ${jobURL}/artifact/${currentChecksumfile} || true
if test -e "${currentChecksumfile}" ; then
archiveFilename=$(cat ${currentChecksumfile} | cut -d ' ' -f1)
checksum=$(cat ${currentChecksumfile} | cut -d ' ' -f2)
echo "**${archiveFilename}:** \`${checksum}\`" >> ${workspace}/releaseNotesToDeploy.txt
echo '' >> ${workspace}/releaseNotesToDeploy.txt
fi
done

0 comments on commit 86e9b92

Please sign in to comment.