Commit 2104e858 authored by Sergei Zubov's avatar Sergei Zubov

Merge branch 'dev'

parents ddbf898b 1b5310fa
stages:
- build_dev
- build_test
- build_prod
- deploy_to_test
- run_tests
- deploy_to_prod
build_dev:
stage: build_dev
image: docker:stable
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
script:
- docker login -u "gitlab-ci-token" -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
- docker build -t ${CI_REGISTRY_IMAGE}/dev:${CI_PIPELINE_ID} .
- docker push ${CI_REGISTRY_IMAGE}/dev:${CI_PIPELINE_ID}
environment:
name: ${CI_COMMIT_REF_NAME}
url: https://xvideos.com
only:
- dev
tags:
- buidl1-dind
build_test:
stage: build_test
image: docker:stable
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
script:
- docker login -u "gitlab-ci-token" -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
- docker build -t ${CI_REGISTRY_IMAGE}/test:${CI_PIPELINE_ID} .
- docker push ${CI_REGISTRY_IMAGE}/test:${CI_PIPELINE_ID}
environment:
name: ${CI_COMMIT_REF_NAME}
url: https://xvideos.com
only:
- test
tags:
- buidl1-dind
build_prod:
stage: build_prod
image: docker:stable
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
script:
- docker login -u "gitlab-ci-token" -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
- docker build -t ${CI_REGISTRY_IMAGE}/prod:${CI_PIPELINE_ID} .
- docker push ${CI_REGISTRY_IMAGE}/prod:${CI_PIPELINE_ID}
environment:
name: ${CI_COMMIT_REF_NAME}
url: https://xvideos.com
only:
- release
tags:
- buidl1-dind
deploy_to_test:
stage: deploy_to_test
image: docker:stable
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
script:
- sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}/test"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' app.tpl.yml > app.yml; cat app.yml
- wget https://storage.googleapis.com/kubernetes-release/release/v1.13.3/bin/linux/amd64/kubectl && chmod +x ./kubectl
- wget https://github.com/garethr/kubeval/releases/download/0.7.3/kubeval-linux-amd64.tar.gz && tar xvf kubeval-linux-amd64.tar.gz && ./kubeval app.yml
- ./kubectl apply -f app.yml
# allow_failure: true
environment:
name: ${CI_COMMIT_REF_NAME}
url: https://xvideos.com
only:
- test
tags:
- buidl1-dind
run_test:
stage: run_tests
image: docker:stable
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
script:
- docker build -f Dockerfile-tests .
allow_failure: true
environment:
name: ${CI_COMMIT_REF_NAME}
url: https://xvideos.com
only:
- test
tags:
- buidl1-dind
deploy_to_prod:
stage: deploy_to_prod
image: docker:stable
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
script:
- sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}/prod"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' node1.tpl.yml > node1.yml; cat node1.yml
- sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}/prod"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' node2.tpl.yml > node2.yml; cat node2.yml
- sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}/prod"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' node3.tpl.yml > node3.yml; cat node3.yml
- sed 's|_IMAGE_NAME_|'"${CI_REGISTRY_IMAGE}/prod"'|g; s|_VERSION_|'"${CI_PIPELINE_ID}"'|g' seed1.tpl.yml > seed1.yml; cat seed1.yml
- wget https://storage.googleapis.com/kubernetes-release/release/v1.13.3/bin/linux/amd64/kubectl && chmod +x ./kubectl
- wget https://github.com/garethr/kubeval/releases/download/0.7.3/kubeval-linux-amd64.tar.gz && tar xvf kubeval-linux-amd64.tar.gz
- ./kubeval node1.yml && ./kubeval node2.yml && ./kubeval node3.yml && ./kubeval seed1.yml
- ./kubectl apply -f node1.yml
- ./kubectl apply -f node2.yml
- ./kubectl apply -f node3.yml
- ./kubectl apply -f seed1.yml
environment:
name: ${CI_COMMIT_REF_NAME}
url: https://xvideos.com
only:
- release
tags:
- buidl1-dind
\ No newline at end of file
FROM microsoft/dotnet:2.1-sdk-alpine AS builder
WORKDIR /app
COPY ./Sources ./
RUN dotnet build
RUN cd DeStream.DeStreamD \
&& dotnet publish -c Release --framework netcoreapp2.1 --runtime alpine-x64 -o out
FROM microsoft/dotnet:2.1-runtime-alpine
WORKDIR /app
COPY --from=builder /app/DeStream.DeStreamD/out .
ENTRYPOINT ["dotnet", "DeStream.DeStreamD.dll"]
\ No newline at end of file
...@@ -122,10 +122,10 @@ namespace Stratis.Bitcoin.Features.Wallet.Controllers ...@@ -122,10 +122,10 @@ namespace Stratis.Bitcoin.Features.Wallet.Controllers
Amount = recipientModel.Amount Amount = recipientModel.Amount
}); });
var context = new TransactionBuildContext(this._network) var context = new DeStreamTransactionBuildContext(new DeStreamTransactionBuilder(this._network))
{ {
AccountReference = new WalletAccountReference(request.WalletName, request.AccountName), AccountReference = new WalletAccountReference(request.WalletName, request.AccountName),
FeeType = FeeParser.Parse(request.FeeType), FeeType = 0,
MinConfirmations = request.AllowUnconfirmed ? 0 : 1, MinConfirmations = request.AllowUnconfirmed ? 0 : 1,
Recipients = recipients Recipients = recipients
}; };
......
...@@ -75,7 +75,17 @@ namespace Stratis.Bitcoin.Controllers.Models ...@@ -75,7 +75,17 @@ namespace Stratis.Bitcoin.Controllers.Models
this.Version = trx.Version; this.Version = trx.Version;
this.LockTime = trx.LockTime; this.LockTime = trx.LockTime;
this.VIn = trx.Inputs.Select(txin => new Vin(txin.PrevOut, txin.Sequence, txin.ScriptSig)).ToList(); this.VIn = trx.IsCoinBase
? trx.Inputs.Select(txin => new Vin(txin.PrevOut, txin.Sequence, txin.ScriptSig)).ToList()
: trx.Inputs.Select(txin => txin.IsChangePointer()
? new Vin
{
ScriptSig = new Script(txin.ScriptSig),
TxId = txin.PrevOut.Hash.ToString(),
VOut = txin.PrevOut.N,
Sequence = (uint) txin.Sequence
}
: new Vin(txin.PrevOut, txin.Sequence, txin.ScriptSig)).ToList();
int n = 0; int n = 0;
this.VOut = trx.Outputs.Select(txout => new Vout(n++, txout, network)).ToList(); this.VOut = trx.Outputs.Select(txout => new Vout(n++, txout, network)).ToList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment