Skip to content

Commit

Permalink
Merge branch 'dev' into feat/syft_client_login_password
Browse files Browse the repository at this point in the history
  • Loading branch information
tcp committed Sep 21, 2023
2 parents 156d1f5 + 6b87240 commit 574affc
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 35 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/cd-hagrid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.SYFT_BUMP_TOKEN }}
token: ${{ secrets.SYFT_BOT_COMMIT_TOKEN }}
- name: Install checksumdir
run: |
pip install --upgrade checksumdir
Expand Down Expand Up @@ -85,13 +85,12 @@ jobs:

- name: Commit changes
if: ${{needs.hagrid-deploy.outputs.current_hash}} != ${{needs.hagrid-deploy.outputs.previous_hash}}
uses: EndBug/add-and-commit@v7
uses: EndBug/add-and-commit@v9
with:
author_name: Madhava Jay
author_email: [email protected]
message: "bump version"
author_name: ${{ secrets.OM_BOT_NAME }}
author_email: ${{ secrets.OM_BOT_EMAIL }}
message: "[hagrid] bump version"
add: "['./packages/hagrid/.bumpversion.cfg','./packages/hagrid/setup.py','./packages/hagrid/hagrid/version.py', './scripts/hagrid_hash', './packages/hagrid/hagrid/manifest_template.yml']"
pull_strategy: NO-PULL

- name: Build and publish
if: ${{needs.hagrid-deploy.outputs.current_hash}} != ${{needs.hagrid-deploy.outputs.previous_hash}}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/cd-syft-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ jobs:
deploy-syft-dev:
runs-on: om-ci-16vcpu-ubuntu2204
steps:
- name: Permission to home directory
run: |
sudo chown -R $USER:$USER $HOME
- uses: actions/checkout@v4

# Checkout Infra repo (nested)
Expand All @@ -23,7 +27,7 @@ jobs:
with:
repository: ${{ secrets.INFRA_REPO }}
ref: "main"
token: ${{ secrets.OM_BOT_TOKEN }}
token: ${{ secrets.INFRA_BOT_COMMIT_TOKEN }}
path: infrastructure

- name: Set up Python
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cd-syft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- uses: actions/checkout@v3
with:
token: ${{ secrets.OM_BOT_TOKEN }}
token: ${{ secrets.SYFT_BOT_COMMIT_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v3
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
with:
author_name: ${{ secrets.OM_BOT_NAME }}
author_email: ${{ secrets.OM_BOT_EMAIL }}
message: "bump version"
message: "[syft]bump version"
add: "['.bumpversion.cfg', 'VERSION', 'packages/grid/VERSION', 'packages/grid/devspace.yaml', 'packages/syft/src/syft/VERSION', 'packages/syft/setup.cfg', 'packages/grid/frontend/package.json', 'packages/syft/src/syft/__init__.py', 'packages/hagrid/hagrid/manifest_template.yml', 'packages/grid/helm/syft/Chart.yaml', 'packages/grid/helm/repo', 'packages/hagrid/hagrid/deps.py', 'packages/grid/podman/podman-kube/podman-syft-kube.yaml' , 'packages/syftcli/manifest.yml']"

- name: Scheduled Build and Publish
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
with:
repository: ${{ secrets.INFRA_REPO }}
ref: "main"
token: ${{ secrets.OM_BOT_TOKEN }}
token: ${{ secrets.INFRA_BOT_COMMIT_TOKEN }}
path: infrastructure

# This step will copy the generated K8s manifest files to the correct directory in Infra repo
Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/cd-syftcli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.SYFT_BUMP_TOKEN }}
token: ${{ secrets.SYFT_BOT_COMMIT_TOKEN }}

- name: Install checksumdir
run: |
Expand Down Expand Up @@ -83,15 +83,14 @@ jobs:
if: ${{steps.get-hashes.outputs.current_hash != steps.get-hashes.outputs.previous_hash }}
run: echo $(checksumdir packages/syftcli/syftcli -e version.py) > ./scripts/syftcli_hash

- name: Commit changes
- name: Commit changes to Syft CLI
if: ${{steps.get-hashes.outputs.current_hash != steps.get-hashes.outputs.previous_hash }}
uses: EndBug/add-and-commit@v7
uses: EndBug/add-and-commit@v9
with:
author_name: Madhava Jay
author_email: [email protected]
message: "bump version"
author_name: ${{ secrets.OM_BOT_NAME }}
author_email: ${{ secrets.OM_BOT_EMAIL }}
message: "[syftcli]bump version"
add: "['./packages/syftcli/.bumpversion.cfg','./packages/syftcli/setup.py','./packages/syftcli/syftcli/version.py', './scripts/syftcli_hash']"
pull_strategy: NO-PULL

- name: Build and publish
if: ${{steps.get-hashes.outputs.current_hash != steps.get-hashes.outputs.previous_hash }}
Expand All @@ -114,8 +113,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.SYFT_BUMP_TOKEN }}

- name: Set up Python
uses: actions/setup-python@v3
Expand Down Expand Up @@ -152,8 +149,6 @@ jobs:

steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.SYFT_BUMP_TOKEN }}

