ci: fix conformance and e2e workflows
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>master
							parent
							
								
									4941d83cc7
								
							
						
					
					
						commit
						6332e9631e
					
				|  | @ -8,27 +8,26 @@ jobs: | ||||||
|   run-conformance-test: |   run-conformance-test: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
|       - name: set up docker |       - | ||||||
|         uses: docker-practice/actions-setup-docker@0.0.1 |         name: Checkout | ||||||
|  |         uses: actions/checkout@v2 | ||||||
|         with: |         with: | ||||||
|           docker_version: 18.09 |           fetch-depth: 0 | ||||||
|           docker_channel: stable |       - | ||||||
| 
 |         name: Build image | ||||||
|       - uses: actions/checkout@v2 |         uses: docker/bake-action@v1 | ||||||
|         with: |         with: | ||||||
|           path: src/github.com/distribution/distribution |           targets: image-local | ||||||
| 
 |       - | ||||||
|       - name: start distribution server |         name: Start distribution server | ||||||
|         working-directory: ./src/github.com/distribution/distribution |  | ||||||
|         run: | |         run: | | ||||||
|           IP=`hostname -I | awk '{print $1}'` |           IP=`hostname -I | awk '{print $1}'` | ||||||
|           echo "IP=$IP" >> $GITHUB_ENV |           echo "IP=$IP" >> $GITHUB_ENV | ||||||
|           echo "OCI_ROOT_URL=http://$IP:5000" >> $GITHUB_ENV |           echo "OCI_ROOT_URL=http://$IP:5000" >> $GITHUB_ENV | ||||||
|           DISTRIBUTION_REF="local-distribution:v$(date +%Y%m%d%H%M%S)" |           DISTRIBUTION_REF="registry:local" | ||||||
|           docker build -f ./Dockerfile -t "${DISTRIBUTION_REF}" . |           docker run --rm -p 5000:5000 -e REGISTRY_STORAGE_DELETE_ENABLED=true -idt "registry:local" | ||||||
|           docker run --rm -p 5000:5000 -e REGISTRY_STORAGE_DELETE_ENABLED=true -idt "${DISTRIBUTION_REF}" |       - | ||||||
| 
 |         name: Run OCI Distribution Spec conformance tests | ||||||
|       - name: Run OCI Distribution Spec conformance tests |  | ||||||
|         uses: opencontainers/distribution-spec@main |         uses: opencontainers/distribution-spec@main | ||||||
|         env: |         env: | ||||||
|           OCI_ROOT_URL: ${{ env.OCI_ROOT_URL }} |           OCI_ROOT_URL: ${{ env.OCI_ROOT_URL }} | ||||||
|  |  | ||||||
|  | @ -12,28 +12,25 @@ jobs: | ||||||
|   run-e2e-test: |   run-e2e-test: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
|       - name: set up docker |       - | ||||||
|         uses: docker-practice/actions-setup-docker@0.0.1 |         name: Checkout | ||||||
|  |         uses: actions/checkout@v2 | ||||||
|         with: |         with: | ||||||
|           docker_version: 18.09 |           fetch-depth: 0 | ||||||
|           docker_channel: stable |       - | ||||||
| 
 |         name: Build image | ||||||
|       - name: checkout distribution |         uses: docker/bake-action@v1 | ||||||
|         uses: actions/checkout@master |  | ||||||
|         with: |         with: | ||||||
|           path: main |           targets: image-local | ||||||
| 
 |       - | ||||||
|       - name: start distribution server |         name: Start distribution server | ||||||
|         run: | |         run: | | ||||||
|           IP=`hostname -I | awk '{print $1}'` |           IP=`hostname -I | awk '{print $1}'` | ||||||
|           echo "IP=$IP" >> $GITHUB_ENV |           echo "IP=$IP" >> $GITHUB_ENV | ||||||
|           echo '{"insecure-registries" : ["'$IP':5000"]}' | sudo tee /etc/docker/daemon.json |           echo '{"insecure-registries" : ["'$IP':5000"]}' | sudo tee /etc/docker/daemon.json | ||||||
|           sudo service docker restart |           sudo service docker restart | ||||||
|           DISTRIBUTION_REF="local-distribution:v$(date +%Y%m%d%H%M%S)" |           docker run --rm -p 5000:5000 -p 5001:5001 -idt "registry:local" | ||||||
|           cd ./main |       - | ||||||
|           docker build -f ./Dockerfile -t "${DISTRIBUTION_REF}" . |         name: Tests | ||||||
|           docker run --rm -p 5000:5000 -p 5001:5001 -idt "${DISTRIBUTION_REF}" |  | ||||||
| 
 |  | ||||||
|       - name: script |  | ||||||
|         run: | |         run: | | ||||||
|           bash ./main/tests/push.sh $IP |           bash ./tests/push.sh $IP | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue