From dbab31b782f3f700a4603e6b679b8ed8ca6a0933 Mon Sep 17 00:00:00 2001 From: Sebastian Alvis Date: Thu, 1 Oct 2020 14:02:24 -0700 Subject: [PATCH] Correct workflow files so that Actions run correctly --- .github/workflows/build-aws-image.yaml | 10 +++--- ...build-aws-hub.yaml => deploy-aws-hub.yaml} | 35 ++++++++++--------- 2 files changed, 22 insertions(+), 23 deletions(-) rename .github/workflows/{build-aws-hub.yaml => deploy-aws-hub.yaml} (67%) diff --git a/.github/workflows/build-aws-image.yaml b/.github/workflows/build-aws-image.yaml index a1039eb0..689d05ee 100644 --- a/.github/workflows/build-aws-image.yaml +++ b/.github/workflows/build-aws-image.yaml @@ -7,6 +7,7 @@ on: #- prod paths: - 'deployments/icesat2/image/binder/*' + - '.github/workflows/build-aws-image.yaml' pull_request: branches: - staging @@ -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 diff --git a/.github/workflows/build-aws-hub.yaml b/.github/workflows/deploy-aws-hub.yaml similarity index 67% rename from .github/workflows/build-aws-hub.yaml rename to .github/workflows/deploy-aws-hub.yaml index 92377ca8..809e1100 100644 --- a/.github/workflows/build-aws-hub.yaml +++ b/.github/workflows/deploy-aws-hub.yaml @@ -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: @@ -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 }} @@ -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 @@ -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 }}