- name: Deployed Version
run: echo ${{needs.deploy-syft-cli.outputs.deployed_version}}
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/container-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ jobs:
steps:
- uses: actions/checkout@v3

# free 10GB of space
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
# Build the docker image for testing
- name: Build a Docker image
run: DOCKER_BUILDKIT=1 docker build -f packages/grid/backend/backend.dockerfile packages -t backend:${{ github.sha }} --no-cache
Expand Down Expand Up @@ -56,6 +62,12 @@ jobs:
# This is where you will need to introduce the Snyk API token created with your Snyk account
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

# free 10GB of space
- name: Remove unnecessary files
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
# Build the docker image for testing
- name: Build a Docker image
shell: bash
Expand Down Expand Up @@ -524,7 +536,7 @@ jobs:
continue-on-error: true
uses: aquasecurity/trivy-action@master
with:
image-ref: "seaweedfs:3.55"
image-ref: "chrislusf/seaweedfs:3.55"
format: "cyclonedx"
output: "seaweedfs-trivy-results.sbom.json"
timeout: "10m0s"
Expand All @@ -541,7 +553,7 @@ jobs:
continue-on-error: true
uses: aquasecurity/trivy-action@master
with:
image-ref: "seaweedfs:3.55"
image-ref: "chrislusf/seaweedfs:3.55"
format: "sarif"
output: "trivy-results.sarif"
timeout: "10m0s"
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/post-merge-cleanup-notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.SYFT_BUMP_TOKEN }}
token: ${{ secrets.SYFT_BOT_COMMIT_TOKEN }}

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Commit changes

- name: Commit changes to remove notebooks
uses: EndBug/add-and-commit@v9
with:
author_name: Madhava Jay
author_email: [email protected]
author_name: ${{ secrets.OM_BOT_NAME }}
author_email: ${{ secrets.OM_BOT_EMAIL }}
message: "cleanup notebooks"
remove: "-r notebooks/Experimental/"
commit: "-a"
2 changes: 1 addition & 1 deletion .github/workflows/pr-tests-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ jobs:
shell: bash
run: |
mkdir -p ~/.docker/cli-plugins
DOCKER_COMPOSE_VERSION=v2.16.0
DOCKER_COMPOSE_VERSION=v2.21.0
curl -sSL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-tests-stack-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
shell: bash
run: |
mkdir -p ~/.docker/cli-plugins
DOCKER_COMPOSE_VERSION=v2.16.0
DOCKER_COMPOSE_VERSION=v2.21.0
curl -sSL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-tests-stack-public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
shell: bash
run: |
mkdir -p ~/.docker/cli-plugins
DOCKER_COMPOSE_VERSION=v2.16.0
DOCKER_COMPOSE_VERSION=v2.21.0
curl -sSL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-tests-stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:
shell: bash
run: |
mkdir -p ~/.docker/cli-plugins
DOCKER_COMPOSE_VERSION=v2.16.0
DOCKER_COMPOSE_VERSION=v2.21.0
curl -sSL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
Expand Down Expand Up @@ -334,7 +334,7 @@ jobs:
shell: bash
run: |
mkdir -p ~/.docker/cli-plugins
DOCKER_COMPOSE_VERSION=v2.16.0
DOCKER_COMPOSE_VERSION=v2.21.0
curl -sSL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/pr-tests-syft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ jobs:
# run: |
# sudo chown -R $USER:$USER $HOME
- uses: actions/checkout@v3

# free 10GB of space
- name: Remove unnecessary files
if: matrix.os == 'ubuntu-latest'
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Check for file changes
uses: dorny/paths-filter@v2
id: changes
Expand Down Expand Up @@ -253,7 +261,7 @@ jobs:
shell: bash
run: |
mkdir -p ~/.docker/cli-plugins
DOCKER_COMPOSE_VERSION=v2.16.0
DOCKER_COMPOSE_VERSION=v2.21.0
curl -sSL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
docker compose version
Expand Down
Empty file.
4 changes: 2 additions & 2 deletions packages/hagrid/hagrid/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
You are running an old version of docker, possibly on Linux. You need to install v2.
At the time of writing this, if you are on linux you need to run the following:
DOCKER_COMPOSE_VERSION=v2.16.0
DOCKER_COMPOSE_VERSION=v2.21.0
curl -sSL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 \
-o ~/.docker/cli-plugins/docker-compose
chmod +x ~/.docker/cli-plugins/docker-compose
Expand Down Expand Up @@ -770,7 +770,7 @@ def check_syft(
"windows": "choco install docker-desktop -y",
"linux": (
"mkdir -p ~/.docker/cli-plugins\n"
+ "DOCKER_COMPOSE_VERSION=v2.16.0\n"
+ "DOCKER_COMPOSE_VERSION=v2.21.0\n"
+ "curl -sSL https://github.com/docker/compose/releases/download/"
+ "${DOCKER_COMPOSE_VERSION}/docker-compose-linux-x86_64 "
+ "-o ~/.docker/cli-plugins/docker-compose\n"
Expand Down

0 comments on commit 574affc

Please sign in to comment.