fix(ci/cd): detect uncommited swagger docs (#1724)

Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
Alexei Dodon
2023-08-23 19:21:43 +03:00
committed by GitHub
parent 6d65401499
commit ca2904762a
15 changed files with 53 additions and 45 deletions
+5 -5
View File
@@ -1,10 +1,10 @@
name: Bug report
description: File a bug report
title: "[Bug]: "
labels: bug
title: "[Bug]: "
labels: ["bug"]
body:
- type: input
attributes:
attributes:
label: "zot version"
placeholder: "v1.4.3 or commit hash"
validations:
@@ -23,12 +23,12 @@ body:
1. Configuration
2. Client tool used
3. Seen error
- type: textarea
attributes:
label: "Expected behavior"
description: "A clear and concise description of what you expected to happen."
- type: textarea
attributes:
label: "Screenshots"
+1 -1
View File
@@ -1,7 +1,7 @@
name: Feature request
description: Request a feature
title: "[Feat]: "
labels: feature
labels: ["feature"]
body:
- type: textarea
attributes:
+3 -3
View File
@@ -88,11 +88,11 @@ jobs:
pip install localstack # Install LocalStack cli
docker pull localstack/localstack:1.3 # Make sure to pull the latest version of the image
localstack start -d # Start LocalStack in the background
echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container
localstack wait -t 30 # to become ready before timing out
localstack wait -t 30 # to become ready before timing out
echo "Startup complete"
aws --endpoint-url=http://localhost:4566 s3api create-bucket --bucket zot-storage --region us-east-2 --create-bucket-configuration="{\"LocationConstraint\": \"us-east-2\"}"
aws dynamodb --endpoint-url http://localhost:4566 --region "us-east-2" create-table --table-name BlobTable --attribute-definitions AttributeName=Digest,AttributeType=S --key-schema AttributeName=Digest,KeyType=HASH --provisioned-throughput ReadCapacityUnits=10,WriteCapacityUnits=5
env:
+9 -9
View File
@@ -35,7 +35,7 @@ jobs:
- name: Install dependencies
run: |
cd $GITHUB_WORKSPACE
go install github.com/swaggo/swag/cmd/swag
go install github.com/swaggo/swag/cmd/swag@v1.8.12
go mod download
sudo apt-get update
sudo apt-get -y install rpm uidmap
@@ -56,7 +56,7 @@ jobs:
minio/minio:edge-cicd server /data
- name: Install py minio
run: pip3 install minio
- name: Wait for minio to come up
run: |
curl --connect-timeout 5 \
@@ -64,7 +64,7 @@ jobs:
--retry 12 \
--retry-max-time 120 \
'http://localhost:9000/minio/health/live'
- name: Create minio bucket
run: |
python3 - <<'EOF'
@@ -88,7 +88,7 @@ jobs:
run: |
sudo haproxy -d -f examples/cluster/haproxy.cfg -D
sleep 10
- name: Prepare configuration files
run: |
cp test/cluster/config-minio.json test/cluster/config-minio1.json
@@ -96,7 +96,7 @@ jobs:
cp test/cluster/config-minio.json test/cluster/config-minio2.json
sed -i 's/8082/8083/g' test/cluster/config-minio.json
cp test/cluster/config-minio.json test/cluster/config-minio3.json
- name: Run push-pull tests
run: |
make binary
@@ -124,7 +124,7 @@ jobs:
env:
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
- name: Run benchmark with --src-cidr arg
run: |
make bench
@@ -142,7 +142,7 @@ jobs:
env:
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
- name: Run benchmark with --src-ips arg
run: |
make bench
@@ -152,12 +152,12 @@ jobs:
sleep 10
# run zb with --src-ips
bin/zb-linux-amd64 -c 10 -n 50 -o ci-cd --src-ips 127.0.0.2,127.0.0.3,127.0.0.4,127.0.0.5,127.0.0.6,127.0.12.5,127.0.12.6 http://localhost:8080
killall -r zot-*
env:
AWS_ACCESS_KEY_ID: minioadmin
AWS_SECRET_ACCESS_KEY: minioadmin
# Download previous benchmark result from cache (if exists)
- name: Download previous benchmark data
uses: actions/cache@v3
+1 -1
View File
@@ -54,7 +54,7 @@ jobs:
- name: Install dependencies
run: |
cd $GITHUB_WORKSPACE
go install github.com/swaggo/swag/cmd/swag@latest
go install github.com/swaggo/swag/cmd/swag@v1.8.12
go mod download
go install github.com/wadey/gocovmerge@latest
go get -u github.com/swaggo/swag/cmd/swag
+5 -5
View File
@@ -25,7 +25,7 @@ jobs:
- name: Install dependencies
run: |
cd $GITHUB_WORKSPACE
go install github.com/swaggo/swag/cmd/swag
go install github.com/swaggo/swag/cmd/swag@v1.8.12
go mod download
sudo apt-get update
sudo apt-get install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev pkg-config rpm uidmap
@@ -72,7 +72,7 @@ jobs:
run: |
make test-bats-referrers
- name: Run metadata tests
run: |
run: |
make test-bats-metadata
- name: Run push-pull tests
run: |
@@ -101,10 +101,10 @@ jobs:
pip install localstack awscli-local[ver1] # install LocalStack cli and awslocal
docker pull localstack/localstack # Make sure to pull the latest version of the image
localstack start -d # Start LocalStack in the background
echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container
localstack wait -t 30 # to become ready before timing out
echo "Startup complete"
localstack wait -t 30 # to become ready before timing out
echo "Startup complete"
- name: Run cloud-only tests
run: |
make test-cloud-only
+1 -1
View File
@@ -22,7 +22,7 @@ jobs:
with:
cache: false
go-version: 1.20.x
- name: Run zb
run: |
make binary
+4 -4
View File
@@ -3,7 +3,7 @@ on:
schedule:
- cron: '30 1 * * *'
workflow_dispatch:
permissions: read-all
# Here we are running two tests:
@@ -40,10 +40,10 @@ jobs:
pip install localstack awscli-local[ver1] # install LocalStack cli and awslocal
docker pull localstack/localstack # Make sure to pull the latest version of the image
localstack start -d # Start LocalStack in the background
echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container
localstack wait -t 30 # to become ready before timing out
echo "Startup complete"
localstack wait -t 30 # to become ready before timing out
echo "Startup complete"
- name: Run restore s3 blobs after cache is deleted
run: |
make test-restore-s3-blobs
+3 -3
View File
@@ -6,7 +6,7 @@ name: conformance
# or API.
on:
push:
branches:
branches:
- main
pull_request:
branches:
@@ -25,7 +25,7 @@ jobs:
with:
cache: false
go-version: 1.20.x
- name: Checkout this PR
- name: Checkout this PR
uses: actions/checkout@v3
- name: Start zot server
run: |
@@ -57,7 +57,7 @@ jobs:
OCI_REFERRERS: 1
OCI_CROSSMOUNT_NAMESPACE: oci-conformance/crossmount-test
run: |
./conformance.test
./conformance.test
- run: mkdir -p .out/ && mv {report.html,junit.xml} .out/
if: always()
- name: Upload test results zip as build artifact
+4 -4
View File
@@ -22,7 +22,7 @@ jobs:
# Needs for private repositories.
contents: read
actions: read
steps:
- name: "Checkout code"
uses: actions/checkout@v3 # v3.0.0
@@ -41,8 +41,8 @@ jobs:
# repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
# Publish the results for public repositories to enable scorecard badges. For more details, see
# https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories, `publish_results` will automatically be set to `false`, regardless
# https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories, `publish_results` will automatically be set to `false`, regardless
# of the value entered here.
publish_results: true
@@ -54,7 +54,7 @@ jobs:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@v2.21.4 # v1.0.26