Skip to content

Commit

Permalink
ci: move release & test-install to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hypnoglow committed Aug 23, 2022
1 parent 2e6e5ef commit 3d3c9df
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 74 deletions.
74 changes: 0 additions & 74 deletions .circleci/config.yml

This file was deleted.

8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,17 @@ jobs:
go test -v ./tests/e2e/...
docker-images:
name: Build Docker images
needs:
- test-e2e
uses: ./.github/workflows/reusable-docker-images.yml
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

test-install:
name: Test plugin installation
needs:
- test-e2e
uses: ./.github/workflows/reusable-test-install.yml
if: github.ref_name == 'master'
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,16 @@ jobs:
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_PREVIOUS_TAG: ""

docker-images:
name: Build Docker images
uses: ./.github/workflows/reusable-docker-images.yml
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

test-install:
name: Test plugin installation
needs:
- release
uses: ./.github/workflows/reusable-test-install.yml
36 changes: 36 additions & 0 deletions .github/workflows/reusable-test-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: test-install

on:
workflow_call:

jobs:
test-install:
name: Test plugin installation
runs-on: ubuntu-latest
steps:

- name: Install helm
run: |
helm_version="3.9.3"
tar_filename="helm-v${helm_version}-linux-amd64.tar.gz"
checksum_filename="helm-v${helm_version}-linux-amd64.tar.gz.sha256sum"
curl -sSL https://get.helm.sh/${tar_filename} -O
curl -sSL https://get.helm.sh/${checksum_filename} -O
cat ${checksum_filename} | sha256sum -c
tar xzf ${tar_filename}
sudo mv linux-amd64/helm /usr/local/bin/helm
rm -rf linux-amd64 ${tar_filename} ${checksum_filename}
- name: Install helm-s3 plugin
run: |
version="${GITHUB_SHA}"
export HELM_S3_PLUGIN_NO_INSTALL_HOOK=true
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
version="${GITHUB_REF_NAME#v*}"
export HELM_S3_PLUGIN_NO_INSTALL_HOOK=
fi
echo "Check installation of version ${version}"
helm plugin install https://github.com/hypnoglow/helm-s3.git --version ${version}

0 comments on commit 3d3c9df

Please sign in to comment.