@ossy/deployment-tools 0.0.32 → 0.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -47973,7 +47973,6 @@ class AwsCredentialsClient {
47973
47973
  return core.getIDToken('sts.amazonaws.com')
47974
47974
  .then(webIdentityToken => {
47975
47975
  logInfo({ message: `[AwsCredentialsClient] Attempting to resolve aws credentials by assuming the role: ${awsRoleToAssume}` });
47976
- logDebug({ message: '[AwsCredentialsClient] webIdentityToken', data: webIdentityToken });
47977
47976
  return stsClient.send(new client_sts_dist_cjs.AssumeRoleWithWebIdentityCommand({
47978
47977
  RoleArn: `arn:aws:iam::${awsAccountId}:role/${awsRoleToAssume}`,
47979
47978
  RoleSessionName: 'GitHubActions',
@@ -47982,6 +47981,7 @@ class AwsCredentialsClient {
47982
47981
  }));
47983
47982
  })
47984
47983
  .then(responseData => ({
47984
+ // Don't ask
47985
47985
  AccessKeyId: responseData.Credentials.AccessKeyId,
47986
47986
  SessionToken: responseData.Credentials.SessionToken,
47987
47987
  SecretAccessKey: responseData.Credentials.SecretAccessKey,
@@ -47989,11 +47989,6 @@ class AwsCredentialsClient {
47989
47989
  sessionToken: responseData.Credentials.SessionToken,
47990
47990
  secretAccessKey: responseData.Credentials.SecretAccessKey,
47991
47991
  }))
47992
- // .then(responseData => responseData.Credentials)
47993
- .then(data => {
47994
- logDebug({ message: '[AwsCredentialsClient] AssumeRoleWithWebIdentityCommand responseData.Credentials', data });
47995
- return data;
47996
- })
47997
47992
  .catch(error => {
47998
47993
  logError({ message: '[AwsCredentialsClient] Could not resolve temporary credentials', error });
47999
47994
  return undefined;
@@ -48010,10 +48005,12 @@ class DeploymentQueueClient {
48010
48005
  logInfo({ message: '[DeploymentQueueClient] Starting deployment sequence' });
48011
48006
  return DeploymentQueueClient.createAwsSqsClient(deploymentPlatform)
48012
48007
  .then(sqsClient => {
48013
- const command = new dist_cjs.SendMessageCommand({
48008
+ const sendMessageParams = {
48014
48009
  QueueUrl: deploymentPlatform.awsDeploymentSqsArn,
48015
48010
  MessageBody: JSON.stringify(deploymentRequest)
48016
- });
48011
+ };
48012
+ logDebug({ message: '[DeploymentQueueClient] SendMessageCommand params', data: sendMessageParams });
48013
+ const command = new dist_cjs.SendMessageCommand(sendMessageParams);
48017
48014
  return sqsClient.send(command)
48018
48015
  .then(() => logInfo({ message: '[DeploymentQueueClient] Deployment request sent' }))
48019
48016
  .catch(error => logError({ message: '[DeploymentQueueClient] Could not send deployment request', error }));
@@ -48109,7 +48106,9 @@ class DeploymentPlatformClient {
48109
48106
  .then(([platforms, deploymentTemplates]) => {
48110
48107
  deploymentTemplates.map(deploymentTemplate => {
48111
48108
  logInfo({ message: `[DeploymentPlatformClient]: Found deployment platforms [${platforms.map(x => x.platformName).join(', ')}]` });
48112
- const deploymentPlatform = platforms.find(platform => platform.platformName === deploymentTemplate.targetDeploymentPlatform);
48109
+ const deploymentPlatform = platforms
48110
+ .map(platform => (Object.assign(Object.assign({}, platform), { activeEnvironment: targetEnvironment })))
48111
+ .find(platform => platform.platformName === deploymentTemplate.targetDeploymentPlatform);
48113
48112
  if (!deploymentPlatform) {
48114
48113
  logError({ message: `[DeploymentPlatformClient] Could not find a deployment platform with the name ${deploymentTemplate.targetDeploymentPlatform}` });
48115
48114
  return Promise.reject();