From 323357a63d577fffc100b4a109d6763c06fbd0e2 Mon Sep 17 00:00:00 2001 From: "wuyunfan.wyf" Date: Fri, 20 Oct 2023 11:17:52 +0800 Subject: [PATCH] fix: modify tar name --- .github/workflows/pr-ci.yml | 2 +- .github/workflows/push-ci-use-test-tools.yaml | 244 ------------------ .github/workflows/push-ci.yaml | 2 +- 3 files changed, 2 insertions(+), 246 deletions(-) delete mode 100644 .github/workflows/push-ci-use-test-tools.yaml diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml index 9098abbcba6..434927e3ad9 100644 --- a/.github/workflows/pr-ci.yml +++ b/.github/workflows/pr-ci.yml @@ -25,7 +25,7 @@ jobs: name: Upload distribution tar with: name: nacos - path: distribution/target/nacos-server-*-SNAPSHOT.tar.gz + path: distribution/target/nacos-server-*.tar.gz - name: Save PR number run: | mkdir -p ./pr diff --git a/.github/workflows/push-ci-use-test-tools.yaml b/.github/workflows/push-ci-use-test-tools.yaml deleted file mode 100644 index 84971d92ad0..00000000000 --- a/.github/workflows/push-ci-use-test-tools.yaml +++ /dev/null @@ -1,244 +0,0 @@ -name: PUSH-CI-USE-TOOLS - -on: - push: - branches: [master, develop, v1.x-develop, v1.X] - -permissions: - contents: read # to fetch code (actions/checkout) - -concurrency: - group: nacos-${{ github.ref }} - -env: - DOCKER_REPO: wuyfeedocker/nacos-ci - ACTIONS_ALLOW_UNSECURE_COMMANDS: true - TEST_REPO_NAME: nacos-group/nacos-e2e - - -jobs: - dist-tar: - name: Build dist tar - runs-on: ubuntu-latest - timeout-minutes: 30 - steps: - - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- - - uses: actions/checkout@v3 - with: - submodules: true - - uses: actions/setup-java@v3 - with: - distribution: "temurin" - java-version: "8" - cache: "maven" - - name: Build distribution tar - run: | - mvn -Prelease-nacos -DskipTests clean install -U -e -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn - - uses: actions/upload-artifact@v3 - name: Upload distribution tar - with: - name: nacos - path: distribution/target/nacos-server-*-SNAPSHOT.tar.gz - - docker: - if: ${{ success() }} - name: Docker images - needs: [dist-tar] - runs-on: ubuntu-latest - timeout-minutes: 30 - strategy: - matrix: - base-image: ["centos"] - java-version: ["8"] - steps: - - uses: actions/checkout@v3 - with: - repository: nacos-group/nacos-e2e.git - ref: main - path: nacos-e2e - - uses: actions/download-artifact@v3 - name: Download distribution tar - with: - name: nacos - path: ./ - - name: docker-login - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ secrets.DOCKERHUB_USER }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and save docker images - id: build-images - run: | - mv nacos-server-*-SNAPSHOT.tar.gz nacos-e2e/cicd/build/ - cd nacos-e2e/cicd/build - version=${{ github.event.pull_request.number || github.ref_name }}-$(uuidgen) - mkdir versionlist - touch versionlist/"${version}-`echo ${{ matrix.java-version }} | sed -e "s/:/-/g"`" - ls versionlist/ - tag=${version}-$(echo ${{ matrix.java-version }} | sed -e "s/:/-/g") - echo $tag - docker build --no-cache -f Dockerfile -t ${DOCKER_REPO}:${tag} . - docker push ${DOCKER_REPO}:${tag} - - uses: actions/upload-artifact@v3 - name: Upload distribution tar - with: - name: versionlist - path: nacos-e2e/cicd/build/versionlist/* - - - list-version: - if: always() - name: List version - needs: [docker] - runs-on: ubuntu-latest - timeout-minutes: 30 - outputs: - version-json: ${{ steps.show_versions.outputs.version-json }} - steps: - - uses: actions/download-artifact@v3 - name: Download versionlist - with: - name: versionlist - path: versionlist - - name: Show versions - id: show_versions - run: | - a=(`ls versionlist`) - printf '%s\n' "${a[@]}" | jq -R . | jq -s . - echo version-json=`printf '%s\n' "${a[@]}" | jq -R . | jq -s .` >> $GITHUB_OUTPUT - - deploy: - if: ${{ success() }} - name: Deploy nacos - needs: [list-version,docker] - runs-on: ubuntu-latest - timeout-minutes: 60 - env: - REPLICA_COUNT: 3 - DATABASE: mysql - NODE_PORT: 30000 - strategy: - matrix: - mode: ["cluster","standalone"] - version: ${{ fromJSON(needs.list-version.outputs.version-json) }} - steps: - - name: set nodeport - run: | - echo "::set-env name=NODE_PORT::$(expr $(expr $(expr $(expr 1 * $(expr ${{ github.run_number }} - 1)) + ${{ strategy.job-index }}) % 30000) + 30000)" - - name: set cluster params - if: ${{ matrix.mode == 'standalone' }} - run: | - echo "::set-env name=REPLICA_COUNT::1" - echo "::set-env name=DATABASE::embedded" - - uses: Wuyunfan-BUPT/test-tools@add_display_tools - name: Deploy nacos - with: - yamlString: | - action: deploy - namespace: nacos-${{ github.run_id }}-${{ strategy.job-index }} - askConfig: ${{ secrets.ASK_CONFIG_VIRGINA }} - waitTimes: 1200 - velaAppDescription: nacos-${{ env.GITHUB_WORKFLOW }}-${{ github.run_id }}@${{ matrix.version }} - repoName: nacos - velauxUsername: ${{ secrets.VELA_USERNAME }} - velauxPassword: ${{ secrets.VELA_PASSWORD }} - helm: - chart: ./cicd/helm - git: - branch: main - repoType: git - retries: 3 - url: https://ghproxy.com/https://github.com/nacos-group/nacos-e2e.git - values: - namespace: nacos-${{ github.run_id }}-${{ strategy.job-index }} - global: - mode: ${{ matrix.mode }} - nacos: - replicaCount: ${{ env.REPLICA_COUNT }} - image: - repository: ${{ env.DOCKER_REPO }} - tag: ${{ matrix.version }} - storage: - type: ${{ env.DATABASE }} - db: - port: 3306 - username: nacos - password: nacos - param: characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useSSL=false - service: - nodePort: ${{ env.NODE_PORT }} - type: ClusterIP - e2e-test: - if: ${{ success() }} - name: E2E Test - needs: [list-version, deploy] - runs-on: ubuntu-latest - timeout-minutes: 60 - strategy: - matrix: - mode: ["cluster","standalone"] - version: ${{ fromJSON(needs.list-version.outputs.version-json) }} - steps: - - uses: Wuyunfan-BUPT/test-tools@add_display_tools - name: e2e test - with: - yamlString: | - action: test - namespace: nacos-${{ github.run_id }}-0 - askConfig: ${{ secrets.ASK_CONFIG_VIRGINA }} - API_VERSION: v1 - KIND: Pod - RESTART_POLICY: Never - ENV: - REPO_NAME: ${{ env.TEST_REPO_NAME }} - CODE: https://ghproxy.com/https://github.com/${{ env.TEST_REPO_NAME }} - BRANCH: main - CODE_PATH: java/nacos-2X - CMD: mvn clean test -B - ALL_IP: null - CONTAINER: - IMAGE: cloudnativeofalibabacloud/test-runner:v0.0.4 - RESOURCE_LIMITS: - cpu: 8 - memory: 8Gi - RESOURCE_REQUIRE: - cpu: 8 - memory: 8Gi - - - uses: actions/upload-artifact@v3 - if: always() - name: Upload test log - with: - name: test-e2e-grpc-java-log.txt - path: testlog.txt - - name: add markdown - if: always() - run: | - cat result.md >> $GITHUB_STEP_SUMMARY - - clean: - if: always() - name: Clean - needs: [list-version, e2e-test] - runs-on: ubuntu-latest - timeout-minutes: 60 - strategy: - matrix: - mode: ["cluster","standalone"] - version: ${{ fromJSON(needs.list-version.outputs.version-json) }} - steps: - - uses: Wuyunfan-BUPT/test-tools@add_display_tools - name: clean - with: - yamlString: | - action: clean - namespace: nacos-${{ github.run_id }}-${{ strategy.job-index }} - askConfig: ${{ secrets.ASK_CONFIG_VIRGINA }} - velauxUsername: ${{ secrets.VELA_USERNAME }} - velauxPassword: ${{ secrets.VELA_PASSWORD }} diff --git a/.github/workflows/push-ci.yaml b/.github/workflows/push-ci.yaml index cc565218588..a978df8cbcf 100644 --- a/.github/workflows/push-ci.yaml +++ b/.github/workflows/push-ci.yaml @@ -42,7 +42,7 @@ jobs: name: Upload distribution tar with: name: nacos - path: distribution/target/nacos-server-*-SNAPSHOT.tar.gz + path: distribution/target/nacos-server-*.tar.gz docker: if: ${{ success() }}