Skip to content

Commit fadff37

Browse files
Merge branch 'improvement/S3UTILS-159' into w/1.14/improvement/S3UTILS-159
2 parents 9ac860c + 332b653 commit fadff37

File tree

9 files changed

+48
-64
lines changed

9 files changed

+48
-64
lines changed

.github/workflows/alerts.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212

1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616

1717
- name: Render and test count-items-cronjob
18-
uses: scality/[email protected].2
18+
uses: scality/[email protected].3
1919
with:
2020
alert_file_path: monitoring/count-items-cronjob/alerts.yaml
2121
test_file_path: monitoring/count-items-cronjob/alerts.test.yaml
@@ -24,7 +24,7 @@ jobs:
2424
github_token: ${{ secrets.GIT_ACCESS_TOKEN }}
2525

2626
- name: Render and test update-bucket-capacity-info-cronjob
27-
uses: scality/[email protected].2
27+
uses: scality/[email protected].3
2828
with:
2929
alert_file_path: monitoring/update-bucket-capacity-info-cronjob/alerts.yaml
3030
test_file_path: monitoring/update-bucket-capacity-info-cronjob/alerts.test.yaml

.github/workflows/build.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,56 +3,49 @@ name: build
33
on:
44
workflow_call:
55
inputs:
6-
namespace:
7-
required: false
8-
type: string
9-
default: s3utils-dev
106
tag:
117
required: false
128
type: string
139
default: "${{ github.sha }}"
1410

1511
env:
16-
REGISTRY_NAME: registry.scality.com
1712
PROJECT_NAME: ${{ github.event.repository.name }}
18-
NAMESPACE: ${{ inputs.namespace }}
19-
TAG: ${{ inputs.tag }}
2013

2114
jobs:
2215
build:
2316
name: Build and Push
2417
runs-on: ubuntu-latest
2518
steps:
2619
- name: Checkout
27-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2821

2922
- name: Set up QEMU
30-
uses: docker/setup-qemu-action@v2
23+
uses: docker/setup-qemu-action@v3
3124

3225
- name: Set up Docker Buildx
33-
uses: docker/setup-buildx-action@v2
26+
uses: docker/setup-buildx-action@v3
3427

3528
- name: Login to Registry
36-
uses: docker/login-action@v2
29+
uses: docker/login-action@v3
3730
with:
38-
registry: registry.scality.com
39-
username: ${{ secrets.REGISTRY_LOGIN }}
40-
password: ${{ secrets.REGISTRY_PASSWORD }}
31+
registry: ghcr.io
32+
username: ${{ github.repository_owner }}
33+
password: ${{ github.token }}
4134

4235
- name: Push dashboards into the development namespace
4336
run: |
44-
oras push ${{ env.REGISTRY_NAME }}/${{ env.NAMESPACE }}/${{ env.PROJECT_NAME }}-dashboards:${{ env.TAG }} \
37+
oras push ghcr.io/${{ github.repository }}/${{ env.PROJECT_NAME }}-dashboards:${{ inputs.tag }} \
4538
count-items-cronjob/alerts.yaml:application/prometheus-alerts+yaml \
4639
update-bucket-capacity-info-cronjob/alerts.yaml:application/prometheus-alerts+yaml
4740
working-directory: monitoring
4841

4942
- name: Build and push
50-
uses: docker/build-push-action@v4
43+
uses: docker/build-push-action@v5
5144
with:
5245
context: .
5346
file: ./Dockerfile
5447
provenance: false
5548
push: true
56-
tags: "${{ env.REGISTRY_NAME }}/${{ env.NAMESPACE }}/${{ env.PROJECT_NAME }}:${{ env.TAG }}"
49+
tags: ghcr.io/${{ github.repository }}:${{ inputs.tag }}
5750
cache-from: type=gha
5851
cache-to: type=gha,mode=max

.github/workflows/codeql.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout code
17-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1818

1919
- name: Initialize CodeQL
20-
uses: github/codeql-action/init@v2
20+
uses: github/codeql-action/init@v3
2121
with:
2222
languages: javascript, python
2323

