Skip to content

Commit

Permalink
Merge branch 'master' into split-migration-guides
Browse files Browse the repository at this point in the history
  • Loading branch information
LGLO authored Jan 10, 2025
2 parents 0c983cd + c25a88b commit bec1bfa
Show file tree
Hide file tree
Showing 71 changed files with 3,066 additions and 1,386 deletions.
7 changes: 6 additions & 1 deletion .github/actions/deploy/argocd/deploy-argocd/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@ runs:

- name: Install kubectl and awscli
run: |
# Install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
sudo apt update && sudo apt install -y awscli
# Install or update AWS CLI v2
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -o awscliv2.zip
sudo ./aws/install --update
shell: bash

- name: Configure kubectl
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/deploy/argocd/teardown-argocd/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ runs:

- name: Install kubectl and awscli
run: |
# Install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
sudo apt update && sudo apt install -y awscli
# Install or update AWS CLI v2
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -o awscliv2.zip
sudo ./aws/install --update
shell: bash

- name: Configure kubectl
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/deploy/upload-chain-specs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ runs:
steps:
- name: Install kubectl and awscli
run: |
# Install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
sudo apt update && sudo apt install -y awscli
# Install or update AWS CLI v2
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -o awscliv2.zip
sudo ./aws/install --update
shell: bash

- name: Configure kubectl
Expand Down
34 changes: 19 additions & 15 deletions .github/actions/images/build-and-publish-ecr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,31 @@ runs:
- name: Write Dockerfile
run: |
cat > Dockerfile <<EOF
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \\
ca-certificates \\
libgcc-s1 \\
libstdc++6 \\
libc6 \\
libssl3 \\
zlib1g \\
libgomp1 \\
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y \
ca-certificates \
libgcc-s1 \
libstdc++6 \
libc6 \
libssl3 \
zlib1g \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate \\
&& mkdir -p /data /substrate/.local/share/partner-chains-node \\
&& chown -R substrate:substrate /data /substrate \\
RUN useradd -m -u 1000 -U -s /bin/sh -d /substrate substrate \
&& mkdir -p /data /substrate/.local/share/partner-chains-node \
&& chown -R substrate:substrate /data /substrate \
&& ln -s /data /substrate/.local/share/partner-chains-node
COPY ./partner-chains-node-${{ inputs.tag }}-x86_64-linux /usr/local/bin/partner-chains-node
RUN chown substrate:substrate /usr/local/bin/partner-chains-node \\
&& chmod +x /usr/local/bin/partner-chains-node
RUN chown substrate:substrate /usr/local/bin/partner-chains-node && chmod +x /usr/local/bin/partner-chains-node
USER substrate
EXPOSE 30333 9615 9933 9944
VOLUME ["/data"]
ENTRYPOINT ["/usr/local/bin/partner-chains-node"]
EOF
shell: bash

Expand All @@ -65,4 +69,4 @@ runs:
run: |
docker tag substrate-node:${{ inputs.sha }} ${{ env.ECR_REGISTRY_SECRET }}/substrate-node:${{ inputs.sha }}
docker push ${{ env.ECR_REGISTRY_SECRET }}/substrate-node:${{ inputs.sha }}
shell: bash
shell: bash
7 changes: 6 additions & 1 deletion .github/actions/tests/argocd-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ runs:
steps:
- name: Install kubectl and awscli
run: |
# Install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
sudo apt update && sudo apt install -y awscli
# Install or update AWS CLI v2
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -o awscliv2.zip
sudo ./aws/install --update
shell: bash

- name: Configure kubectl
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/tests/configure-kubectl/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ runs:
steps:
- name: Install kubectl and awscli
run: |
# Install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
sudo apt update && sudo apt install -y awscli
# Install or update AWS CLI v2
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -o awscliv2.zip
sudo ./aws/install --update
shell: bash
- name: Configure kubectl
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/actions/tests/staging-preprod-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@ runs:
steps:
- name: Install kubectl and awscli
run: |
# Install kubectl
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
sudo apt update && sudo apt install -y awscli
# Install or update AWS CLI v2
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -o awscliv2.zip
sudo ./aws/install --update
shell: bash
- name: Configure kubectl
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Deploy and test against local environment
uses: ./.github/actions/tests/local-environment-tests
with:
tag: CI
tag: CI
image: ${{ secrets.ECR_REGISTRY_SECRET }}/substrate-node:${{ needs.build.outputs.sha }}
sha: ${{ needs.build.outputs.sha }}
tests: premerge
Expand All @@ -95,7 +95,7 @@ jobs:
ACTIONS_PAT: ${{ secrets.ACTIONS_PAT }}
ECR_REGISTRY_SECRET: ${{ secrets.ECR_REGISTRY_SECRET }}
TEST_ENVIRONMENT: local

local-environment-tests-alert:
needs: local-environment-tests
if: always() && needs.local-environment-tests.result != 'skipped'
Expand Down Expand Up @@ -226,14 +226,13 @@ jobs:
pre-merge-checks-complete:
if: ${{ always() && (github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged == false)) }}
needs: [build, local-environment-tests, argocd-tests, devshell-tests]
needs: [build, local-environment-tests, devshell-tests]
runs-on: ubuntu-latest
steps:
- name: Check if any needed job failed
run: |
if [[ "${{ needs.build.result }}" != "success" ||
"${{ needs.local-environment-tests.result }}" != "success" ||
"${{ needs.argocd-tests.result }}" != "success" ||
if [[ "${{ needs.build.result }}" != "success" ||
"${{ needs.local-environment-tests.result }}" != "success" ||
"${{ needs.devshell-tests.result }}" != "success" ]]; then
echo "One or more needed jobs failed."
exit 1
Expand Down Expand Up @@ -291,7 +290,7 @@ jobs:
- name: Deploy and test against local environment
uses: ./.github/actions/tests/local-environment-tests
with:
tag: CI
tag: CI
image: ${{ secrets.ECR_REGISTRY_SECRET }}/substrate-node:${{ needs.build.outputs.sha }}
sha: ${{ needs.build.outputs.sha }}
tests: postmerge
Expand Down Expand Up @@ -340,8 +339,8 @@ jobs:
steps:
- name: Check if any needed job failed
run: |
if [[ "${{ needs.deploy-rustdoc.result }}" != "success" ||
"${{ needs.upload-chain-specs.result }}" != "success" ||
if [[ "${{ needs.deploy-rustdoc.result }}" != "success" ||
"${{ needs.upload-chain-specs.result }}" != "success" ||
"${{ needs.local-environment-tests-post-merge.result }}" != "success" ]]; then
echo "One or more needed jobs failed."
exit 1
Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit bec1bfa

Please sign in to comment.