From c3407274f1e8d57afbde83ee4c4e7a30bd202bdf Mon Sep 17 00:00:00 2001 From: david-shibley-contentful <149433784+david-shibley-contentful@users.noreply.github.com> Date: Thu, 7 Mar 2024 09:19:43 -0700 Subject: [PATCH] feat: github migration [EXT-5015] (#2211) * feat: github migration [EXT-5015] * adding vault context * moving to install dependencies * adding logging * fix: [] - fix build --------- Co-authored-by: Cormac de Barra --- .circleci/config.yml | 11 +++++++++-- .github/dependabot.yml | 8 +++++++- package-lock.json | 6 +++--- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ea1426cb33..bd4a751e11 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,6 +15,10 @@ commands: keys: - npm-cache-{{ arch }}-{{ checksum ".nvmrc" }}-{{ checksum "package-lock.json" }} - npm-cache + - vault/get-secrets: + template-preset: 'packages-read' + - run: echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_READ_TOKEN}" > ~/.npmrc + - run: echo "@contentful:registry=https://npm.pkg.github.com" >> ~/.npmrc - run: npm ci --prefer-offline cache-dependencies: @@ -40,6 +44,8 @@ commands: steps: - vault/get-secrets: template-preset: 'semantic-release-ecosystem' + - run: echo "//npm.pkg.github.com/:_authToken=${GITHUB_PACKAGES_WRITE_TOKEN}" > ~/.npmrc + - run: echo "@contentful:registry=https://npm.pkg.github.com" >> ~/.npmrc jobs: prepare: @@ -90,15 +96,16 @@ jobs: executor: docker-with-node steps: - checkout - - use-vault - install-dependencies + - use-vault - run: npm run semantic-release workflows: version: 2 build_and_test: jobs: - - prepare + - prepare: + context: vault - build: requires: - prepare diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e722a8824d..f9da39c3c8 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,7 +1,13 @@ version: 2 - +registries: + npm-github: + type: npm-registry + url: https://npm.pkg.github.com + token: ${{secrets.NPM_REGISTRY_REGISTRY_GH_ORG_TOKEN}} updates: - package-ecosystem: npm + registries: + - npm-github directory: "/" schedule: interval: daily diff --git a/package-lock.json b/package-lock.json index c85a49a881..e773d5fca2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2468,7 +2468,7 @@ }, "node_modules/@contentful/integration-test-utils": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@contentful/integration-test-utils/-/integration-test-utils-2.0.1.tgz", + "resolved": "https://npm.pkg.github.com/download/@contentful/integration-test-utils/2.0.1/7b15465ff5aad39cd788cdec9d7aa95feb867c71", "integrity": "sha512-8VSWysfhVHYNGxgt6VS47VgcEoCu3WAd+PTdoSa1pXLgDdwm1OfX0jpPN7Fabln5y382nDuW1gBZNIcSidpPnw==", "dev": true, "dependencies": { @@ -2483,7 +2483,7 @@ }, "node_modules/@contentful/rich-text-types": { "version": "16.3.4", - "resolved": "https://registry.npmjs.org/@contentful/rich-text-types/-/rich-text-types-16.3.4.tgz", + "resolved": "https://npm.pkg.github.com/download/@contentful/rich-text-types/16.3.4/c5fc9c834dde03d4c4ee189900d304ce1888a74b", "integrity": "sha512-PyVSrQa5j1hO4grgA0Ivo/taiOvW0uFN79JB5JkTG8U7DnWGI7Ap2As6zN6/E6YvDqb7w2cYRMSGSQ3qfxu8HQ==", "engines": { "node": ">=6.0.0" @@ -21805,4 +21805,4 @@ } } } -} +} \ No newline at end of file