2424
- name: Build and analyze
25-
uses: github/codeql-action/analyze@v2
25+
uses: github/codeql-action/analyze@v3

.github/workflows/dependency-review.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: 'Checkout Repository'
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v4
1414

1515
- name: 'Dependency Review'
16-
uses: actions/dependency-review-action@v3
16+
uses: actions/dependency-review-action@v4

.github/workflows/release.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,13 @@ on:
1212
required: false
1313

1414
env:
15-
REGISTRY_NAME: registry.scality.com
1615
PROJECT_NAME: ${{ github.event.repository.name }}
1716

1817
jobs:
1918
build:
2019
name: Build and Push
2120
uses: ./.github/workflows/build.yml
2221
with:
23-
namespace: s3utils
2422
tag: ${{ github.event.inputs.tag }}
2523
secrets: inherit
2624

@@ -31,7 +29,7 @@ jobs:
3129
- build
3230
steps:
3331
- name: Create Release
34-
uses: softprops/action-gh-release@v1
32+
uses: softprops/action-gh-release@v2
3533
env:
3634
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3735
with:

.github/workflows/security.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ jobs:
2323
trivy:
2424
needs: build
2525
name: Trivy Vulnerability Scan for Code
26-
uses: scality/workflows/.github/workflows/trivy.yaml@v1
26+
uses: scality/workflows/.github/workflows/trivy.yaml@v2
2727
with:
2828
name: ${{ github.event.repository.name }}
29-
namespace: s3utils-dev
30-
registry: registry.scality.com
29+
namespace: scality

.github/workflows/test.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ concurrency:
1212

1313
env:
1414
PROJECT_NAME: ${{ github.event.repository.name }}
15-
NAMESPACE: ${{ inputs.namespace }}
16-
TAG: ${{ inputs.tag }}
1715

1816
jobs:
1917
prepare:
@@ -24,44 +22,42 @@ jobs:
2422
packages: write
2523
steps:
2624
- name: Checkout
27-
uses: actions/checkout@v3
25+
uses: actions/checkout@v4
2826

2927
- name: Set up Docker Buildk
30-
uses: docker/setup-buildx-action@v2
31-
with:
32-
buildkitd-flags: --debug
28+
uses: docker/setup-buildx-action@v3
3329

3430
- name: Login to Registry
35-
uses: docker/login-action@v2
31+
uses: docker/login-action@v3
3632
with:
3733
registry: ghcr.io
3834
username: ${{ github.repository_owner }}
39-
password: ${{ secrets.GITHUB_TOKEN }}
35+
password: ${{ github.token }}
4036

4137
- name: Build and push MongoDB
42-
uses: docker/build-push-action@v4
38+
uses: docker/build-push-action@v5
4339
with:
4440
push: true
4541
context: .github/dockerfiles/mongodb
46-
tags: "ghcr.io/scality/s3utils/ci-mongodb:${{ github.sha }}"
47-
cache-from: type=gha
48-
cache-to: type=gha,mode=max
42+
tags: ghcr.io/${{ github.repository }}/ci-mongodb:${{ github.sha }}
43+
cache-from: type=gha,scope=ci-mongodb
44+
cache-to: type=gha,mode=max,scope=ci-mongodb
4945

5046
tests:
5147
needs: prepare
5248
runs-on: ubuntu-latest
5349
services:
5450
mongodb:
55-
image: ghcr.io/scality/s3utils/ci-mongodb:${{ github.sha }}
51+
image: ghcr.io/${{ github.repository }}/ci-mongodb:${{ github.sha }}
5652
ports:
5753
- 27017:27017
5854
- 27018:27018
5955
- 27019:27019
6056
steps:
6157
- name: Checkout
62-
uses: actions/checkout@v3
58+
uses: actions/checkout@v4
6359
- name: Install node
64-
uses: actions/setup-node@v3
60+
uses: actions/setup-node@v4
6561
with:
6662
node-version: '16'
6763
cache: 'yarn'
@@ -79,5 +75,3 @@ jobs:
7975
- tests
8076
uses: ./.github/workflows/build.yml
8177
secrets: inherit
82-
with:
83-
namespace: s3utils-dev

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ S3 Connector and Zenko Utilities
44
Run the Docker container as (replace `<tag>` with the tag of s3utils image to be used)
55
```
66
docker run --net=host -e 'ACCESS_KEY=accessKey' -e 'SECRET_KEY=secretKey' -e 'ENDPOINT=http://127.0.0.1:8000' -e 'REPLICATION_GROUP_ID=RG001'
7-
registry.scality.com/s3utils/s3utils:<tag> node scriptName bucket1[,bucket2...]
7+
ghcr.io/scality/s3utils:<tag> node scriptName bucket1[,bucket2...]
88
```
99

