From 698452a2f1239246b93d5455c2eb510f7e11a77a Mon Sep 17 00:00:00 2001 From: Dario Anongba Varela Date: Wed, 13 Mar 2024 13:37:49 +0100 Subject: [PATCH] deployment of testnet --- .github/ISSUE_TEMPLATE/bug_report.md | 33 ++++++++++++++++++++ .github/workflows/ci_cd.yml | 46 ++++++++++++++++++++++++++++ .github/workflows/helm_ci_cd.yml | 28 ----------------- charts/bitcoind/Chart.yaml | 2 +- 4 files changed, 80 insertions(+), 29 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/workflows/ci_cd.yml delete mode 100644 .github/workflows/helm_ci_cd.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..03a0379 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "" +labels: "" +assignees: "" +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: + +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Environment (please complete the following information):** + +- OS: [e.g. Ubuntu/Windows/MacOS] +- Environment type [e.g. AWS/GCP/Minikube] +- k8s version [e.g. v1.21] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml new file mode 100644 index 0000000..87447a6 --- /dev/null +++ b/.github/workflows/ci_cd.yml @@ -0,0 +1,46 @@ +name: CI/CD Pipeline + +on: + pull_request: + branches: + - '*' + push: + branches: + - main + - development + +jobs: + lint-helm: + runs-on: ubuntu-latest + name: Lint Helm Charts + steps: + - uses: actions/checkout@v2 + - name: Set up Helm + uses: azure/setup-helm@v4.1.0 + with: + version: 'latest' + - name: Lint Helm Charts + run: | + helm lint charts/* + + deploy: + runs-on: ubuntu-latest + needs: lint-helm + if: github.event_name == 'push' + steps: + - uses: actions/checkout@v2 + - name: Configure kubeconfig + uses: azure/k8s-set-context@v1 + with: + method: kubeconfig + kubeconfig: ${{ secrets.KUBECONFIG }} + - name: Deploy Mainnet + if: github.ref == 'refs/heads/main' + run: | + helm upgrade --install bitcoind charts/bitcoind/ -f charts/bitcoind/values.yaml --namespace bitcoin-mainnet --create-namespace + # Add more Helm upgrade/install commands as needed for other charts + - name: Deploy Testnet + if: github.ref == 'refs/heads/development' + run: | + helm upgrade --install bitcoind charts/bitcoind/ -f charts/bitcoind/testnet-values.yaml --namespace bitcoin-testnet --create-namespace + # Add more Helm upgrade/install commands as needed for other charts diff --git a/.github/workflows/helm_ci_cd.yml b/.github/workflows/helm_ci_cd.yml deleted file mode 100644 index 7f38223..0000000 --- a/.github/workflows/helm_ci_cd.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Helm CI/CD - -on: - push: - branches: - - main - pull_request: - branches: - - main - -jobs: - lint-and-test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Helm - uses: azure/setup-helm@v1 - with: - version: 'v3.6.3' - - - name: Lint Helm charts - run: | - helm lint charts/* - - # Add additional steps for testing your charts here - # e.g., helm unit tests, integration tests with kind (Kubernetes in Docker) - - # You can add additional jobs for deployment, etc. diff --git a/charts/bitcoind/Chart.yaml b/charts/bitcoind/Chart.yaml index aea0b25..3b4a8a9 100644 --- a/charts/bitcoind/Chart.yaml +++ b/charts/bitcoind/Chart.yaml @@ -17,4 +17,4 @@ version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 0.1.0 +appVersion: 26.0.0