Skip to content

Commit

Permalink
Correct workflow files so that Actions run correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
salvis2 committed Oct 2, 2020
1 parent e35fa82 commit dbab31b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build-aws-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
#- prod
paths:
- 'deployments/icesat2/image/binder/*'
- '.github/workflows/build-aws-image.yaml'
pull_request:
branches:
- staging
Expand All @@ -15,23 +16,20 @@ on:
paths:
- 'deployments/icesat2/image/binder/*'

env:
HUBPLOY_IMAGE: docker://yuvipanda/hubploy:20200826083951674280

jobs:
build_aws_image:
name: Build AWS Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: $HUBPLOY_IMAGE
- uses: docker://yuvipanda/hubploy:20200826083951674280
name: Unlock git-crypt Secrets
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
with:
entrypoint: /bin/bash
args: -c "echo ${GIT_CRYPT_KEY} | base64 -d | git crypt unlock - && git crypt status"
- uses: $HUBPLOY_IMAGE
- uses: docker://yuvipanda/hubploy:20200826083951674280
name: Build & Push AWS Image if Needed
with:
args: -c "build icesat2 --push"
args: build icesat2 --push
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ on:
paths:
- 'deployments/icesat2/**'
- 'pangeo-deploy/**'
- '.github/workflows/deploy-aws-hub.yaml'
paths_ignore:
- 'deployments/icesat2/image/binder/*'

env:
HUBPLOY_IMAGE: docker://yuvipanda/hubploy:20200826083951674280
HELM_EXECUTABLE: /usr/local/bin/helm3

jobs:
deploy_aws:
Expand All @@ -21,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: $HUBPLOY_IMAGE
- uses: docker://yuvipanda/hubploy:20200826083951674280
name: Unlock git-crypt Secrets
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
Expand All @@ -32,20 +33,20 @@ jobs:
# name: Build & Push AWS Image if Needed
# with:
# args: -c "build icesat2 --check-registry --push"
- uses: $HUBPLOY_IMAGE
- #uses: docker://yuvipanda/hubploy:20200826083951674280
name: Setup Helm
with:
entrypoint: /bin/bash
args: >
-c "helm init --client-only &&
helm repo add jupyterhub https://jupyterhub.github.io/helm-chart/ &&
helm repo add dask https://helm.dask.org/ &&
helm repo add dask-gateway https://dask.org/dask-gateway-helm-repo/ &&
helm repo add stable https://kubernetes-charts.storage.googleapis.com &&
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx &&
helm repo add prometheus-operator https://kubernetes-charts.storage.googleapis.com &&
helm repo update"
- uses: $HUBPLOY_IMAGE
run: |
curl https://get.helm.sh/helm-v3.1.2-linux-amd64.tar.gz | tar -xzf -
sudo mv linux-amd64/helm $HELM_EXECUTABLE
helm3 version
helm3 repo add jupyterhub https://jupyterhub.github.io/helm-chart/
helm3 repo add dask https://helm.dask.org/
helm3 repo add dask-gateway https://dask.org/dask-gateway-helm-repo/
helm3 repo add stable https://kubernetes-charts.storage.googleapis.com
helm3 repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm3 repo add prometheus-operator https://kubernetes-charts.storage.googleapis.com
helm3 repo update
- uses: docker://yuvipanda/hubploy:20200826083951674280
name: Add Runner IP to EKS Kubernetes API Whitelist
with:
entrypoint: /bin/bash
Expand All @@ -55,12 +56,12 @@ jobs:
aws --version &&
aws eks update-cluster-config --region us-west-2 --name pangeo --resources-vpc-config publicAccessCidrs=${RUNNERIP}/32 > /dev/null &&
sleep 120"
- uses: $HUBPLOY_IMAGE
- uses: docker://yuvipanda/hubploy:20200826083951674280
name: Deploy AWS Staging Hub
if: (github.ref == 'refs/heads/staging') || (github.ref == 'refs/heads/switch-to-github-actions')
with:
args: deploy icesat2 pangeo-deploy staging --timeout 1200s --cleanup-on-fail
- uses: $HUBPLOY_IMAGE
- uses: docker://yuvipanda/hubploy:20200826083951674280
name: Revert to Original EKS IP Whitelist
env:
AWS_IP_WHITELIST: ${{ secrets.AWS_IP_WHITELIST }}
Expand Down

0 comments on commit dbab31b

Please sign in to comment.