Compare commits

...

8 Commits

Author SHA1 Message Date
Mickael Bourgois 686ca63605
Revert "UTAPI-98 Bump Redis version"
This reverts commit 8804e9ff69.

This change was included in merging #1300 on dev/7.10
We don't want it on hotfix branch
If we want it we need to cherry-pick the whole commit
2024-05-28 10:40:15 +02:00
Francois Ferrand a62d3e77a6
Fix caching of python packages
Issue: UTAPI-99
(cherry picked from commit 6e0ec16f00)
2024-05-27 19:46:15 +02:00
Francois Ferrand de18dbd3de
Bump github actions
- docker-build@v2
- checkout@v4
- setup-buildx@v3
- setup-node@v4
- setup-python@v5
- login@v3
- build-push@v5
- gh-release@v2
- ssh-to-runner@1.7.0

Issue: UTAPI-99
(cherry picked from commit 4449f44c9a)
2024-05-27 19:46:14 +02:00
Francois Ferrand 239f653b97
Migrate to ghcr
Issue: UTAPI-99
(cherry picked from commit c4e786d6cd)
2024-05-27 19:46:14 +02:00
Francois Ferrand 6c6ef675b2
Merge branch 'improvement/UTAPI-99' into w/7.10/improvement/VAULT-567
(cherry picked from commit bdb483e6b4)
2024-05-27 19:46:14 +02:00
Francois Ferrand 385e6eb17c
Fix caching of python packages
Issue: UTAPI-99
(cherry picked from commit 20916c6f0e)
2024-05-27 19:46:14 +02:00
Francois Ferrand 93d77fc514
Bump github actions
- checkout@v4
- setup-qemu@v3
- setup-buildx@v3
- setup-node@v4
- setup-python@v5
- login@v3
- build-push@v5
- gh-release@v2

Issue: UTAPI-99
(cherry picked from commit 5976018d0e)
2024-05-27 19:46:13 +02:00
Francois Ferrand 56bb590792
Migrate to ghcr
Issue: UTAPI-99
(cherry picked from commit 9e1f14ed17)
2024-05-27 19:46:13 +02:00
9 changed files with 67 additions and 84 deletions

View File

@ -1,8 +1,7 @@
FROM registry.scality.com/vault-dev/vault:c2607856 FROM ghcr.io/scality/vault:c2607856
ENV VAULT_DB_BACKEND LEVELDB ENV VAULT_DB_BACKEND LEVELDB
RUN chmod 400 tests/utils/keyfile RUN chmod 400 tests/utils/keyfile
ENTRYPOINT yarn start ENTRYPOINT yarn start

View File

