Skip to content

Commit

Permalink
Merge pull request #1714 from iotaledger/develop
Browse files Browse the repository at this point in the history
Merge develop changes into master
  • Loading branch information
luca-moser authored Sep 23, 2021
2 parents e13d044 + 5cf557a commit b5e056b
Show file tree
Hide file tree
Showing 314 changed files with 6,115 additions and 3,604 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ tools/

# Database directory
mainnetdb/

plugins/dashboard/frontend/node_modules/
plugins/analysis/dashboard/frontend/node_modules/
documentation/
images/
7 changes: 3 additions & 4 deletions .github/workflows/docker-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on: workflow_dispatch
jobs:

docker:
environment: pre-devnet
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
Expand All @@ -16,7 +15,7 @@ jobs:
- name: Publish to Docker Hub
uses: docker/build-push-action@92e71463491f2d026a477188b8ad3a0fdd9d672c
with:
repository: iotaledger/goshimmer
username: '${{ secrets.IOTALEDGER_HUB_DOCKER_LOGIN }}'
password: '${{ secrets.IOTALEDGER_HUB_DOCKER_PASSWORD }}'
repository: iotafoundationtesting/goshimmer
username: '${{ secrets.IOTAFOUNDATIONTESTING_HUB_DOCKER_LOGIN }}'
password: '${{ secrets.IOTAFOUNDATIONTESTING_HUB_DOCKER_PASSWORD }}'
tags: testing
16 changes: 8 additions & 8 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v2

- name: Build GoShimmer image
run: docker build -t iotaledger/goshimmer .
run: docker build --build-arg DOWNLOAD_SNAPSHOT=0 -t iotaledger/goshimmer .

- name: Pull additional Docker images
run: |
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
uses: actions/checkout@v2

- name: Build GoShimmer image
run: docker build -t iotaledger/goshimmer .
run: docker build --build-arg DOWNLOAD_SNAPSHOT=0 -t iotaledger/goshimmer .

- name: Pull additional Docker images
run: |
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
uses: actions/checkout@v2

- name: Build GoShimmer image
run: docker build -t iotaledger/goshimmer .
run: docker build --build-arg DOWNLOAD_SNAPSHOT=0 -t iotaledger/goshimmer .

- name: Pull additional Docker images
run: |
Expand Down Expand Up @@ -123,7 +123,7 @@ jobs:
uses: actions/checkout@v2

- name: Build GoShimmer image
run: docker build -t iotaledger/goshimmer .
run: docker build --build-arg DOWNLOAD_SNAPSHOT=0 -t iotaledger/goshimmer .

- name: Pull additional Docker images
run: |
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
uses: actions/checkout@v2

- name: Build GoShimmer image
run: docker build -t iotaledger/goshimmer .
run: docker build --build-arg DOWNLOAD_SNAPSHOT=0 -t iotaledger/goshimmer .

- name: Pull additional Docker images
run: |
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
uses: actions/checkout@v2

- name: Build GoShimmer image
run: docker build -t iotaledger/goshimmer .
run: docker build --build-arg DOWNLOAD_SNAPSHOT=0 -t iotaledger/goshimmer .

- name: Pull additional Docker images
run: |
Expand Down Expand Up @@ -223,7 +223,7 @@ jobs:
uses: actions/checkout@v2

- name: Build GoShimmer image
run: docker build -t iotaledger/goshimmer .
run: docker build --build-arg DOWNLOAD_SNAPSHOT=0 -t iotaledger/goshimmer .

- name: Pull additional Docker images
run: |
Expand Down Expand Up @@ -256,7 +256,7 @@ jobs:
uses: actions/checkout@v2

- name: Build GoShimmer image
run: docker build -t iotaledger/goshimmer .
run: docker build --build-arg DOWNLOAD_SNAPSHOT=0 -t iotaledger/goshimmer .

