2022-02-04 12:44:16 -05:00
|
|
|
name: "Ecosystem client tools"
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- published
|
|
|
|
|
2022-07-16 18:22:38 -05:00
|
|
|
permissions: read-all
|
|
|
|
|
2022-02-04 12:44:16 -05:00
|
|
|
jobs:
|
|
|
|
client-tools:
|
|
|
|
name: Check client tools
|
2023-11-15 13:44:31 -05:00
|
|
|
runs-on: ubuntu-latest-16-cores
|
2022-02-04 12:44:16 -05:00
|
|
|
steps:
|
2023-09-05 14:30:49 -05:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-12 05:44:28 -05:00
|
|
|
- uses: actions/setup-go@v5
|
2022-02-04 12:44:16 -05:00
|
|
|
with:
|
2023-03-22 14:33:21 -05:00
|
|
|
cache: false
|
2024-03-20 13:53:11 -05:00
|
|
|
go-version: 1.22.x
|
2022-02-04 12:44:16 -05:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE
|
2024-02-07 13:54:28 -05:00
|
|
|
go install github.com/swaggo/swag/cmd/swag@v1.16.2
|
2022-02-04 12:44:16 -05:00
|
|
|
go mod download
|
|
|
|
sudo apt-get update
|
2022-08-20 03:18:48 -05:00
|
|
|
sudo apt-get install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev pkg-config rpm uidmap
|
2022-02-04 12:44:16 -05:00
|
|
|
# install skopeo
|
2023-06-16 02:28:43 -05:00
|
|
|
git clone -b v1.12.0 https://github.com/containers/skopeo.git
|
2022-08-20 03:18:48 -05:00
|
|
|
cd skopeo
|
|
|
|
make bin/skopeo
|
|
|
|
sudo cp bin/skopeo /usr/bin
|
|
|
|
skopeo -v
|
2023-04-13 15:47:38 -05:00
|
|
|
# install cri-o (for crictl)
|
2023-11-15 13:13:20 -05:00
|
|
|
OS=xUbuntu_22.04
|
2023-04-13 15:47:38 -05:00
|
|
|
CRIO_VERSION=1.26
|
|
|
|
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /"|sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
|
2023-11-15 13:13:20 -05:00
|
|
|
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/ /"|sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$CRIO_VERSION.list
|
2023-05-23 09:01:10 -05:00
|
|
|
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$CRIO_VERSION/$OS/Release.key | sudo apt-key add -
|
2023-04-13 15:47:38 -05:00
|
|
|
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | sudo apt-key add -
|
|
|
|
sudo apt update
|
|
|
|
sudo apt install -y cri-o cri-o-runc
|
|
|
|
sudo systemctl enable crio.service
|
|
|
|
sudo systemctl start crio.service
|
|
|
|
sudo chmod 0777 /var/run/crio/crio.sock
|
2023-07-07 11:27:10 -05:00
|
|
|
# install dex
|
|
|
|
git clone https://github.com/dexidp/dex.git
|
|
|
|
cd dex/
|
|
|
|
make bin/dex
|
|
|
|
./bin/dex serve $GITHUB_WORKSPACE/test/dex/config-dev.yaml &
|
|
|
|
cd $GITHUB_WORKSPACE
|
2023-09-07 13:06:21 -05:00
|
|
|
- name: Run CI tests
|
2023-03-10 13:37:29 -05:00
|
|
|
run: |
|
2023-09-07 13:06:21 -05:00
|
|
|
make run-blackbox-ci
|
2023-09-29 03:40:46 -05:00
|
|
|
- name: Log in to GitHub Docker Registry
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ github.token }}
|
2024-04-19 02:08:36 -05:00
|
|
|
- uses: actions/setup-python@v5
|
|
|
|
with:
|
|
|
|
python-version: '3.11'
|
2022-11-22 13:29:57 -05:00
|
|
|
- name: Install localstack
|
|
|
|
run: |
|
|
|
|
pip install --upgrade pyopenssl
|
2024-04-19 02:08:36 -05:00
|
|
|
pip install localstack==3.3.0 awscli-local[ver1] # install LocalStack cli and awslocal
|
|
|
|
docker pull ghcr.io/project-zot/ci-images/localstack:3.3.0 # Make sure to pull a working version of the image
|
2022-11-22 13:29:57 -05:00
|
|
|
localstack start -d # Start LocalStack in the background
|
2023-08-23 11:21:43 -05:00
|
|
|
|
2022-11-22 13:29:57 -05:00
|
|
|
echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container
|
2023-08-23 11:21:43 -05:00
|
|
|
localstack wait -t 30 # to become ready before timing out
|
|
|
|
echo "Startup complete"
|
2022-11-22 13:29:57 -05:00
|
|
|
- name: Run cloud-only tests
|
|
|
|
run: |
|
2023-09-07 13:06:21 -05:00
|
|
|
make run-blackbox-cloud-ci
|
2022-11-22 13:29:57 -05:00
|
|
|
env:
|
|
|
|
AWS_ACCESS_KEY_ID: fake
|
|
|
|
AWS_SECRET_ACCESS_KEY: fake
|
2023-09-28 13:59:52 -05:00
|
|
|
- uses: ./.github/actions/teardown-localstack
|