v1.5.2-rc1 #30
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Velero Plugin For vSphere Release Pipeline | |
on: | |
release: | |
types: [published] | |
jobs: | |
cicd: | |
name: Run CICD | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code of velero-plugin-for-vsphere | |
uses: actions/checkout@v2 | |
with: | |
path: src/github.com/vmware-tanzu/velero-plugin-for-vsphere | |
- name: Download essential GVDDK libraries | |
run: | | |
cd src/github.com/vmware-tanzu/velero-plugin-for-vsphere && mkdir .libs && cd .libs | |
wget --quiet https://gvddk-libs.s3-us-west-1.amazonaws.com/VMware-vix-disklib-7.0.2-17696664.x86_64.tar.gz | |
tar xzf VMware-vix-disklib-7.0.2-17696664.x86_64.tar.gz | |
chmod 644 $(find vmware-vix-disklib-distrib/lib64/ -type f) | |
- name: Make CI | |
env: | |
GOPATH: ${GITHUB_WORKSPACE} | |
run: | | |
cd src/github.com/vmware-tanzu/velero-plugin-for-vsphere | |
make ci | |
- name: Make Pre-Release | |
if: github.event_name == 'release' | |
env: | |
GOPATH: ${GITHUB_WORKSPACE} | |
run: | | |
cd src/github.com/vmware-tanzu/velero-plugin-for-vsphere | |
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin | |
make push VERSION=${{ github.event.release.tag_name }} | |
- name: Make Release | |
if: github.event_name == 'release' && github.event.release.prerelease == false | |
env: | |
GOPATH: ${GITHUB_WORKSPACE} | |
run: | | |
cd src/github.com/vmware-tanzu/velero-plugin-for-vsphere | |
echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin | |
make release QUALIFIED_TAG=${{ github.event.release.tag_name }} RELEASE_TAG=${{ github.event.release.tag_name }} | |
# Use the JSON key in secret to login gcr.io | |
- uses: 'docker/login-action@v1' | |
with: | |
registry: 'gcr.io' # or REGION.docker.pkg.dev | |
username: '_json_key' | |
password: '${{ secrets.GCR_SA_KEY }}' | |
# Push image to GCR to avoid docker hub rate limitation issue. | |
- name: Publish container image to GCR | |
if: github.event_name == 'release' && github.event.release.prerelease == false | |
env: | |
GOPATH: ${GITHUB_WORKSPACE} | |
run: | | |
cd src/github.com/vmware-tanzu/velero-plugin-for-vsphere | |
RELEASE_REGISTRY=gcr.io/velero-gcp make release QUALIFIED_TAG=${{ github.event.release.tag_name }} RELEASE_TAG=${{ github.event.release.tag_name }} |