Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e53f739
update nvmrc and ci-cd scripts to use NodeJS 16
EmilianoSanchez Oct 19, 2022
7926b12
Merge pull request #112 from splitio/update_nvmrc
EmilianoSanchez Oct 20, 2022
8d31bc5
Upload assets to us and eu (stage)
Israphel Oct 27, 2022
b168653
Merge pull request #113 from splitio/INFRA-5869
Israphel Oct 27, 2022
3cf47f5
update runtime dependencies, peer dependencies
lfender6445 Nov 11, 2022
b9713dd
update dependencies and add changelog entry for patch release
EmilianoSanchez Dec 14, 2022
c7a107a
AUT-1705: Adding SonarQube for react-client.
gpochettino Dec 14, 2022
261bb29
AUT-1705: Changing node version to 16.16.0.
gpochettino Dec 15, 2022
1671808
AUT-1705: Upgrading versions from review comments.
gpochettino Dec 15, 2022
19e13bb
lint
Israphel Dec 15, 2022
ecdac27
refactor build step
EmilianoSanchez Dec 15, 2022
fb94754
refactor umd.ts file
EmilianoSanchez Dec 15, 2022
0b9da68
update ci-cd for uploading rc to stage cdn
EmilianoSanchez Dec 15, 2022
9bbbb03
rc with upgraded dependencies
EmilianoSanchez Dec 16, 2022
7c349c0
Merge branch 'development' into update_deps
EmilianoSanchez Dec 16, 2022
acd9988
Merge pull request #115 from lfender6445/update_deps
EmilianoSanchez Dec 16, 2022
0998a45
Merge branch 'development' into build_update
EmilianoSanchez Dec 16, 2022
e647af9
update JS SDK version
EmilianoSanchez Dec 16, 2022
dfe5192
Merge branch 'development' into enhancement/AUT-1705
EmilianoSanchez Dec 16, 2022
36c7e61
Merge pull request #118 from splitio/enhancement/AUT-1705
EmilianoSanchez Dec 16, 2022
3495960
Merge branch 'development' into build_update
EmilianoSanchez Dec 16, 2022
9821368
rollback ci-cd
EmilianoSanchez Dec 16, 2022
7fc9605
Merge pull request #117 from splitio/release_v1.8.1
EmilianoSanchez Dec 16, 2022
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
145 changes: 123 additions & 22 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches:
- '*'

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.run_number || github.event.pull_request.number }}
cancel-in-progress: true

permissions:
contents: read
id-token: write
Expand All @@ -18,54 +22,151 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up nodejs
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
node-version: '16.16.0'
cache: 'npm'

- name: npm CI
- name: npm ci
run: npm ci

- name: npm Check
- name: npm check
run: npm run check

- name: npm Test
run: npm run build && npm run test # tests require build to use JS SDK in localhost mode
- name: npm test
run: npm run test -- --coverage

- name: npm Build
- name: npm build
run: BUILD_BRANCH=$(echo "${GITHUB_REF#refs/heads/}") BUILD_COMMIT=${{ github.sha }} npm run build

- name: Configure AWS credentials (development)
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/development' }}
uses: aws-actions/configure-aws-credentials@v1
- name: Store assets
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/development' || github.ref == 'refs/heads/master') }}
uses: actions/upload-artifact@v3
with:
role-to-assume: arn:aws:iam::079419646996:role/public-assets
name: assets
path: umd/
retention-days: 1

upload-stage:
name: Upload assets
runs-on: ubuntu-latest
needs: build
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/development' }}
strategy:
matrix:
environment:
- stage
- stage-eu
include:
- environment: stage
account_id: "079419646996"
bucket: split-public-stage
- environment: stage-eu
account_id: "901851837056"
bucket: split-public-stage-eu-west-1

steps:
- name: Download assets
uses: actions/download-artifact@v3
with:
name: assets
path: umd

- name: Display structure of assets
run: ls -R
working-directory: umd

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: arn:aws:iam::${{ matrix.account_id }}:role/gha-public-assets-role
aws-region: us-east-1

- name: Upload to S3 (development)
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/development' }}
- name: Upload to S3
run: aws s3 sync $SOURCE_DIR s3://$BUCKET/$DEST_DIR $ARGS
env:
BUCKET: split-public-stage
BUCKET: ${{ matrix.bucket }}
SOURCE_DIR: ./umd
DEST_DIR: sdk
ARGS: --acl public-read --follow-symlinks --cache-control max-age=31536000,public

- name: Configure AWS credentials (master)
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: aws-actions/configure-aws-credentials@v1
upload-prod:
name: Upload assets
runs-on: ubuntu-latest
needs: build
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
strategy:
matrix:
environment:
- prod
- prod-eu
include:
- environment: prod
account_id: "825951051969"
bucket: split-public
- environment: prod-eu
account_id: "842946900133"
bucket: split-public-eu-west-1

steps:
- name: Download assets
uses: actions/download-artifact@v3
with:
name: assets
path: umd

- name: Display structure of assets
run: ls -R
working-directory: umd

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1-node16
with:
role-to-assume: arn:aws:iam::825951051969:role/public-assets
role-to-assume: arn:aws:iam::${{ matrix.account_id }}:role/gha-public-assets-role
aws-region: us-east-1

- name: Upload to S3 (master)
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
- name: Upload to S3
run: aws s3 sync $SOURCE_DIR s3://$BUCKET/$DEST_DIR $ARGS
env:
BUCKET: split-public
BUCKET: ${{ matrix.bucket }}
SOURCE_DIR: ./umd
DEST_DIR: sdk
ARGS: --acl public-read --follow-symlinks --cache-control max-age=31536000,public

- name: SonarQube Scan (Push)
if: github.event_name == 'push'
uses: SonarSource/sonarcloud-github-action@v1.8
env:
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
with:
projectBaseDir: .
args: >
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
-Dsonar.projectName=${{ github.event.repository.name }}
-Dsonar.projectKey=${{ github.event.repository.name }}
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
-Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions"
-Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}"

- name: SonarQube Scan (Pull Request)
if: github.event_name == 'pull_request'
uses: SonarSource/sonarcloud-github-action@v1.8
env:
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
with:
projectBaseDir: .
args: >
-Dsonar.host.url=${{ secrets.SONARQUBE_HOST }}
-Dsonar.projectName=${{ github.event.repository.name }}
-Dsonar.projectKey=${{ github.event.repository.name }}
-Dsonar.links.ci="https://github.com/splitio/${{ github.event.repository.name }}/actions"
-Dsonar.links.scm="https://github.com/splitio/${{ github.event.repository.name }}"
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v14
v16.16.0
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.8.1 (December 16, 2022)
- Updated some transitive dependencies for vulnerability fixes.
- Bugfixing - Upgrade @splitsoftware/splitio dependency to version 10.22.3 which includes a memory leak fix for localhost mode (Related to issue https://github.com/splitio/javascript-commons/issues/181) among other improvements.

1.8.0 (October 5, 2022)
- Updated @splitsoftware/splitio dependency to version 10.22.0, which includes:
- Added a new impressions mode for the SDK called NONE, to be used in factory when there is no desire to capture impressions on an SDK factory to feed Split's analytics engine. Running NONE mode, the SDK will only capture unique keys evaluated for a particular feature flag instead of full blown impressions.
Expand Down
Loading