Fix Clinical Data NA Count Bug with Cross-Study Attribute Level Confl… #2936
This file contains hidden or 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: Docker Image CI | |
on: | |
push: | |
branches: | |
- master | |
tags: '*' | |
jobs: | |
build_and_publish_web_and_data: | |
if: github.repository == 'cBioPortal/cbioportal' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout git repo | |
uses: actions/checkout@v3 | |
- name: 'Create application.properties' | |
run: | | |
cp src/main/resources/application.properties.EXAMPLE src/main/resources/application.properties | |
- name: Extract metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
cbioportal/cbioportal | |
# The latest tag will also be generated on tag event with a valid semver tag | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
# The following two actions are required to build multi-platform images | |
# buildx is an extension of docker build, QUEM is used to convert the binary to varies architecture | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Publish Docker Image on Tag | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
platforms: linux/amd64,linux/arm64 | |
file: docker/web-and-data/Dockerfile | |
cache-from: type=gha | |
cache-to: type=gha | |
build_and_publish_web: | |
if: github.repository == 'cBioPortal/cbioportal' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout git repo | |
uses: actions/checkout@v3 | |
- name: 'Create application.properties' | |
run: | | |
cp src/main/resources/application.properties.EXAMPLE src/main/resources/application.properties | |
- name: Extract metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
cbioportal/cbioportal | |
# Do not generate latest tag | |
flavor: | | |
latest=false | |
suffix=-web-shenandoah | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
# The following two actions are required to build multi-platform images | |
# buildx is an extension of docker build, QUEM is used to convert the binary to varies architecture | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Publish Docker Image on Tag | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
platforms: linux/amd64,linux/arm64 | |
file: docker/web/Dockerfile | |
cache-from: type=gha | |
cache-to: type=gha | |
update_dependency_graph: | |
needs: build_and_publish_web | |
if: github.repository == 'cBioPortal/cbioportal' && github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Extract metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
cbioportal/cbioportal | |
# Do not generate latest tag | |
flavor: | | |
latest=false | |
suffix=-web-shenandoah | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
- name: Update Github Dependency Graph | |
uses: anchore/sbom-action@v0 | |
with: | |
image: ${{ steps.meta.outputs.tags }} | |
dependency-snapshot: 'true' | |
github-token: '${{ secrets.GITHUB_TOKEN }}' | |
update_master_k8s_deployment: | |
needs: build_and_publish_web | |
if: github.repository == 'cBioPortal/cbioportal' && github.ref == 'refs/heads/master' | |
runs-on: ubuntu-latest | |
env: | |
DEPLOYMENT_FILE_PATH: "argocd/aws/203403084713/clusters/cbioportal-prod/apps/cbioportal" | |
DEPLOYMENT_FILE_NAMES: "cbioportal_backend_master_blue.yaml cbioportal_backend_master_green.yaml" | |
K8S_REPO: 'knowledgesystems/knowledgesystems-k8s-deployment' | |
ARGOCD_CLI_VER: '2.13.3' | |
ARGOCD_SERVER: 'argocd.cbioportal.org' | |
ARGOCD_APP: 'cbioportal' | |
ARGOCD_RESOURCE_OPTIONS: '--resource apps:Deployment:default/cbioportal-backend-master-blue --resource apps:Deployment:default/cbioportal-backend-master-green' | |
steps: | |
- name: Extract metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
cbioportal/cbioportal | |
# Do not generate latest tag | |
flavor: | | |
latest=false | |
suffix=-web-shenandoah | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
- name: Extract Image Tag | |
run: | | |
DOCKER_TAG=${{ steps.meta.outputs.tags }} | |
docker pull $DOCKER_TAG | |
DOCKER_SHA=$(docker inspect --format="{{index .RepoDigests 0}}" $DOCKER_TAG) | |
echo "DOCKER_SHA=$DOCKER_SHA" >> $GITHUB_ENV | |
- name: Checkout K8s Repo | |
uses: actions/checkout@v4 | |
with: | |
repository: ${{ env.K8S_REPO }} | |
token: ${{ secrets.K8S_REPO_TOKEN }} | |
- name: Update Master Deployment File | |
run: | | |
for FILE in $DEPLOYMENT_FILE_NAMES; do | |
sed -i "s|image:.*|image: $DOCKER_SHA|" $DEPLOYMENT_FILE_PATH/$FILE | |
done | |
- name: Add and commit changes to deployment file | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "cBioPortal Backend Github Action" | |
if ! git diff --quiet; then | |
git add -A | |
git commit -m "Update master deployment" | |
else | |
echo "No changes to commit." | |
fi | |
- name: Push changes to K8s repo | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: '${{ secrets.K8S_REPO_TOKEN }}' | |
repository: ${{ env.K8S_REPO }} | |
branch: master | |
- name: Setup ArgoCD | |
uses: clowdhaus/argo-cd-action/@main | |
with: | |
version: ${{ env.ARGOCD_CLI_VER }} | |
command: login ${{ env.ARGOCD_SERVER }} | |
options: --username ${{ secrets.ARGOCD_2034_USERNAME }} --password ${{ secrets.ARGOCD_2034_PASSWORD }} | |
- name: Sync master deployment | |
uses: clowdhaus/argo-cd-action/@main | |
with: | |
version: ${{ env.ARGOCD_CLI_VER }} | |
command: app sync ${{ env.ARGOCD_APP }} | |
options: ${{ env.ARGOCD_RESOURCE_OPTIONS }} |