-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds 8ac0n support for publishing an NPM module
- 8ac0n integration with publish.sh - Exports "import-stormpath" and "reset-okta" global commands - Renames salamander-migration to stormpath-migration RELATED TO OKTA-123859 RESOLVES OKTA-123446 8ac0n: test OKTA-123859 <<<Jenkins Check-In of Tested SHA: 281bdae for [email protected]>>> Artifact: stormpath-migration
- Loading branch information
1 parent
f5367ed
commit 32b3048
Showing
7 changed files
with
108 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/usr/bin/env node | ||
|
||
const Promise = require('bluebird'); | ||
const introspect = require('../premigration/introspect'); | ||
const logger = require('../util/logger'); | ||
const config = require('../util/config'); | ||
|
||
const migrateCustomSchema = require('../migrators/migrate-custom-schema'); | ||
const migrateAccounts = require('../migrators/migrate-accounts'); | ||
const migrateDirectories = require('../migrators/migrate-directories'); | ||
const migrateApplications = require('../migrators/migrate-applications'); | ||
const migrateGroups = require('../migrators/migrate-groups'); | ||
const migrateOrganizations = require('../migrators/migrate-organizations'); | ||
|
||
logger.setLevel(config.logLevel); | ||
logger.info(`Starting import...`); | ||
|
||
async function migrate() { | ||
try { | ||
console.time('migrate'); | ||
|
||
await introspect(); | ||
await migrateCustomSchema(); | ||
await migrateAccounts(); | ||
await migrateDirectories(); | ||
await migrateGroups(); | ||
await migrateOrganizations(); | ||
await migrateApplications(); | ||
|
||
logger.header('Done'); | ||
console.timeEnd('migrate'); | ||
} catch (err) { | ||
logger.error(err); | ||
} | ||
} | ||
|
||
migrate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash -vx | ||
|
||
source $OKTA_HOME/$REPO/scripts/setup.sh | ||
|
||
REGISTRY="https://artifacts.aue1d.saasure.com/artifactory/api/npm/npm-okta" | ||
|
||
npm install -g @okta/ci-update-package | ||
npm install -g @okta/ci-pkginfo | ||
|
||
export TEST_SUITE_TYPE="build" | ||
|
||
if [ -n "$action_branch" ]; | ||
then | ||
echo "Publishing from bacon task using branch $action_branch" | ||
TARGET_BRANCH=$action_branch | ||
else | ||
echo "Publishing from bacon testSuite using branch $BRANCH" | ||
TARGET_BRANCH=$BRANCH | ||
fi | ||
|
||
if ! ci-update-package --branch ${TARGET_BRANCH}; then | ||
echo "ci-update-package failed! Exiting..." | ||
exit $FAILED_SETUP | ||
fi | ||
|
||
if ! npm publish --registry ${REGISTRY}; then | ||
echo "npm publish failed! Exiting..." | ||
exit $PUBLISH_ARTIFACTORY_FAILURE | ||
fi | ||
|
||
DATALOAD=$(ci-pkginfo -t dataload) | ||
if ! artifactory_curl -X PUT -u ${ARTIFACTORY_CREDS} ${DATALOAD} -v -f; then | ||
echo "artifactory_curl failed! Exiting..." | ||
exit $PUBLISH_ARTIFACTORY_FAILURE | ||
fi | ||
|
||
exit $SUCCESS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash -vx | ||
|
||
cd ${OKTA_HOME}/${REPO} | ||
|
||
# Revert the cache-min setting, since the internal cache does not apply to | ||
# these repos (and causes problems in lookups) | ||
npm config set cache-min 10 | ||
|
||
# Use newer, faster npm | ||
npm install -g [email protected] | ||
|
||
if ! npm install; then | ||
echo "npm install failed! Exiting..." | ||
exit ${FAILED_SETUP} | ||
fi |