Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
jianghang8421 committed Nov 7, 2024
1 parent 9ab1ef7 commit db4c0ff
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 74 deletions.
146 changes: 73 additions & 73 deletions .github/workflows/push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ env:
REGISTRY: "docker.io"
GH_CLI_VERSION: 2.57.0
jobs:
unit-tests:
uses: ./.github/workflows/unit-test.yml
# unit-tests:
# uses: ./.github/workflows/unit-test.yml
build-publish-chart:
runs-on: test-runner-1
container: registry.suse.com/bci/bci-base:latest
Expand Down Expand Up @@ -253,76 +253,76 @@ jobs:
retention-days: 4
overwrite: false
build-server-arm64:
# runs-on: test-runner-dind
runs-on: [self-hosted, Linux, ARM64]
# runs-on: runs-on,runner=4cpu-${{ matrix.os }}-${{ matrix.arch }},image=ubuntu22-full-${{ matrix.arch }},run-id=${{ github.run_id }}
strategy:
matrix:
os: [linux]
arch: [arm64]
env:
ARCH: ${{ matrix.arch }}
steps:
- name: Arch environment variable
shell: bash
run: |
if [[ "$ARCH" == "x64" ]]; then
echo "ARCH=amd64" >> $GITHUB_ENV
fi
- name: Checkout code
uses: actions/checkout@v4
- name: install yq
shell: bash
run: sudo snap install yq
- name: Setup Environment Variables
uses: ./.github/actions/setup-tag-env
- id: env
name: Setup Dependencies Env Variables
uses: ./.github/actions/setup-build-env
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
flavor: |
latest=false
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Create k3s images file
uses: ./.github/actions/k3s-images
with:
k3s_version: ${{ steps.env.outputs.CATTLE_K3S_VERSION }}
- name: Download data.json
run: curl -sLf https://releases.rancher.com/kontainer-driver-metadata/${{ steps.env.outputs.CATTLE_KDM_BRANCH }}/data.json > ./data.json
- name: Build and export server
id: build
uses: docker/build-push-action@v5
with:
push: false
build-args: |
"VERSION=${{ env.TAG }}"
"COMMIT=${{ env.COMMIT }}"
"RKE_VERSION=${{ steps.env.outputs.RKE_VERSION }}"
"ARCH=${{ env.ARCH }}"
"CATTLE_RANCHER_WEBHOOK_VERSION=${{ steps.env.outputs.CATTLE_RANCHER_WEBHOOK_VERSION }}"
"CATTLE_CSP_ADAPTER_MIN_VERSION=${{ steps.env.outputs.CATTLE_CSP_ADAPTER_MIN_VERSION }}"
"CATTLE_FLEET_VERSION=${{ steps.env.outputs.CATTLE_FLEET_VERSION }}"
tags: ${{ env.IMAGE }}:${{ env.TAG }}-${{ env.ARCH }}
context: .
platforms: "${{ matrix.os }}/${{ env.ARCH }}"
file: ./package/Dockerfile
labels: "${{ steps.meta.outputs.labels }}"
outputs: type=docker,dest=/tmp/rancher-${{ matrix.os }}-${{ env.ARCH }}.tar
- name: Upload image
uses: actions/upload-artifact@v4
with:
name: "rancher-${{ matrix.os }}-${{ env.ARCH }}"
path: /tmp/rancher-${{ matrix.os }}-${{ env.ARCH }}.tar
if-no-files-found: error
retention-days: 4
overwrite: false
# runs-on: test-runner-dind
runs-on: [self-hosted, Linux, ARM64]
# runs-on: runs-on,runner=4cpu-${{ matrix.os }}-${{ matrix.arch }},image=ubuntu22-full-${{ matrix.arch }},run-id=${{ github.run_id }}
strategy:
matrix:
os: [linux]
arch: [arm64]
env:
ARCH: ${{ matrix.arch }}
steps:
- name: Arch environment variable
shell: bash
run: |
if [[ "$ARCH" == "x64" ]]; then
echo "ARCH=amd64" >> $GITHUB_ENV
fi
- name: Checkout code
uses: actions/checkout@v4
- name: install yq
shell: bash
run: sudo snap install yq
- name: Setup Environment Variables
uses: ./.github/actions/setup-tag-env
- id: env
name: Setup Dependencies Env Variables
uses: ./.github/actions/setup-build-env
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
flavor: |
latest=false
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Create k3s images file
uses: ./.github/actions/k3s-images
with:
k3s_version: ${{ steps.env.outputs.CATTLE_K3S_VERSION }}
- name: Download data.json
run: curl -sLf https://releases.rancher.com/kontainer-driver-metadata/${{ steps.env.outputs.CATTLE_KDM_BRANCH }}/data.json > ./data.json
- name: Build and export server
id: build
uses: docker/build-push-action@v5
with:
push: false
build-args: |
"VERSION=${{ env.TAG }}"
"COMMIT=${{ env.COMMIT }}"
"RKE_VERSION=${{ steps.env.outputs.RKE_VERSION }}"
"ARCH=${{ env.ARCH }}"
"CATTLE_RANCHER_WEBHOOK_VERSION=${{ steps.env.outputs.CATTLE_RANCHER_WEBHOOK_VERSION }}"
"CATTLE_CSP_ADAPTER_MIN_VERSION=${{ steps.env.outputs.CATTLE_CSP_ADAPTER_MIN_VERSION }}"
"CATTLE_FLEET_VERSION=${{ steps.env.outputs.CATTLE_FLEET_VERSION }}"
tags: ${{ env.IMAGE }}:${{ env.TAG }}-${{ env.ARCH }}
context: .
platforms: "${{ matrix.os }}/${{ env.ARCH }}"
file: ./package/Dockerfile
labels: "${{ steps.meta.outputs.labels }}"
outputs: type=docker,dest=/tmp/rancher-${{ matrix.os }}-${{ env.ARCH }}.tar
- name: Upload image
uses: actions/upload-artifact@v4
with:
name: "rancher-${{ matrix.os }}-${{ env.ARCH }}"
path: /tmp/rancher-${{ matrix.os }}-${{ env.ARCH }}.tar
if-no-files-found: error
retention-days: 4
overwrite: false
build-agent-arm64:
needs: [build-server-arm64]
strategy:
Expand Down Expand Up @@ -447,7 +447,7 @@ jobs:
# docker push ${{ env.REGISTRY }}/${{ env.IMAGE_AGENT }}:${{ env.TAG }}-windows-${{ matrix.version }}
# shell: bash
push-images:
needs: [unit-tests, build-agent-amd64, build-agent-arm64]
needs: [build-agent-amd64, build-agent-arm64]
strategy:
matrix:
os: [linux]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
unit-test:
env:
GOLANG_VERSION: '1.22'
runs-on: test-runner-default
runs-on: test-runner-dind
timeout-minutes: 60
steps:
# - name: Install tools
Expand Down

0 comments on commit db4c0ff

Please sign in to comment.