Skip to content

Commit

Permalink
Merge pull request #8362 from OpenMined/yash/k8s-fix
Browse files Browse the repository at this point in the history
Fix kubernetes ci/cd
  • Loading branch information
rasswanth-s authored Dec 22, 2023
2 parents 8e6d948 + cc0fdcf commit d822ad2
Show file tree
Hide file tree
Showing 28 changed files with 198 additions and 906 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/cd-syft-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ jobs:
- name: Set Grid package version
id: grid
shell: bash
run: echo "GRID_VERSION=$(python packages/grid/VERSION)" >> $GITHUB_OUTPUT
run: |
echo "GRID_VERSION=$(python packages/grid/VERSION)" >> $GITHUB_OUTPUT
echo "SEAWEEDFS_VERSION=$(grep 'SEAWEEDFS_VERSION' packages/grid/default.env | cut -d '=' -f2)" >> $GITHUB_OUTPUT
- name: Build and push `grid-backend` image to registry
uses: docker/build-push-action@v5
Expand All @@ -116,6 +118,19 @@ jobs:
${{ secrets.ACR_SERVER }}/openmined/grid-frontend:${{ steps.grid.outputs.GRID_VERSION }}
target: grid-ui-development

- name: Build and push `grid-seaweedfs` image to registry
uses: docker/build-push-action@v5
with:
context: ./packages/grid/seaweedfs
file: ./packages/grid/seaweedfs/seaweedfs.dockerfile
build-args: |
SEAWEEDFS_VERSION=${{ steps.grid.outputs.SEAWEEDFS_VERSION }}
push: true
tags: |
${{ secrets.ACR_SERVER }}/openmined/grid-seaweedfs:dev
${{ secrets.ACR_SERVER }}/openmined/grid-seaweedfs:dev-${{ github.sha }}
${{ secrets.ACR_SERVER }}/openmined/grid-seaweedfs:${{ steps.grid.outputs.GRID_VERSION }}
- name: Build Helm Chart & Copy to infra
if: github.ref == 'refs/heads/dev' || github.event.inputs.deploy-helm == 'true'
shell: bash
Expand Down Expand Up @@ -143,13 +158,15 @@ jobs:
python -m pip install --upgrade pip
pip install tox
export CONTAINER_REGISTRY=${{ secrets.ACR_SERVER }}
export VERSION=dev-${{github.sha}}
tox -e syft.build.helm
rm -rf infrastructure/gitops/environments/dev/
mkdir -p infrastructure/gitops/environments/dev/
cp -R packages/grid/helm/syft/. packages/grid/helm/manifests.yaml infrastructure/gitops/environments/dev/
cp -R packages/grid/helm/syft/. infrastructure/gitops/environments/dev/
# write version to VERSION.txt file
echo "dev-${{github.sha}}" > infrastructure/gitops/environments/dev/VERSION.txt
- name: Commit & push changes to Infra Repo
if: github.ref == 'refs/heads/dev' || github.event.inputs.deploy-helm == 'true'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cd-syft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -395,10 +395,10 @@ jobs:
run: |
if $is_pre_release; then
rm -rf infrastructure/gitops/environments/pre-release/.
cp -R packages/grid/helm/syft/. packages/grid/helm/manifests.yaml infrastructure/gitops/environments/pre_release/
cp -R packages/grid/helm/syft/. infrastructure/gitops/environments/pre_release/
else
rm -rf infrastructure/gitops/environments/stable/.
cp -R packages/grid/helm/syft/. packages/grid/helm/manifests.yaml infrastructure/gitops/environments/stable/
cp -R packages/grid/helm/syft/. infrastructure/gitops/environments/stable/
fi
- name: Commit changes to Infra Repo
Expand Down
4 changes: 2 additions & 2 deletions packages/grid/devspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ deployments:
chart:
name: ./helm/syft
values:
container:
syft:
registry: ${CONTAINER_REGISTRY}
syft_version: "dev-latest"
version: "dev-latest"
node:
settings:
nodeName: ${NODE_NAME}
Expand Down
Loading

0 comments on commit d822ad2

Please sign in to comment.