1010
## Trigger CRR on existing objects
@@ -294,7 +294,7 @@ node verifyBucketSproxydKeys.js
294294
-e 'BUCKETD_HOSTPORT=127.0.0.1:9000' \
295295
-e 'SPROXYD_HOSTPORT=127.0.0.1:8181' \
296296
-e 'RAFT_SESSIONS=1' \
297-
registry.scality.com/s3utils/s3utils:1.12.5 \
297+
ghcr.io/scality/s3utils:1.12.5 \
298298
node verifyBucketSproxydKeys.js
299299
```
300300
@@ -311,7 +311,7 @@ node verifyBucketSproxydKeys.js
311311
-e 'SPROXYD_HOSTPORT=127.0.0.1:8181' \
312312
-e 'BUCKETD_HOSTPORT=127.0.0.1:9000' \
313313
-e 'KEYS_FROM_STDIN=1' \
314-
registry.scality.com/s3utils/s3utils:1.12.5 \
314+
ghcr.io/scality/s3utils:1.12.5 \
315315
node verifyBucketSproxydKeys.js | tee ring_scan_raft_session_1.txt
316316
```
317317
@@ -621,7 +621,7 @@ docker run \
621621
-e 'LISTING_DIGESTS_OUTPUT_DIR=/digests' \
622622
-v "${DIGESTS_PATH}:/digests" \
623623
-e 'NO_MISSING_KEY_CHECK=1' \
624-
registry.scality.com/s3utils/s3utils:1.13.23 \
624+
ghcr.io/scality/s3utils:1.13.23 \
625625
node verifyBucketSproxydKeys.js \
626626
| tee -a verifyBucketSproxydKeys.log
627627
```
@@ -802,7 +802,7 @@ docker run --net=host --rm \
802802
-v "${PWD}/scan-results:/scan-results" \
803803
-e "DIFF_OUTPUT_FILE=/scan-results/scan-results.json" \
804804
-e "EXCLUDE_FROM_CSEQS=$(cat /tmp/rs-cseqs.json)" \
805-
registry.scality.com/s3utils/s3utils:1.13.23 \
805+
ghcr.io/scality/s3utils:1.13.23 \
806806
bash -c 'DATABASES=$(echo $DATABASES_GLOB) node CompareRaftMembers/followerDiff' \
807807
| tee -a followerDiff.log
808808

@@ -1229,7 +1229,7 @@ docker run --net=host --rm \
12291229
-v "${PWD}/scan-results:/scan-results" \
12301230
-e "DIFF_OUTPUT_FILE=/scan-results/scan-results.json" \
12311231
-e "EXCLUDE_FROM_CSEQS=$(cat /tmp/rs-cseqs.json)" \
1232-
registry.scality.com/s3utils/s3utils:1.13.23 \
1232+
ghcr.io/scality/s3utils:1.13.23 \
12331233
bash -c 'DATABASES1=$(echo $DATABASES1_GLOB) DATABASES2=$(echo $DATABASES2_GLOB) node CompareRaftMembers/compareFollowerDbs' \
12341234
| tee -a compareFollowerDbs.log
12351235

@@ -1406,7 +1406,7 @@ docker run -i --net=host --rm \
14061406
-e "BUCKETD_HOSTPORT=localhost:9000" \
14071407
-e "SPROXYD_HOSTPORT=localhost:8181" \
14081408
-e "DRY_RUN=1" \
1409-
registry.scality.com/s3utils/s3utils:1.13.23 \
1409+
ghcr.io/scality/s3utils:1.13.23 \
14101410
node CompareRaftMembers/repairObjects | tee -a repairObjects.log
14111411
```
14121412
@@ -1418,7 +1418,7 @@ cat scan-results.storage-{1..5}/scan-results.jsonl | \
14181418
docker run -i --net=host --rm \
14191419
-e "BUCKETD_HOSTPORT=localhost:9000" \
14201420
-e "SPROXYD_HOSTPORT=localhost:8181" \
1421-
registry.scality.com/s3utils/s3utils:1.13.23 \
1421+
ghcr.io/scality/s3utils:1.13.23 \
14221422
node CompareRaftMembers/repairObjects | tee -a repairObjects.log
14231423
```
14241424
@@ -1561,7 +1561,7 @@ duplicate "versionId" field found' and ignores other entries.
15611561
## Example
15621562
15631563
```
1564-
cat /tmp/verifyBucketSproxydKeys.log | docker run -i registry.scality.com/s3utils/s3utils:1.13.24 bash -c 'OBJECT_REPAIR_BUCKETD_HOSTPORT=127.0.0.1:9000 node repairDuplicateVersionIds.js' > /tmp/repairDuplicateVersionIds.log
1564+
cat /tmp/verifyBucketSproxydKeys.log | docker run -i ghcr.io/scality/s3utils:1.13.24 bash -c 'OBJECT_REPAIR_BUCKETD_HOSTPORT=127.0.0.1:9000 node repairDuplicateVersionIds.js' > /tmp/repairDuplicateVersionIds.log
15651565
```
15661566
15671567
# Cleanup Noncurrent Versions
@@ -1897,7 +1897,7 @@ The script also logs a progress update (a summary), every 10 seconds by default,
18971897
"dstBucket":"dst-bucket",
18981898
"srcBucket":"src-bucket",
18991899
"prefixFilters":["pref1","pref2"],
1900-
"skipOlderThan": "2022-11-30T00:00:00Z",
1900+
"skipOlderThan": "2022-11-30T00:00:00Z",
19011901
"level":"info",
19021902
"message":"completed replication verification",
19031903
"hostname":"scality.local",
@@ -1934,7 +1934,7 @@ docker run \
19341934
-e 'COMPARE_OBJECT_SIZE=1' \
19351935
-e 'SRC_BUCKET_PREFIXES=pref1,pref2' \
19361936
-e 'SKIP_OLDER_THAN="2022-11-30T00:00:00Z"' \
1937-
registry.scality.com/s3utils/s3utils:latest \
1937+
ghcr.io/scality/s3utils:latest \
19381938
node VerifyReplication/index.js
19391939
```
19401940

docs/RELEASE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Docker Image Generation
44

5-
Docker images are hosted on [registry.scality.com](registry.scality.com).
5+
Docker images are hosted on [ghcr.io](https://github.com/orgs/scality/packages).
66
S3utils has two namespaces there:
77

8-
* Production Namespace: registry.scality.com/s3utils
9-
* Dev Namespace: registry.scality.com/s3utils-dev
8+
* Production container image: ghcr.io/scality/s3utils
9+
* Dashboard oras image: ghcr.io/scality/s3utils/s3utils-dashboards
1010

1111
With every CI build, the CI will push images, tagging the
1212
content with the developer branch's short SHA-1 commit hash.
@@ -18,8 +18,8 @@ Tagged versions of s3utils will be stored in the production namespace.
1818
## How to Pull Docker Images
1919

2020
```sh
21-
docker pull registry.scality.com/s3utils-dev/s3utils:<commit hash>
22-
docker pull registry.scality.com/s3utils/s3utils:<tag>
21+
docker pull ghcr.io/scality/s3utils:<commit hash>
22+
docker pull ghcr.io/scality/s3utils:<tag>
2323
```
2424

2525
## Release Process

0 commit comments

Comments
 (0)