Skip to content

Commit 93a526f

Browse files
authored
Merge branch 'main' into script/CM-2073
2 parents 357303a + a437460 commit 93a526f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+2068
-2040
lines changed

.github/actions/build-docker-image/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ inputs:
99
outputs:
1010
image:
1111
description: Image that was built
12-
value: crowddotdev/${{ inputs.image }}:${{ steps.version-generator.outputs.IMAGE_VERSION }}
12+
value: sjc.ocir.io/axbydjxa5zuh/${{ inputs.image }}:${{ steps.version-generator.outputs.IMAGE_VERSION }}
1313

1414
runs:
1515
using: composite
@@ -26,7 +26,7 @@ runs:
2626

2727
- name: Login to docker repository
2828
shell: bash
29-
run: echo ${{ env.DOCKERHUB_PASSWORD }} | docker login -u ${{ env.DOCKERHUB_USERNAME }} --password-stdin
29+
run: echo '${{ env.ORACLE_DOCKER_PASSWORD }}' | docker login sjc.ocir.io -u '${{ env.ORACLE_DOCKER_USERNAME }}' --password-stdin
3030

3131
- name: Build and push docker image
3232
shell: bash

.github/actions/node/builder/index.js

Lines changed: 887 additions & 1342 deletions
Large diffs are not rendered by default.

.github/actions/node/src/inputs.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,20 @@ const getBuildInputs = (): IBuildInput => {
2121
}
2222

2323
const getPushInputs = (): IPushInput => {
24-
const username = process.env.DOCKERHUB_USERNAME
24+
const username = process.env.ORACLE_DOCKER_USERNAME
2525
if (!username) {
26-
core.error('No DockerHub username found in DOCKERHUB_USERNAME environment variable!')
27-
throw new Error('No DockerHub username found in DOCKERHUB_USERNAME environment variable!')
26+
core.error('No Oracle Docker username found in ORACLE_DOCKER_USERNAME environment variable!')
27+
throw new Error(
28+
'No Oracle Docker username found in ORACLE_DOCKER_USERNAME environment variable!',
29+
)
2830
}
2931

30-
const password = process.env.DOCKERHUB_PASSWORD
32+
const password = process.env.ORACLE_DOCKER_PASSWORD
3133
if (!password) {
32-
core.error('No DockerHub password found in DOCKERHUB_PASSWORD environment variable!')
33-
throw new Error('No DockerHub password found in DOCKERHUB_PASSWORD environment variable!')
34+
core.error('No Oracle Docker password found in ORACLE_DOCKER_PASSWORD environment variable!')
35+
throw new Error(
36+
'No Oracle Docker password found in ORACLE_DOCKER_PASSWORD environment variable!',
37+
)
3438
}
3539

3640
return {

.github/actions/node/src/steps.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export const pushStep = async (): Promise<void> => {
7171
// do a docker login
7272
const exitCode = await exec.exec('docker', [
7373
'login',
74+
'sjc.ocir.io',
7475
'--username',
7576
pushInput.dockerUsername,
7677
'--password',

.github/workflows/lf-oracle-production-deploy.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99

1010
env:
1111
CLOUD_ENV: lf-oracle-production
12-
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
13-
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
12+
ORACLE_DOCKER_USERNAME: ${{ secrets.ORACLE_DOCKER_USERNAME }}
13+
ORACLE_DOCKER_PASSWORD: ${{ secrets.ORACLE_DOCKER_PASSWORD }}
1414
ORACLE_USER: ${{ secrets.ORACLE_USER }}
1515
ORACLE_TENANT: ${{ secrets.ORACLE_TENANT }}
1616
ORACLE_REGION: ${{ secrets.ORACLE_REGION }}
@@ -23,14 +23,14 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@v2
26-
26+
2727
- name: Install OCI
2828
run: |
2929
curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh > install.sh
3030
chmod +x install.sh
3131
./install.sh --accept-all-defaults
3232
echo "OCI_CLI_DIR=/home/runner/bin" >> $GITHUB_ENV
33-
33+
3434
- name: Update PATH
3535
run: echo "${{ env.OCI_CLI_DIR }}" >> $GITHUB_PATH
3636

.github/workflows/lf-oracle-staging-deploy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99

1010
env:
1111
CLOUD_ENV: lf-oracle-staging
12-
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
13-
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
12+
ORACLE_DOCKER_USERNAME: ${{ secrets.ORACLE_DOCKER_USERNAME }}
13+
ORACLE_DOCKER_PASSWORD: ${{ secrets.ORACLE_DOCKER_PASSWORD }}
1414
ORACLE_USER: ${{ secrets.ORACLE_USER }}
1515
ORACLE_TENANT: ${{ secrets.ORACLE_TENANT }}
1616
ORACLE_REGION: ${{ secrets.ORACLE_REGION }}

CODEOWNERS

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
# frontend
44
/frontend/ @gaspergrom @Sameh16
55

6-
# backend and services
7-
/backend/ @epipav @skwowet @themarolt @joanreyero @sausage-todd
8-
/services/ @epipav @skwowet @themarolt @joanreyero @sausage-todd
9-
106
# infra
117
/.github/ @themarolt
128
/.husky/ @themarolt

backend/src/bin/jobs/syncActivities.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import cronGenerator from 'cron-time-generator'
22

3+
import { DEFAULT_TENANT_ID } from '@crowd/common'
34
import { DbStore, getDbConnection } from '@crowd/data-access-layer/src/database'
45
import { IDbActivityCreateData } from '@crowd/data-access-layer/src/old/apps/data_sink_worker/repo/activity.data'
56
import ActivityRepository from '@crowd/data-access-layer/src/old/apps/data_sink_worker/repo/activity.repo'
@@ -49,16 +50,21 @@ async function syncActivitiesBatch({
4950

5051
for (const activity of activities) {
5152
const existingActivity = await activityRepo.existsWithId(activity.id)
53+
const tenantId = DEFAULT_TENANT_ID
5254

5355
try {
5456
if (existingActivity) {
5557
await activityRepo.rawUpdate(activity.id, {
5658
...activity,
59+
tenantId,
5760
platform: activity.platform as PlatformType,
5861
})
5962
result.updated++
6063
} else {
61-
await activityRepo.rawInsert(activity)
64+
await activityRepo.rawInsert({
65+
...activity,
66+
tenantId,
67+
})
6268
result.inserted++
6369
}
6470
} catch (error) {

pnpm-lock.yaml

Lines changed: 27 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
DOCKERFILE="./services/docker/Dockerfile.activities_worker"
22
CONTEXT="../"
3-
REPO="crowddotdev/activities-worker"
3+
REPO="sjc.ocir.io/axbydjxa5zuh/activities-worker"
44
SERVICES="activities-worker"

0 commit comments

Comments
 (0)