Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOTFIX S3C 7.10.8] UTAPI-102 Migrate to ghcr #1303

Merged
merged 8 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/docker/vault/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
FROM registry.scality.com/vault-dev/vault:c2607856
FROM ghcr.io/scality/vault:c2607856

ENV VAULT_DB_BACKEND LEVELDB

RUN chmod 400 tests/utils/keyfile

ENTRYPOINT yarn start

34 changes: 11 additions & 23 deletions .github/workflows/build-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,36 @@ name: build-ci-images

on:
workflow_call:
secrets:
REGISTRY_LOGIN:
required: true
REGISTRY_PASSWORD:
required: true

jobs:
warp10-ci:
uses: scality/workflows/.github/workflows/docker-build.yaml@v1
uses: scality/workflows/.github/workflows/docker-build.yaml@v2
secrets:
REGISTRY_LOGIN: ${{ github.repository_owner }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
REGISTRY_PASSWORD: ${{ github.token }}
with:
name: warp10-ci
context: .
file: images/warp10/Dockerfile
lfs: true

redis-ci:
uses: scality/workflows/.github/workflows/docker-build.yaml@v1
uses: scality/workflows/.github/workflows/docker-build.yaml@v2
secrets:
REGISTRY_LOGIN: ${{ github.repository_owner }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
REGISTRY_PASSWORD: ${{ github.token }}
with:
name: redis-ci
context: .
file: images/redis/Dockerfile

redis-replica-ci:
uses: scality/workflows/.github/workflows/docker-build.yaml@v1
uses: scality/workflows/.github/workflows/docker-build.yaml@v2
needs:
- redis-ci
secrets:
REGISTRY_LOGIN: ${{ github.repository_owner }}
REGISTRY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
REGISTRY_PASSWORD: ${{ github.token }}
with:
name: redis-replica-ci
context: .github/docker/redis-replica
Expand All @@ -47,28 +42,21 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4
with:
lfs: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Registry
uses: docker/login-action@v1.10.0
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Scality Registry
uses: docker/[email protected]
with:
registry: registry.scality.com
username: ${{ secrets.REGISTRY_LOGIN }}
password: ${{ secrets.REGISTRY_PASSWORD }}
password: ${{ github.token }}

- name: Build and push vault Image
uses: docker/build-push-action@v2.7.0
uses: docker/build-push-action@v5
with:
push: true
context: .github/docker/vault
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/build-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ on:

jobs:
build-dev:
uses: scality/workflows/.github/workflows/docker-build.yaml@v1
secrets: inherit
uses: scality/workflows/.github/workflows/docker-build.yaml@v2
secrets:
REGISTRY_LOGIN: ${{ github.repository_owner }}
REGISTRY_PASSWORD: ${{ github.token }}
with:
registry: registry.scality.com
namespace: utapi-dev
name: utapi
namespace: ${{ github.repository_owner }}
name: ${{ github.event.repository.name }}
8 changes: 3 additions & 5 deletions .github/workflows/release-warp10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ on:

jobs:
build:
uses: scality/workflows/.github/workflows/docker-build.yaml@v1
uses: scality/workflows/.github/workflows/docker-build.yaml@v2
secrets: inherit
with:
registry: registry.scality.com
namespace: utapi
name: warp10
context: .
file: images/warp10/Dockerfile
Expand All @@ -31,11 +29,11 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: softprops/action-gh-release@v1
- uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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
generate_release_notes: false
target_commitish: ${{ github.sha }}
11 changes: 5 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@ on:

jobs:
build:
uses: scality/workflows/.github/workflows/docker-build.yaml@v1
uses: scality/workflows/.github/workflows/docker-build.yaml@v2
secrets: inherit
with:
registry: registry.scality.com
namespace: utapi
name: utapi
namespace: ${{ github.repository_owner }}
name: ${{ github.event.repository.name }}
context: .
file: ${{ github.event.inputs.dockerfile}}
tag: ${{ github.event.inputs.tag }}
Expand All @@ -37,9 +36,9 @@ jobs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: softprops/action-gh-release@v1
- uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
with:
name: Release ${{ github.event.inputs.tag }}
tag_name: ${{ github.event.inputs.tag }}
Expand Down
78 changes: 37 additions & 41 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,15 @@ on:
jobs:
build-ci:
uses: ./.github/workflows/build-ci.yaml
secrets:
REGISTRY_LOGIN: ${{ secrets.REGISTRY_LOGIN }}
REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }}

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '16.13.2'
cache: yarn
Expand Down Expand Up @@ -110,24 +107,19 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '16.13.2'
cache: yarn
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
cache: pip
- name: Install python deps
run: |
pip install requests
pip install redis
run: pip install -r requirements.txt
- name: install dependencies
run: yarn install --frozen-lockfile --network-concurrency 1
- name: ${{ matrix.test.name }}
Expand Down Expand Up @@ -204,24 +196,19 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '16.13.2'
cache: yarn
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
cache: pip
- name: Install python deps
run: |
pip install requests
pip install redis
run: pip install -r requirements.txt
- name: install dependencies
run: yarn install --frozen-lockfile --network-concurrency 1
- name: Wait for warp10 for 60 seconds
Expand All @@ -233,9 +220,16 @@ jobs:
UTAPI_SERVICE_USER_ENABLED: 'true'
UTAPI_LOG_LEVEL: trace
SETUP_CMD: "run start_v2:server"
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: failure()
- name: 'Debug: SSH to runner'
uses: scality/actions/[email protected]
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:
needs:
Expand Down Expand Up @@ -323,31 +317,33 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
lfs: true
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: '16.13.2'
cache: yarn
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
cache: pip
- name: Install python deps
run: |
pip install requests
pip install redis
run: pip install -r requirements.txt
- name: install dependencies
run: yarn install --frozen-lockfile --network-concurrency 1
- name: Wait for warp10 a little bit
run: sleep 60
- name: ${{ matrix.test.name }}
run: ${{ matrix.test.command }}
env: ${{ matrix.test.env }}
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: failure()
- name: 'Debug: SSH to runner'
uses: scality/actions/[email protected]
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' ) }}
2 changes: 1 addition & 1 deletion images/nodesvc-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion images/warp10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apk add zip unzip build-base \
&& cd .. \
&& 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
# Remove when updating to a numbered release
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
redis==5.0.3
requests==2.31.0
Loading