Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kubernetes ci/cd #8362

Merged
merged 13 commits into from
Dec 22, 2023
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/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: we could also remove packages/grid/helm/manifests.yaml in cd-syft.yaml


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
Loading