2020-04-29 05:42:23 +02:00
|
|
|
name: CONFORMANCE_TEST
|
|
|
|
env:
|
|
|
|
DOCKER_COMPOSE_VERSION: 1.23.0
|
|
|
|
|
|
|
|
on:
|
|
|
|
repository_dispatch:
|
|
|
|
types:
|
|
|
|
- manual-trigger-conformance
|
|
|
|
schedule:
|
|
|
|
- cron: '0 6 * * *'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
CONFORMANCE_TEST:
|
|
|
|
env:
|
|
|
|
CONFORMANCE_TEST: true
|
|
|
|
runs-on:
|
|
|
|
#- self-hosted
|
|
|
|
- ubuntu-latest
|
|
|
|
steps:
|
2022-10-24 10:35:32 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-03-08 08:20:43 +01:00
|
|
|
- id: 'auth'
|
|
|
|
name: 'Authenticate to Google Cloud'
|
2023-12-08 09:29:04 +01:00
|
|
|
uses: google-github-actions/auth@v2
|
2020-04-29 05:42:23 +02:00
|
|
|
with:
|
2022-03-08 08:20:43 +01:00
|
|
|
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
|
2023-12-19 11:16:29 +01:00
|
|
|
- uses: google-github-actions/setup-gcloud@v2
|
2020-04-29 05:42:23 +02:00
|
|
|
- run: gcloud info
|
2023-10-31 08:01:23 +01:00
|
|
|
- name: Set up Go 1.21
|
2023-12-08 10:07:59 +01:00
|
|
|
uses: actions/setup-go@v5
|
2020-04-29 05:42:23 +02:00
|
|
|
with:
|
2024-05-16 08:32:59 +02:00
|
|
|
go-version: 1.22.3
|
2020-04-29 05:42:23 +02:00
|
|
|
id: go
|
2022-10-24 10:35:32 +02:00
|
|
|
- uses: actions/checkout@v3
|
2020-04-29 05:42:23 +02:00
|
|
|
with:
|
|
|
|
path: src/github.com/goharbor/harbor
|
|
|
|
- name: before_install
|
|
|
|
run: |
|
|
|
|
set -x
|
|
|
|
cd src/github.com/goharbor/harbor
|
|
|
|
pwd
|
|
|
|
env
|
|
|
|
df -h
|
|
|
|
curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
|
|
|
|
chmod +x docker-compose
|
|
|
|
sudo mv docker-compose /usr/local/bin
|
|
|
|
IP=`hostname -I | awk '{print $1}'`
|
|
|
|
echo '{"insecure-registries" : ["'$IP':5000"]}' | sudo tee /etc/docker/daemon.json
|
2020-11-26 16:35:52 +01:00
|
|
|
echo "IP=$IP" >> $GITHUB_ENV
|
2020-04-29 05:42:23 +02:00
|
|
|
sudo cp ./tests/harbor_ca.crt /usr/local/share/ca-certificates/
|
|
|
|
sudo update-ca-certificates
|
|
|
|
sudo service docker restart
|
|
|
|
- name: install
|
|
|
|
run: |
|
|
|
|
cd src/github.com/goharbor/harbor
|
|
|
|
env
|
|
|
|
df -h
|
|
|
|
bash ./tests/showtime.sh ./tests/ci/api_common_install.sh $IP DB
|
|
|
|
- name: script
|
|
|
|
run: |
|
|
|
|
echo IP: $IP
|
|
|
|
df -h
|
|
|
|
cd src/github.com/goharbor/harbor
|
|
|
|
bash ./tests/showtime.sh ./tests/ci/conformance_test.sh $IP
|
|
|
|
df -h
|
|
|
|
- name: upload test result to gs
|
|
|
|
run: |
|
2020-05-07 05:29:25 +02:00
|
|
|
cd src/github.com/goharbor/harbor
|
|
|
|
gsutil cp ./distribution-spec/conformance/report.html gs://harbor-conformance-test/report.html
|
2020-04-29 05:42:23 +02:00
|
|
|
gsutil acl ch -u AllUsers:R gs://harbor-conformance-test/report.html
|
|
|
|
if: always()
|