From 40af2a70268d651517c76144c08a6b5c05d65582 Mon Sep 17 00:00:00 2001 From: Sergey Nazarov Date: Fri, 28 Oct 2022 12:53:02 +0400 Subject: [PATCH] Removed unused files (#3780) --- Jenkinsfile | 119 ---------------------------- release-notes.md | 67 ---------------- releaseJenkinsfile | 191 --------------------------------------------- 3 files changed, 377 deletions(-) delete mode 100644 Jenkinsfile delete mode 100644 release-notes.md delete mode 100644 releaseJenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index b1b769b2eef..00000000000 --- a/Jenkinsfile +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env groovy - -@Library('jenkins-shared-lib') -import devops.waves.* -ut = new utils() -def buildTasks = [:] -def repo_url = 'https://github.com/wavesplatform/Waves.git' - -properties([ - parameters([ - listGitBranches( - branchFilter: 'origin/(.*)', - credentialsId: '', - defaultValue: '', - name: 'branch', - listSize: '20', - quickFilterEnabled: false, - remoteURL: repo_url, - selectedValue: 'NONE', - sortMode: 'DESCENDING_SMART', - type: 'PT_BRANCH')]) -]) - -stage('Aborting this build'){ - // On the first launch pipeline doesn't have any parameters configured and must skip all the steps - if (env.BUILD_NUMBER == '1'){ - echo "This is the first run of the pipeline! It is now should be configured and ready to go!" - currentBuild.result = Constants.PIPELINE_ABORTED - return - } - if (! params.branch ) { - echo "Aborting this build. Please run it again with the required parameters specified." - currentBuild.result = Constants.PIPELINE_ABORTED - return - } - else - echo "Parameters are specified. Branch: ${branch}" -} - -if (currentBuild.result == Constants.PIPELINE_ABORTED){ - return -} - -timeout(time:90, unit:'MINUTES') { - node('wavesnode'){ - currentBuild.result = Constants.PIPELINE_SUCCESS - timestamps { - wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) { - try { - withEnv(["SBT_THREAD_NUMBER=7"]) { - - currentBuild.displayName = "#${env.BUILD_NUMBER} - ${branch}" - - stage('Checkout') { - sh 'env' - step([$class: 'WsCleanup']) - checkout([ - $class: 'GitSCM', - branches: [[ name: branch ]], - doGenerateSubmoduleConfigurations: false, - extensions: [], - submoduleCfg: [], - userRemoteConfigs: [[url: repo_url]] - ]) - } - - stage('Unit Test') { - ut.sbt '-mem 10240 checkPR' - } - - stage('Check containers') { - sh 'docker rmi com.wavesplatform/it com.wavesplatform/node-it com.wavesplatform/dex-it || true' - sh 'docker ps -a' - sh 'docker images' - sh 'docker network ls' - sh 'rm -rf it/target || true' - } - - stage('Integration Test') { - try { - ut.sbt '-mem 40960 clean it/test' - } - catch (err) {} - finally{ - dir('it/target/logs') { - sh "tar -czvf logs.tar.gz * || true" - } - dir('node-it/target/logs') { - sh "tar -czvf node.logs.tar.gz * || true" - } - } - } - - stage('Docker cleanup') { - sh "docker system prune -af --volumes" - } - } - } - catch (err) { - currentBuild.result = Constants.PIPELINE_FAILURE - println("ERROR caught") - println(err) - println(err.getMessage()) - println(err.getStackTrace()) - println(err.getCause()) - println(err.getLocalizedMessage()) - println(err.toString()) - } - finally{ - logArchiveLocation = findFiles(glob: '**/*logs.tar.gz') - logArchiveLocation.each { - archiveArtifacts it.path - } - ut.notifySlack("mtuktarov-test", currentBuild.result) - } - } - } - } -} diff --git a/release-notes.md b/release-notes.md deleted file mode 100644 index e8b9c539730..00000000000 --- a/release-notes.md +++ /dev/null @@ -1,67 +0,0 @@ -**0.6.0** - -* The DEX's Order Match transaction has been changed. This is the main reason for restarting Testnet. Now, a second asset of transaction's pair is used to set an amount of the transaction. -* LPOS was implemented. New Leasing and Leasing Cancel transactions were added. -* New, HOCON based, configuration file. Old configuration file (JSON based) is supported in this release for backward compatibility. Automatic configuration file conversion added to DEB packages. - -**0.3.2** - -* By default walletDir and dataDir located in $HOME/waves - -**0.3.1** - -* HTTP API /scorex removed. Use /node instead. - -**0.2.2** - -* Switch network by "testnet" in settings. Default value is true." -* /scorex/* HTTP API deprecated. Use /node/* instead. -* All logs goes to stdout and stderr. Use "loggingLevel" in config. - -**0.2.1** - -* peers.dat format changed. Delete old version. -* Different HTTP status codes in replies in HTTP API were implemented -* Waves' Scorex v1.3.2 - -**0.2.0** - -* Peers blacklist ttl configuration via "p2p"/"blacklistResidenceTimeMilliseconds" -* Upgrade to Waves' Scorex v1.3.1 - -**0.2.0-RC7** - -* New API /waves/payment returns senderPublicKey -* New API /waves/create-signed-payment -* /waves/external-payment deprecated. - Use new /waves/broadcast-signed-payment. -* New API /waves/payment/signature -* minimumTxFee verification for API - -**0.2.0-RC5** - -* /waves/external-payment returns error for incorrect recipient - -**0.2.0-RC4** - -* Fixed issue with incorrect Handshake -* Balance with confirmations is the minimum balance -* /waves/external-payment returns error if account balance invalid -* New API method /consensus/generatingbalance/{address} - -**0.2.0-RC3** - -* Incompatible with 0.1.3 -* Upgrade to Scorex 1.2.8 -* New Address format -* New hash chain for Address - Blake2b256, Keccak32 -* New Testnet Genesis - -**0.1.3** - -* Upgrade to Scorex 1.2.6. -* New http api method /external-payment for lite client - -**0.1.2** - -* Upgrade to Scorex 1.2.4. Clean /scorex/waves/data/ before run. diff --git a/releaseJenkinsfile b/releaseJenkinsfile deleted file mode 100644 index 9c11472aef4..00000000000 --- a/releaseJenkinsfile +++ /dev/null @@ -1,191 +0,0 @@ -#!/usr/bin/env groovy -import groovy.json.JsonOutput -import devops.waves.* -@Library('jenkins-shared-lib') - -ut = new utils() -scripts = new scripts() -def artifactsDir="out" -def networks -def artifacts -def shaSumField = "## SHA256 Checksums\n```\n" -def user = "wavesplatform" -def repo = "Waves" -def repoUrl = "https://github.com/${user}/${repo}" -def dockerImageName = "wavesplatform/wavesnode" -def dockerImage -def wavesVersion -def useNodeSbtCache = false -def dockerRegistryCreds = 'dockerhub-wavesnode-creds' -def dockerRegistryAddress = 'https://index.docker.io/v1/' - -properties([ - - ut.buildDiscarderPropertyObject('14', '30'), - - parameters([ - ut.stringParameterDefinitionObject('tag','v0.0.0'), - ut.gitParameterDefinitionObject('branch', 'origin/(version-.*)', 'ASCENDING_SMART', 'NONE', repoUrl), - ut.extendedChoiceParameterDefinitionObject("network", "mainnet,testnet,stagenet", "mainnet", 0, "" ), - ut.cascadeChoiceParameterObject('dockerTags', "return ['latest:selected', binding.variables.get('tag').replace('v', '')+':selected' ]", 'tag','PARAMETER_TYPE_CHECK_BOX'), - ut.extendedChoiceParameterDefinitionObject('useNodeSbtCache', "yes", "yes", 0, "") - ]) -]) - -stage('Build information'){ - if (! params.tag || params.branch.contains('No values in a list') || ! params.network ) - { - echo "Aborting this build. Please run it again with the required parameters specified" - currentBuild.result = Constants.PIPELINE_ABORTED - return - } - else - { - networks = network.split(',').collect{it.toLowerCase()} - echo "Parameters are specified:" + params - if (params.useNodeSbtCache == "yes"){ - useNodeSbtCache = true - } - } -} - -if (currentBuild.result == Constants.PIPELINE_ABORTED){ - return -} - -node('wavesnode'){ - currentBuild.result = Constants.PIPELINE_SUCCESS - - timestamps { - wrap([$class: 'AnsiColorBuildWrapper', 'colorMapName': 'XTerm']) { - try { - currentBuild.displayName = "#${env.BUILD_NUMBER} - ${branch} - release ${tag}" - - stage('Checkout') { - sh 'env' - step([$class: 'WsCleanup']) - ut.checkout(branch, repoUrl) - sh "mkdir -p ${artifactsDir}/all" - } - - stage ('Build artifacts'){ - dir ('docker'){ - wavesVersion = tag.replace('v','') - def specifiedNetworks = networks.join(" ") - if (useNodeSbtCache){ - def text = readFile "Dockerfile" - sh """ - cp -R ${env.HOME}/.ivy2 ./.ivy2 - cp -R ${env.HOME}/.sbt ./.sbt - mkdir -p ./.ivy2 ./.sbt - """ - replacement="as builder\nCOPY ./.ivy2 /root/.ivy2\nCOPY ./.sbt /root/.sbt" - writeFile file: "Dockerfile", text: text.replace('as builder', replacement).replace('sbt "node/assembly"','true') - } - - def dockerImageBuilder = imageIt( - dockerRegistryAddress: dockerRegistryAddress, - dockerRegistryCreds: dockerRegistryCreds, - imageName: 'wavesbuilder', - dockerTag: wavesVersion, - args: "--build-arg WAVES_VERSION=${wavesVersion} --build-arg 'DEB_PACKAGE_NETWORKS=${specifiedNetworks}' --build-arg BRANCH=${branch} --target builder --no-cache", - skipPush: true - ) - dockerImage = imageIt( - dockerRegistryAddress: dockerRegistryAddress, - dockerRegistryCreds: dockerRegistryCreds, - imageName: dockerImageName, - dockerTag: wavesVersion, - args: "--build-arg WAVES_VERSION=${wavesVersion} --build-arg 'DEB_PACKAGE_NETWORKS=${specifiedNetworks}' --build-arg BRANCH=${branch}", - skipPush: true - ) - sh """ - id=\$(docker create wavesbuilder:${wavesVersion}) - docker cp \${id}:/out "${env.WORKSPACE}" - docker rm -v \${id} - """ - networks.each { - def networkIdentifier = (it == 'mainnet') ? '' : '-' + it - sh """ - mv "${env.WORKSPACE}/${artifactsDir}/${it}"/*.jar "${env.WORKSPACE}/${artifactsDir}/all/" - mv "${env.WORKSPACE}/${artifactsDir}/${it}"/*.tgz "${env.WORKSPACE}/${artifactsDir}/all/" - cp "${env.WORKSPACE}/${artifactsDir}/${it}"/*.deb "${env.WORKSPACE}/${artifactsDir}/all/" - """ - } - } - - dir (artifactsDir + '/all'){ - artifacts = findFiles(glob: '**/*') - artifacts.each{ - shaSumField += ut.shWithOutput("shasum -a 256 ${it.name}") + "\n" - } - } - } - - stage ('Create a release'){ - withCredentials([string(credentialsId: 'waves-release-github-token', variable: 'token')]) { - dir (artifactsDir + '/all'){ - def createReleaseBody = [ - tag_name: "${tag}", - target_commitish: "${branch}", - name: "Version ${tag.replace('v','')} (${networks.collect{ it.capitalize() }.join(" + ")})", - body: "# In this release\n${shaSumField}```", - draft: true, - prerelease: false] - def createReleaseBodyJson = JsonOutput.toJson(createReleaseBody) - def createReleaseUrl = "https://api.github.com/repos/${user}/${repo}/releases" - def id = ut.shWithOutput "curl -s -H 'Authorization:token ${token}' -X 'POST' -H 'Content-Type: application/json' -d '${createReleaseBodyJson}' ${createReleaseUrl} | grep -m 1 'id.:' | tr -cd '[0-9]='" - - artifacts.each{ - def contentType = (it.name.contains('tgz')) ? "application/gzip" : "application/octet-stream" - def uploadAssetsUrl = "https://uploads.github.com/repos/${user}/${repo}/releases/${id}/assets?name=${it.name}" - sh "curl -s -H 'Authorization:token ${token}' -X 'POST' -H 'Content-Type: ${contentType}' --data-binary @${it.name} ${uploadAssetsUrl}" - } - } - } - } - - withCredentials([sshUserPrivateKey(credentialsId: Constants.DEPLOYBOT_CREDS_ID, keyFileVariable: 'identity', passphraseVariable: '', usernameVariable: 'userName')]) { - def remote = [:] - remote.host = Constants.APT_REPO_CONTROLLER_SERVER - remote.name = Constants.APT_REPO_CONTROLLER_SERVER - remote.user = userName - remote.identityFile = identity - remote.allowAnyHosts = true - stage ('Updating APT repo'){ - networks.each { - ut.remotePut(remote, "${artifactsDir}/${it}", Constants.APT_PUBLISH_DIR) - } - ut.remoteExec (remote, "${Constants.APT_PUBLISH_DIR}/publish.sh") - } - } - - stage ('Pushing docker image'){ - docker.withRegistry(dockerRegistryAddress, dockerRegistryCreds) { - if (dockerTags.contains(wavesVersion)){ - dockerImage.push() - } - if (dockerTags.contains('latest')){ - dockerImage.push("latest") - } - } - } - } - catch (err) { - currentBuild.result = Constants.PIPELINE_FAILURE - println("ERROR caught") - println(err) - println(err.getMessage()) - println(err.getStackTrace()) - println(err.getCause()) - println(err.getLocalizedMessage()) - println(err.toString()) - } - finally{ - sh "tar -czvf artifacts.tar.gz -C ${artifactsDir} ." - archiveArtifacts artifacts: 'artifacts.tar.gz' - slackIt(buildStatus:currentBuild.result) - } - } - } -}