@ -2,18 +2,13 @@ name: build-ci-images
on: on:
workflow_call: workflow_call:
secrets:
REGISTRY_LOGIN:
required: true
REGISTRY_PASSWORD:
required: true
jobs: jobs:
warp10-ci: warp10-ci:
uses: scality/workflows/.github/workflows/docker-build.yaml@v1 uses: scality/workflows/.github/workflows/docker-build.yaml@v2
secrets: secrets:
REGISTRY_LOGIN: ${{ github.repository_owner }} REGISTRY_LOGIN: ${{ github.repository_owner }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} REGISTRY_PASSWORD: ${{ github.token }}
with: with:
name: warp10-ci name: warp10-ci
context: . context: .
@ -21,22 +16,22 @@ jobs:
lfs: true lfs: true
redis-ci: redis-ci:
uses: scality/workflows/.github/workflows/docker-build.yaml@v1 uses: scality/workflows/.github/workflows/docker-build.yaml@v2
secrets: secrets:
REGISTRY_LOGIN: ${{ github.repository_owner }} REGISTRY_LOGIN: ${{ github.repository_owner }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} REGISTRY_PASSWORD: ${{ github.token }}
with: with:
name: redis-ci name: redis-ci
context: . context: .
file: images/redis/Dockerfile file: images/redis/Dockerfile
redis-replica-ci: redis-replica-ci:
uses: scality/workflows/.github/workflows/docker-build.yaml@v1 uses: scality/workflows/.github/workflows/docker-build.yaml@v2
needs: needs:
- redis-ci - redis-ci
secrets: secrets:
REGISTRY_LOGIN: ${{ github.repository_owner }} REGISTRY_LOGIN: ${{ github.repository_owner }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }} REGISTRY_PASSWORD: ${{ github.token }}
with: with:
name: redis-replica-ci name: redis-replica-ci
context: .github/docker/redis-replica context: .github/docker/redis-replica
@ -47,28 +42,21 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2.3.4 uses: actions/checkout@v4
with: with:
lfs: true lfs: true
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0 uses: docker/setup-buildx-action@v3
- name: Login to GitHub Registry - name: Login to GitHub Registry
uses: docker/login-action@v1.10.0 uses: docker/login-action@v3
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ github.token }}
- name: Login to Scality Registry
uses: docker/login-action@v1.10.0
with:
registry: registry.scality.com
username: ${{ secrets.REGISTRY_LOGIN }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push vault Image - name: Build and push vault Image
uses: docker/build-push-action@v2.7.0 uses: docker/build-push-action@v5
with: with:
push: true push: true
context: .github/docker/vault context: .github/docker/vault

View File

@ -7,9 +7,10 @@ on:
jobs: jobs:
build-dev: build-dev:
uses: scality/workflows/.github/workflows/docker-build.yaml@v1 uses: scality/workflows/.github/workflows/docker-build.yaml@v2
secrets: inherit secrets:
REGISTRY_LOGIN: ${{ github.repository_owner }}
REGISTRY_PASSWORD: ${{ github.token }}
with: with:
registry: registry.scality.com namespace: ${{ github.repository_owner }}
namespace: utapi-dev name: ${{ github.event.repository.name }}
name: utapi

View File

@ -15,11 +15,9 @@ on:
jobs: jobs:
build: build:
uses: scality/workflows/.github/workflows/docker-build.yaml@v1 uses: scality/workflows/.github/workflows/docker-build.yaml@v2
secrets: inherit secrets: inherit
with: with:
registry: registry.scality.com
namespace: utapi
name: warp10 name: warp10
context: . context: .
file: images/warp10/Dockerfile file: images/warp10/Dockerfile
@ -31,11 +29,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
steps: steps:
- uses: softprops/action-gh-release@v1 - uses: softprops/action-gh-release@v2
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
name: Release registry.scality.com/utapi/warp10:${{ github.event.inputs.tag }}-warp10 name: Release utapi/warp10:${{ github.event.inputs.tag }}-warp10
tag_name: ${{ github.event.inputs.tag }}-warp10 tag_name: ${{ github.event.inputs.tag }}-warp10
generate_release_notes: false generate_release_notes: false
target_commitish: ${{ github.sha }} target_commitish: ${{ github.sha }}

View File

@ -22,12 +22,11 @@ on:
jobs: jobs:
build: build:
uses: scality/workflows/.github/workflows/docker-build.yaml@v1 uses: scality/workflows/.github/workflows/docker-build.yaml@v2
secrets: inherit secrets: inherit
with: with:
registry: registry.scality.com namespace: ${{ github.repository_owner }}
namespace: utapi name: ${{ github.event.repository.name }}
name: utapi
context: . context: .
file: ${{ github.event.inputs.dockerfile}} file: ${{ github.event.inputs.dockerfile}}
tag: ${{ github.event.inputs.tag }} tag: ${{ github.event.inputs.tag }}
@ -37,9 +36,9 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
steps: steps:
- uses: softprops/action-gh-release@v1 - uses: softprops/action-gh-release@v2
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ github.token }}
with: with:
name: Release ${{ github.event.inputs.tag }} name: Release ${{ github.event.inputs.tag }}
tag_name: ${{ github.event.inputs.tag }} tag_name: ${{ github.event.inputs.tag }}

View File

