Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development -> Main #76

Merged
merged 7 commits into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/actions/build-and-push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ runs:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ inputs.docker-username }}
password: ${{ inputs.docker-password }}

Expand Down
1 change: 1 addition & 0 deletions .github/actions/multiarch-push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ runs:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ inputs.docker-username }}
password: ${{ inputs.docker-password }}

Expand Down
24 changes: 22 additions & 2 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,26 @@ jobs:
name: anon-${{ env.PKG_ENV }}-windows-amd64
path: package/

sign-windows-64-binary:
runs-on: windows-latest
needs: build-windows-64-binary
steps:
- name: Download raw artifacts
uses: actions/download-artifact@v4
with:
name: anon-${{ env.PKG_ENV }}-windows-amd64
path: build/
- name: Sign
run: |
dotnet tool install --global AzureSignTool
AzureSignTool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v "build/anon.exe"
AzureSignTool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v "build/anon-gencert.exe"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: anon-${{ env.PKG_ENV }}-windows-signed-amd64
path: build/

#
# Release
#
Expand Down Expand Up @@ -465,7 +485,7 @@ jobs:

release-github:
runs-on: ubuntu-latest
needs: [build-deb-package, build-macos-binary, build-windows-64-binary]
needs: [build-deb-package, build-macos-binary, sign-windows-64-binary]
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download raw artifacts
Expand All @@ -484,7 +504,7 @@ jobs:
zip -j release-artifacts/anon-${{ env.PKG_ENV }}-linux-arm64.zip raw-artifacts/anon-${{ env.PKG_ENV }}-linux-arm64/*
zip -j release-artifacts/anon-${{ env.PKG_ENV }}-macos-amd64.zip raw-artifacts/anon-${{ env.PKG_ENV }}-macos-amd64/*
zip -j release-artifacts/anon-${{ env.PKG_ENV }}-macos-arm64.zip raw-artifacts/anon-${{ env.PKG_ENV }}-macos-arm64/*
zip -j release-artifacts/anon-${{ env.PKG_ENV }}-windows-amd64.zip raw-artifacts/anon-${{ env.PKG_ENV }}-windows-amd64/*
zip -j release-artifacts/anon-${{ env.PKG_ENV }}-windows-signed-amd64.zip raw-artifacts/anon-${{ env.PKG_ENV }}-windows-signed-amd64/*
ls -la -R release-artifacts/
- name: Checkout Repository
uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
- name: Build and push
uses: ./.github/actions/build-and-push
with:
docker-username: ${{ secrets.DOCKER_USERNAME }}
docker-password: ${{ secrets.DOCKER_PASSWORD }}
docker-base-repo: ${{ secrets.DOCKER_BASE_REPO_DEV }}-${{ matrix.platform.image-suffix }}
docker-username: ${{ secrets.CR_USERNAME }}
docker-password: ${{ secrets.CR_PAT }}
docker-base-repo: ghcr.io/ator-development/ator-protocol-dev-${{ matrix.platform.image-suffix }}
docker-tag: latest-pr
docker-platform: ${{ matrix.platform.name }}
version: ${{ github.sha }}
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/dev-build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Dev Build Image and Deploy

on:
push:
branches:
- development
workflow_dispatch:

env:
image-name: ghcr.io/ator-development/ator-protocol-dev
image-tag: ${{ github.sha }}
da-1-hc-url: http://49.13.145.234:9030/tor/status-vote/current/consensus
da-2-hc-url: http://5.161.108.187:9030/tor/status-vote/current/consensus
da-3-hc-url: http://5.78.90.106:9030/tor/status-vote/current/consensus

jobs:
build-and-push:
runs-on: ${{ matrix.platform.runs-on }}
strategy:
matrix:
platform:
- name: linux/amd64
image-suffix: amd64
runs-on: ubuntu-latest
- name: linux/arm64
image-suffix: arm64
runs-on: arm64
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Build and push
uses: ./.github/actions/build-and-push
with:
docker-username: ${{ secrets.CR_USERNAME }}
docker-password: ${{ secrets.CR_PAT }}
docker-base-repo: ${{ env.image-name }}-${{ matrix.platform.image-suffix }}
docker-tag: ${{ env.image-tag }}
docker-platform: ${{ matrix.platform.name }}
version: ${{ github.sha }}
environment: dev
event-name: ${{ github.event_name }}

multiarch-push:
runs-on: ubuntu-latest
needs: build-and-push
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Multiarch push
uses: ./.github/actions/multiarch-push
with:
docker-username: ${{ secrets.CR_USERNAME }}
docker-password: ${{ secrets.CR_PAT }}
docker-base-repo: ${{ env.image-name }}
docker-tag: ${{ env.image-tag }}
event-name: ${{ github.event_name }}

deploy:
needs: multiarch-push
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Deploy new version
uses: ./.github/actions/deploy
with:
image-tag: ${{ env.image-tag }}
nomad-job-file: anon-da-node-dev.hcl
health-checks: "${{ env.da-1-hc-url }}|${{ env.da-2-hc-url }}|${{ env.da-3-hc-url }}"
nomad-cacert: operations/admin-ui-ca.crt
nomad-token: ${{ secrets.NOMAD_TOKEN_ATOR_NETWORK_DEPLOY }}
nomad-addr: ${{ secrets.NOMAD_DEPLOY_ADDR }}
consul-cacert: operations/admin-ui-ca.crt
consul-http-token: ${{ secrets.CONSUL_HTTP_TOKEN_ATOR_NETWORK_DEPLOY }}
consul-addr: ${{ secrets.CONSUL_DEPLOY_ADDR }}
61 changes: 0 additions & 61 deletions .github/workflows/dev-build-and-push.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/dev-deploy.yml

This file was deleted.

75 changes: 75 additions & 0 deletions .github/workflows/live-build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Live Build Image and Deploy

on:
push:
tags:
- 'v*.*.*.*'
workflow_dispatch:

env:
image-name: ghcr.io/ator-development/ator-protocol
image-tag: ${{ github.ref_name }}
da-1-hc-url: http://49.13.145.234:9230/tor/status-vote/current/consensus
da-2-hc-url: http://5.161.108.187:9230/tor/status-vote/current/consensus
da-3-hc-url: http://5.78.90.106:9230/tor/status-vote/current/consensus

jobs:
build-and-push:
runs-on: ${{ matrix.platform.runs-on }}
strategy:
matrix:
platform:
- name: linux/amd64
image-suffix: amd64
runs-on: ubuntu-latest
- name: linux/arm64
image-suffix: arm64
runs-on: arm64
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Build and push
uses: ./.github/actions/build-and-push
with:
docker-username: ${{ secrets.CR_USERNAME }}
docker-password: ${{ secrets.CR_PAT }}
docker-base-repo: ${{ env.image-name }}-${{ matrix.platform.image-suffix }}
docker-tag: ${{ env.image-tag }}
docker-platform: ${{ matrix.platform.name }}
version: ${{ github.sha }}
environment: live
event-name: ${{ github.event_name }}

multiarch-push:
runs-on: ubuntu-latest
needs: build-and-push
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Multiarch push
uses: ./.github/actions/multiarch-push
with:
docker-username: ${{ secrets.CR_USERNAME }}
docker-password: ${{ secrets.CR_PAT }}
docker-base-repo: ${{ env.image-name }}
docker-tag: ${{ env.image-tag }}
event-name: ${{ github.event_name }}

deploy:
needs: multiarch-push
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Deploy new version
uses: ./.github/actions/deploy
with:
image-tag: ${{ env.image-tag }}
nomad-job-file: anon-da-node-live.hcl
health-checks: "${{ env.da-1-hc-url }}|${{ env.da-2-hc-url }}|${{ env.da-3-hc-url }}"
nomad-cacert: operations/admin-ui-ca.crt
nomad-token: ${{ secrets.NOMAD_TOKEN_ATOR_NETWORK_DEPLOY }}
nomad-addr: ${{ secrets.NOMAD_DEPLOY_ADDR }}
consul-cacert: operations/admin-ui-ca.crt
consul-http-token: ${{ secrets.CONSUL_HTTP_TOKEN_ATOR_NETWORK_DEPLOY }}
consul-addr: ${{ secrets.CONSUL_DEPLOY_ADDR }}
62 changes: 0 additions & 62 deletions .github/workflows/live-build-and-push.yml

This file was deleted.

Loading
Loading