- name: Run integration tests
run: docker-compose -f tools/integration-tests/tester/docker-compose.yml up --abort-on-container-exit --exit-code-from tester --build
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/pre-devnet-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ jobs:
ELK_ELASTIC_USER: '${{ secrets.ELK_ELASTIC_USER }}'
DRANDS_SECRET: '${{ secrets.DRANDS_SECRET }}'
COMMIT_SHA: '${{ github.sha }}'
GOSHIMMER_DOCKER_TAG: 'develop'
run: |
export NETWORK_VERSION=$((16#$(git rev-parse --short "$COMMIT_SHA")%1000000000+1000))
./deploy/ansible/run.sh
./deploy/ansible/run.sh pre-devnet.yml
77 changes: 69 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
name: Release
'on':
release:
types:
- published
on:
workflow_dispatch:
inputs:
tagName:
description: 'Tag name'
required: true
releaseDescription:
description: 'Release description'
required: true

jobs:
createTag:
environment: devnet
name: Create Git tag
runs-on:
- ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Create Git tag
run: |
git tag ${{ github.event.inputs.tagName }}
git push origin ${{ github.event.inputs.tagName }}
goreleaser:
environment: devnet
needs: createTag
name: GoReleaser
runs-on:
- ubuntu-latest
Expand All @@ -15,33 +36,73 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: "refs/tags/${{github.event.inputs.tagName}}"
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16.3

- name: Copy config.default.json to config.json
run: cp config.default.json config.json

- name: Download latest snapshot file
run: wget -O snapshot.bin https://dbfiles-goshimmer.s3.eu-central-1.amazonaws.com/snapshots/nectar/snapshot-latest.bin

- name: Run GoReleaser
run: goreleaser --rm-dist
run: goreleaser --rm-dist --release-notes <(echo "${{ github.event.inputs.releaseDescription }}")
shell: bash
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

docker:
environment: devnet
name: Docker
needs: createTag
name: Docker build and deploy
runs-on:
- ubuntu-latest
env:
DOCKER_BUILDKIT: 1
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: "refs/tags/${{github.event.inputs.tagName}}"
- name: Publish to Docker Hub
uses: docker/build-push-action@92e71463491f2d026a477188b8ad3a0fdd9d672c
env:
DOCKER_BUILDKIT: 1
with:
repository: iotaledger/goshimmer
username: '${{ secrets.IOTALEDGER_HUB_DOCKER_LOGIN }}'
password: '${{ secrets.IOTALEDGER_HUB_DOCKER_PASSWORD }}'
tags: latest
tag_with_ref: true

- name: Install SSH Key
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
sudo chmod 600 ~/.ssh/id_ed25519
echo '
Host *
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
' > ~/.ssh/config
- name: Ansible deploy
env:
GOSHIMMER_SEEDS: '${{ secrets.GOSHIMMER_SEEDS }}'
MONGODB_USER: '${{ secrets.MONGODB_USER }}'
MONGODB_PASSWORD: '${{ secrets.MONGODB_PASSWORD }}'
GRAFANA_ADMIN_PASSWORD: '${{ secrets.GRAFANA_ADMIN_PASSWORD }}'
ELK_ELASTIC_PASSWORD: '${{ secrets.ELK_ELASTIC_PASSWORD }}'
ELK_ELASTIC_USER: '${{ secrets.ELK_ELASTIC_USER }}'
DRANDS_SECRET: '${{ secrets.DRANDS_SECRET }}'
DRNG_XTEAM_01_SEED: '${{ secrets.DRNG_XTEAM_01_SEED }}'
SNAPSHOTTER_BUCKET: '${{ secrets.SNAPSHOTTER_BUCKET }}'
SNAPSHOTTER_ACCESS_KEY: '${{ secrets.SNAPSHOTTER_ACCESS_KEY }}'
SNAPSHOTTER_SECRET_KEY: '${{ secrets.SNAPSHOTTER_SECRET_KEY }}'
GOSHIMMER_DOCKER_TAG: 'latest'
run: |
./deploy/ansible/run.sh devnet.yml
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ testNodes/*
# Database directory
mainnetdb/
objectsdb/
peerdb/

# OSX related files
.DS_Store
Expand Down
2 changes: 2 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ linters-settings:
checks: argument,case,condition,return
govet:
check-shadowing: true
golint:
min-confidence: 0.5
misspell:
locale: US
nolintlint:
Expand Down
Loading

0 comments on commit b5e056b

Please sign in to comment.