Create Hub Ingest Endpoint #10
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: Create Hub Ingest Endpoint | |
on: | |
workflow_dispatch: | |
inputs: | |
username: | |
description: 'Username for the endpoint' | |
required: true | |
type: string | |
size: | |
description: 'Storage size (e.g., 50Gi)' | |
required: true | |
type: string | |
env: | |
BIOC_HUBSINGEST_PATH: "${{ github.workspace }}" | |
jobs: | |
create-endpoint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: save kubeconfig | |
shell: bash | |
run: mkdir -p ~/.kube && echo "${{ secrets.KUBECONFIG }}" > ~/.kube/config | |
- name: Install Kubectl | |
run: | | |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" && \ | |
chmod +x ./kubectl && \ | |
sudo mv ./kubectl /usr/local/bin/kubectl && \ | |
kubectl version | |
- name: Set up environment | |
run: | | |
USERNAME_UPPER=$(echo "${{ inputs.username }}" | tr '[:lower:]' '[:upper:]') | |
echo "SECRET_NAME=S3KEY_${USERNAME_UPPER}" >> $GITHUB_ENV | |
- name: Create endpoint then test | |
run: | | |
bash install_hubsingest.sh | |
export PATH="$PATH:$BIOC_HUBSINGEST_PATH" | |
hubsingest create_endpoint "${{ inputs.username }}" "${{ inputs.size }}" ${{ secrets[env.SECRET_NAME] }} | |
kubectl wait -n "${{ inputs.username }}-ns" --for=condition=ready pod -l app=versitygw --timeout=300s | |
kubectl wait -n "${{ inputs.username }}-ns" --for=condition=ready certificate ${{ inputs.username }}-hubsingest-bioconductor-org-key --timeout=600s || bash scripts/reset_endpoint.sh "${{ inputs.username }}" && kubectl wait -n "${{ inputs.username }}-ns" --for=condition=ready certificate ${{ inputs.username }}-hubsingest-bioconductor-org-key --timeout=600s | |
hubsingest test_endpoint "${{ inputs.username }}" |