Skip to content

Commit

Permalink
[IA-4760] new GHA to replace last jenkins job (#493)
Browse files Browse the repository at this point in the history
* new GHA to replace jenkins job

* also do a manual workflow trigger for debugging purposes later
  • Loading branch information
LizBaldo authored Aug 28, 2024
1 parent 60e152d commit cffd18a
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 418 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/publish_all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and publish all images to GCR

on:
push:
branches: [ master ]
workflow_dispatch:
inputs:
branch:
description: 'Branch to run the workflow on'
required: false
default: 'master'

jobs:
publish-job:
runs-on: self-hosted
steps:
- name: Checkout current code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10'

- id: auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.TD_GCP_SA_KEY }}
create_credentials_file: true

- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0.3.0
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}

- name: Explicitly auth Docker for GCR
run: gcloud auth configure-docker --quiet

- name: Build Docker image and publish
run: |
gcloud auth configure-docker
./build_all.sh
25 changes: 25 additions & 0 deletions build_all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# Run `gcloud auth configure-docker --quiet` before running this script
# Example: ./build_all.sh

# Create the ordered list of images to build
# 1- terra-jupyter-base
# 2- terra-jupyter-python
# 3- terra-jupyter-r
# 4- terra-jupyter-gatk
# 5- terra-jupyter-hail
# 6- terra-jupyter-aou
# 7- terra-jupyter-bioconductor
# 8- terra-rstudio-aou
# 9- wondershaper
images=(terra-jupyter-base terra-jupyter-python terra-jupyter-r terra-jupyter-gatk terra-jupyter-hail terra-jupyter-aou terra-jupyter-bioconductor terra-rstudio-aou wondershaper)

# Loop over each image to build in the correct order
for image in images; do
# Call build.sh with the image to build
echo 'Building and publishing the following image to GCR: $image'
./build.sh "$image" "true"
done

# Once all images have been built, generate and push the 'terra-docker-versions-new' doc
python scripts/generate_version_docs.py
24 changes: 0 additions & 24 deletions hub/Dockerfile

This file was deleted.

Loading

0 comments on commit cffd18a

Please sign in to comment.