@ -9,18 +9,15 @@ on:
jobs: jobs:
build-ci: build-ci:
uses: ./.github/workflows/build-ci.yaml uses: ./.github/workflows/build-ci.yaml
secrets:
REGISTRY_LOGIN: ${{ secrets.REGISTRY_LOGIN }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
lfs: true lfs: true
- uses: actions/setup-node@v2 - uses: actions/setup-node@v4
with: with:
node-version: '16.13.2' node-version: '16.13.2'
cache: yarn cache: yarn
@ -110,24 +107,19 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
lfs: true lfs: true
- uses: actions/setup-node@v2 - uses: actions/setup-node@v4
with: with:
node-version: '16.13.2' node-version: '16.13.2'
cache: yarn cache: yarn
- uses: actions/setup-python@v2 - uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: '3.9'
- uses: actions/cache@v2 cache: pip
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
- name: Install python deps - name: Install python deps
run: | run: pip install -r requirements.txt
pip install requests
pip install redis
- name: install dependencies - name: install dependencies
run: yarn install --frozen-lockfile --network-concurrency 1 run: yarn install --frozen-lockfile --network-concurrency 1
- name: ${{ matrix.test.name }} - name: ${{ matrix.test.name }}
@ -204,24 +196,19 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
lfs: true lfs: true
- uses: actions/setup-node@v2 - uses: actions/setup-node@v4
with: with:
node-version: '16.13.2' node-version: '16.13.2'
cache: yarn cache: yarn
- uses: actions/setup-python@v2 - uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: '3.9'
- uses: actions/cache@v2 cache: pip
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
- name: Install python deps - name: Install python deps
run: | run: pip install -r requirements.txt
pip install requests
pip install redis
- name: install dependencies - name: install dependencies
run: yarn install --frozen-lockfile --network-concurrency 1 run: yarn install --frozen-lockfile --network-concurrency 1
- name: Wait for warp10 for 60 seconds - name: Wait for warp10 for 60 seconds
@ -233,9 +220,16 @@ jobs:
UTAPI_SERVICE_USER_ENABLED: 'true' UTAPI_SERVICE_USER_ENABLED: 'true'
UTAPI_LOG_LEVEL: trace UTAPI_LOG_LEVEL: trace
SETUP_CMD: "run start_v2:server" SETUP_CMD: "run start_v2:server"
- name: Setup tmate session - name: 'Debug: SSH to runner'
uses: mxschmitt/action-tmate@v3 uses: scality/actions/action-ssh-to-runner@1.7.0
if: failure() timeout-minutes: ${{ fromJSON(github.event.inputs.connection-timeout-m) }}
continue-on-error: true
with:
tmate-server-host: ${{ secrets.TMATE_SERVER_HOST }}
tmate-server-port: ${{ secrets.TMATE_SERVER_PORT }}
tmate-server-rsa-fingerprint: ${{ secrets.TMATE_SERVER_RSA_FINGERPRINT }}
tmate-server-ed25519-fingerprint: ${{ secrets.TMATE_SERVER_ED25519_FINGERPRINT }}
if: ${{ ( github.event.inputs.debug == true || github.event.inputs.debug == 'true' ) }}
tests-v2-without-sensision: tests-v2-without-sensision:
needs: needs:
@ -323,24 +317,19 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
lfs: true lfs: true
- uses: actions/setup-node@v2 - uses: actions/setup-node@v4
with: with:
node-version: '16.13.2' node-version: '16.13.2'
cache: yarn cache: yarn
- uses: actions/setup-python@v2 - uses: actions/setup-python@v5
with: with:
python-version: '3.9' python-version: '3.9'
- uses: actions/cache@v2 cache: pip
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
- name: Install python deps - name: Install python deps
run: | run: pip install -r requirements.txt
pip install requests
pip install redis
- name: install dependencies - name: install dependencies
run: yarn install --frozen-lockfile --network-concurrency 1 run: yarn install --frozen-lockfile --network-concurrency 1
- name: Wait for warp10 a little bit - name: Wait for warp10 a little bit
@ -348,6 +337,13 @@ jobs:
- name: ${{ matrix.test.name }} - name: ${{ matrix.test.name }}
run: ${{ matrix.test.command }} run: ${{ matrix.test.command }}
env: ${{ matrix.test.env }} env: ${{ matrix.test.env }}
- name: Setup tmate session - name: 'Debug: SSH to runner'
uses: mxschmitt/action-tmate@v3 uses: scality/actions/action-ssh-to-runner@1.7.0
if: failure() timeout-minutes: ${{ fromJSON(github.event.inputs.connection-timeout-m) }}
continue-on-error: true
with:
tmate-server-host: ${{ secrets.TMATE_SERVER_HOST }}
tmate-server-port: ${{ secrets.TMATE_SERVER_PORT }}
tmate-server-rsa-fingerprint: ${{ secrets.TMATE_SERVER_RSA_FINGERPRINT }}
tmate-server-ed25519-fingerprint: ${{ secrets.TMATE_SERVER_ED25519_FINGERPRINT }}
if: ${{ ( github.event.inputs.debug == true || github.event.inputs.debug == 'true' ) }}

View File

@ -1,4 +1,4 @@
FROM registry.scality.com/federation/nodesvc-base:7.10.5.0 FROM ghcr.io/scality/federation/nodesvc-base:7.10.5.0
ENV UTAPI_CONFIG_FILE=${CONF_DIR}/config.json ENV UTAPI_CONFIG_FILE=${CONF_DIR}/config.json

View File

@ -13,7 +13,7 @@ RUN apk add zip unzip build-base \
&& cd .. \ && cd .. \
&& go build -a -o /usr/local/go/warp10_sensision_exporter && go build -a -o /usr/local/go/warp10_sensision_exporter
FROM registry.scality.com/utapi/warp10:2.8.1-95-g73e7de80 FROM ghcr.io/scality/utapi/warp10:2.8.1-95-g73e7de80
# Override baked in version # Override baked in version
# Remove when updating to a numbered release # Remove when updating to a numbered release

2
requirements.txt Normal file
View File

@ -0,0 +1,2 @@
redis==5.0.3
requests==2.31.0