Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The versionfile parameter is not working. #105

Open
Patrick-Magee opened this issue May 24, 2019 · 2 comments
Open

The versionfile parameter is not working. #105

Patrick-Magee opened this issue May 24, 2019 · 2 comments

Comments

@Patrick-Magee
Copy link

No matter what I entered for this parameter, it still generates a temporary file name for the S3 bucket.
CodeDeploy-plug-in

private RevisionLocation zipAndUpload(AWSClients aws, String projectName, FilePath sourceDirectory) throws IOException, InterruptedException, IllegalArgumentException {

    File zipFile = null;
    File versionFile;
    versionFile = new File(sourceDirectory + "/" + versionFileName);

    InputStreamReader reader = null;
    String version = null;
    try {
      reader = new InputStreamReader(new FileInputStream(versionFile), "UTF-8");
      char[] chars = new char[(int) versionFile.length() -1];
      reader.read(chars);
      version = new String(chars);
      reader.close();
    } catch (IOException e) {
      e.printStackTrace();
    } finally {
      if(reader !=null){reader.close();}
    }

    if (version != null){
      zipFile = new File("/tmp/" + projectName + "-" + version + ".zip");
      final boolean fileCreated = zipFile.createNewFile();
      if (!fileCreated) {
        logger.println("File already exists, overwriting: " + zipFile.getPath());
      }
    } else {
      zipFile = File.createTempFile(projectName + "-", ".zip");
    }
@Patrick-Magee
Copy link
Author

Patrick-Magee commented May 24, 2019

This is a critical issue for us, as we would to generate a dashboard showing what has been deployed onto each environment, and without this parameter AWS Codedeploy just displays a generated text. It doesn't look like this plug-in is being maintained at the moment, as I have been very few recent updates. I would be willing to fix this issue myself, but I have no experience writing Java plug-ins (it's been many years since I worked as a Java programmer)

@tylerwalts-dd
Copy link

@Patrick-Magee It works for me. Try adding .txt files to your Include Files list?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants