diff --git a/.github/workflows/assets.yaml b/.github/workflows/assets.yaml index 7071191c1..2fee19065 100644 --- a/.github/workflows/assets.yaml +++ b/.github/workflows/assets.yaml @@ -5,61 +5,7 @@ on: types: [published] jobs: - assets: - name: Publish binaries and Brew formula - runs-on: ubuntu-latest - steps: - - name: Install Go - uses: actions/setup-go@v4 - with: - go-version: 1.19 - - uses: actions/checkout@v3 - - name: Build binaries - run: | - VERSION=${GITHUB_REF#refs/*/} - echo "Version: ${VERSION}" - make dist - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: _dist/iter8-*.tar.gz - tag: ${{ github.ref }} - overwrite: true - file_glob: true - - name: create-checksum - id: create-checksum - run: | - VERSION=${GITHUB_REF#refs/*/} - echo "VERSION=$VERSION" >> $GITHUB_ENV - wget https://github.com/iter8-tools/iter8/archive/refs/tags/${VERSION}.zip - sha256sum ${VERSION}.zip > checksum.txt - wget https://github.com/iter8-tools/iter8/archive/refs/tags/${VERSION}.tar.gz - sha256sum ${VERSION}.tar.gz >> checksum.txt - cd _dist - for f in iter8-*.tar.gz - do - sha256sum ${f} >> ../checksum.txt - done - # pick up darwin checksum and export it - echo "SHAFORMAC=$(grep darwin ../checksum.txt | awk '{print $1}')" >> $GITHUB_ENV - - name: Upload checksum to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - asset_name: checksum.txt - file: checksum.txt - tag: ${{ github.ref }} - overwrite: true - - name: Update Homebrew formula - uses: peter-evans/repository-dispatch@v2 - with: - token: ${{ secrets.PERSONAL_TOKEN }} - repository: iter8-tools/homebrew-iter8 - event-type: release - client-payload: '{"ref": "${{ env.VERSION }}", "sha": "${{ github.sha }}", "shaformac": "${{ env.SHAFORMAC }}"}' - - # Push Iter8 image to dockerhub + # Push Iter8 image to Docker Hub build-and-push: runs-on: ubuntu-latest needs: assets @@ -95,13 +41,14 @@ jobs: TAG=v${{ env.VERSION }} kubernetes-http-experiment: - name: Kubernetes http load test + name: Kubernetes HTTP load test runs-on: ubuntu-latest needs: - build-and-push - assets steps: - - uses: iter8-tools/iter8@v0.13 + - name: Install Iter8 + run: go install github.com/iter8-tools/iter8@v0.13 - name: Start kind cluster uses: helm/kind-action@v1.5.0 with: @@ -131,7 +78,8 @@ jobs: - build-and-push - assets steps: - - uses: iter8-tools/iter8@v0.13 + - name: Install Iter8 + run: go install github.com/iter8-tools/iter8@v0.13 - name: Start kind cluster uses: helm/kind-action@v1.5.0 with: @@ -163,12 +111,13 @@ jobs: - build-and-push - assets steps: - - uses: iter8-tools/iter8@v0.13 + - name: Install Iter8 + run: go install github.com/iter8-tools/iter8@v0.13 - name: Start kind cluster uses: helm/kind-action@v1.5.0 with: wait: 300s - - name: deploy resources to cluster + - name: Deploy resources to cluster run: | kubectl create deploy httpbin --image=kennethreitz/httpbin --port=80 kubectl expose deploy httpbin --port=80 @@ -193,12 +142,13 @@ jobs: - build-and-push - assets steps: - - uses: iter8-tools/iter8@v0.13 + - name: Install Iter8 + run: go install github.com/iter8-tools/iter8@v0.13 - name: Start kind cluster uses: helm/kind-action@v1.5.0 with: wait: 300s - - name: deploy resources to cluster + - name: Deploy resources to cluster run: | kubectl create deploy httpbin --image=kennethreitz/httpbin --port=80 kubectl expose deploy httpbin --port=80 diff --git a/.github/workflows/localtests.yaml b/.github/workflows/localtests.yaml index 1061a6b8d..e7cfa7409 100644 --- a/.github/workflows/localtests.yaml +++ b/.github/workflows/localtests.yaml @@ -55,7 +55,8 @@ jobs: with: files: charts/iter8 - - uses: iter8-tools/iter8@v0.13 + - name: Install Iter8 + run: go install github.com/iter8-tools/iter8@v0.13 if: steps.modified-files.outputs.any_modified == 'true' - name: Start kind cluster ${{ matrix.version }} @@ -108,7 +109,8 @@ jobs: with: files: charts/iter8 - - uses: iter8-tools/iter8@v0.13 + - name: Install Iter8 + run: go install github.com/iter8-tools/iter8@v0.13 if: steps.modified-files.outputs.any_modified == 'true' - name: Start kind cluster ${{ matrix.version }} @@ -163,7 +165,8 @@ jobs: with: files: charts/iter8 - - uses: iter8-tools/iter8@v0.13 + - name: Install Iter8 + run: go install github.com/iter8-tools/iter8@v0.13 if: steps.modified-files.outputs.any_modified == 'true' - name: Start kind cluster ${{ matrix.version }} @@ -218,7 +221,8 @@ jobs: with: files: charts/iter8 - - uses: iter8-tools/iter8@v0.13 + - name: Install Iter8 + run: go install github.com/iter8-tools/iter8@v0.13 if: steps.modified-files.outputs.any_modified == 'true' - name: Start kind cluster ${{ matrix.version }} @@ -275,7 +279,8 @@ jobs: with: files: charts/autox - - uses: iter8-tools/iter8@v0.13 + - name: Install Iter8 + run: go install github.com/iter8-tools/iter8@v0.13 if: steps.modified-files.outputs.any_modified == 'true' - name: Start kind cluster ${{ matrix.version }} @@ -332,7 +337,8 @@ jobs: with: files: charts/abn - - uses: iter8-tools/iter8@v0.13 + - name: Install Iter8 + run: go install github.com/iter8-tools/iter8@v0.13 if: steps.modified-files.outputs.any_modified == 'true' - name: Start kind cluster ${{ matrix.version }} @@ -371,7 +377,8 @@ jobs: with: files: charts/traffic - - uses: iter8-tools/iter8@v0.13 + - name: Install Iter8 + run: go install github.com/iter8-tools/iter8@v0.13 if: steps.modified-files.outputs.any_modified == 'true' - name: Start kind cluster ${{ matrix.version }} diff --git a/.github/workflows/testkustomize.yaml b/.github/workflows/testkustomize.yaml index eb4273085..807e9bace 100644 --- a/.github/workflows/testkustomize.yaml +++ b/.github/workflows/testkustomize.yaml @@ -53,7 +53,8 @@ jobs: with: files: charts/traffic - - uses: iter8-tools/iter8@v0.13 + - name: Install Iter8 + run: go install github.com/iter8-tools/iter8@v0.13 if: steps.modified-files.outputs.any_modified == 'true' - name: Start kind cluster ${{ matrix.version }} @@ -91,7 +92,8 @@ jobs: with: files: charts/traffic - - uses: iter8-tools/iter8@v0.13 + - name: Install Iter8 + run: go install github.com/iter8-tools/iter8@v0.13 if: steps.modified-files.outputs.any_modified == 'true' - name: Start kind cluster ${{ matrix.version }} diff --git a/action.yaml b/action.yaml deleted file mode 100644 index 2561f1bda..000000000 --- a/action.yaml +++ /dev/null @@ -1,52 +0,0 @@ -name: "Iter8 Install" -description: "Install Iter8 CLI" -branding: - icon: check-circle - color: green - -runs: - using: "composite" - steps: - - name: Install Iter8 CLI - shell: bash - env: - VERSION: ${{ github.action_ref }} - run: | - # For details on context variables runner.os and runner.arch, see: - # https://docs.github.com/en/actions/learn-github-actions/contexts#runner-context - # The returned values do not match those used by the build artifacts. - # See https://github.com/iter8-tools/iter8/blob/master/Makefile#L4 (and for other valid combinations: https://github.com/mitchellh/gox/blob/master/platform.go#L28-L101) - # Therefore, this code trasforms the context variables as follows: - # os: Linux -> linux, Windows -> windows, macOS -> darwin - # arch: X86 -> 386 amd X64 -> amd64 - OS=$(echo ${{ runner.os }} | tr '[:upper:]' '[:lower:]' | sed 's/macos/darwin/') - ARCH=$(echo ${{ runner.arch }} | sed 's/X86/386/' | sed 's/X64/amd64/') - - RELEASE="${{ env.VERSION }}" - if [ -z $RELEASE ] || [ $RELEASE = "stable" ]; then - REL=$(curl -s "https://api.github.com/repos/iter8-tools/iter8/releases/latest" | jq -r '.tag_name') - fi - if [ -z $REL ]; then - REL=$(curl -s "https://api.github.com/repos/iter8-tools/iter8/tags" | jq --arg RELEASE $RELEASE -r '.[] | select(.commit.sha==$RELEASE) | .name') - fi - if [ -z $REL ]; then - REL=$(curl -s "https://api.github.com/repos/iter8-tools/iter8/releases" | jq -r '.[] | .tag_name' | grep $RELEASE | head -1) - fi - if [ -z $REL ]; then - echo "Invalid release specified: $RELEASE" - exit 1 - fi - echo "Installing Iter8 version $REL" - - ASSET="iter8-$OS-$ARCH.tar.gz" - ASSET_URL="https://github.com/iter8-tools/iter8/releases/download/$REL/$ASSET" - echo "Downloading $ASSET_URL" - wget -q $ASSET_URL && rc=$? || rc=$? - if [ $rc -eq 0 ]; then - # echo "SUCCESS: downloaded $ASSET from $ASSET_URL" - tar -xvf $ASSET - mv $OS-$ARCH/iter8 /usr/local/bin - else - echo "ERROR: unable to download $ASSET from $ASSET_URL" - exit 1 - fi