GH Hosted: correct aws s3 commands. Green e429 build

This commit is contained in:
aboyko
2023-07-14 12:18:29 -04:00
parent 06915a1c4d
commit 445efec2f0
5 changed files with 52 additions and 12 deletions

View File

@@ -125,9 +125,11 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.TOOLS_S3_SECRET_KEY }}
run: |
dist_path=`cat s3-dist-path.txt`
ls spring-tool-suite-4*.zip*
aws s3 sync rm spring-tool-suite-4*.zip* s3://dist.springsource.com/${dist_path}
aws s3 sync cp spring-tool-suite-4*.zip* s3://dist.springsource.com/${dist_path}
ls spring-tool-suite-4*.jar*
aws s3 sync rm spring-tool-suite-4*.jar* s3://dist.springsource.com/${dist_path}
aws s3 sync cp spring-tool-suite-4*.jar* s3://dist.springsource.com/${dist_path}
ls spring-tool-suite-4*win*.zip*
aws s3 sync rm s3://dist.springsource.com/${dist_path} --exclude "*" --include "spring-tool-suite-4*win*.zip*"
aws s3 sync cp s3://dist.springsource.com/${dist_path} . --exclude "*" --include "spring-tool-suite-4*win*.zip*"
ls spring-tool-suite-4*win*.jar*
aws s3 sync rm s3://dist.springsource.com/${dist_path} --exclude "*" --include "spring-tool-suite-4*win*.jar*"
aws s3 sync cp s3://dist.springsource.com/${dist_path} . --exclude "*" --include "spring-tool-suite-4*win*.jar*"

View File

@@ -1,2 +1,2 @@
./mvnw clean install -Pe428 -Psnapshot -Dsigning.skip=true -Dhttpclient.retry-max=20 -Dmaven.test.skip=true -Declipse.p2.mirrors=false -Dtycho.localArtifacts=ignore -Dorg.eclipse.equinox.p2.transport.ecf.retry=5 -Dskip.osx.signing=true -Dskip.win.signing=true -Dskip.osx.notarizing=true
./mvnw clean package -Pe428 -Psnapshot -Dsigning.skip=true -Dhttpclient.retry-max=20 -Dmaven.test.skip=true -Declipse.p2.mirrors=false -Dtycho.localArtifacts=ignore -Dorg.eclipse.equinox.p2.transport.ecf.retry=5 -Dskip.osx.signing=true -Dskip.win.signing=true -Dskip.osx.notarizing=true

View File

@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020 Pivotal, Inc.
* Copyright (c) 2020, 2023 Pivotal, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.springframework.ide.eclipse.boot.dash.docker.runtarget;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -21,6 +22,7 @@ import org.springsource.ide.eclipse.commons.livexp.core.AbstractDisposable;
import org.springsource.ide.eclipse.commons.livexp.core.LiveCounter;
import org.springsource.ide.eclipse.commons.livexp.core.OnDispose;
import org.springsource.ide.eclipse.commons.livexp.util.Log;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor;
@@ -73,7 +75,18 @@ public class DockerDeployments extends AbstractDisposable {
}
private Yaml yaml() {
return new Yaml(new CustomClassLoaderConstructor(DockerDeploymentList.class, DockerDeployments.class.getClassLoader()));
// e429 is based on snakeyaml 2.0 which has a non-backward compatible change in CustomClassLoaderConstructor cosntrcutors
try {
CustomClassLoaderConstructor cclc = CustomClassLoaderConstructor.class.getConstructor(Class.class, ClassLoader.class).newInstance(DockerDeploymentList.class, DockerDeployments.class.getClassLoader());
return new Yaml(cclc);
} catch (Exception e) {
try {
CustomClassLoaderConstructor cclc = CustomClassLoaderConstructor.class.getConstructor(Class.class, ClassLoader.class, LoaderOptions.class).newInstance(DockerDeploymentList.class, DockerDeployments.class.getClassLoader(), new LoaderOptions());
return new Yaml(cclc);
} catch (Exception e1) {
throw new IllegalStateException(e1);
}
}
}
public void createOrUpdate(DockerDeployment deployment) {

View File

@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017 Spring IDE Developers
* Copyright (c) 2017, 2023 Spring IDE Developers
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -24,6 +24,7 @@ import org.springframework.ide.eclipse.editor.support.yaml.path.YamlPath;
import org.springframework.ide.eclipse.editor.support.yaml.path.YamlPathSegment;
import org.springframework.ide.eclipse.editor.support.yaml.path.YamlPathSegment.AtIndex;
import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.SafeConstructor;
import org.yaml.snakeyaml.representer.Representer;
@@ -161,7 +162,7 @@ public class PropertiesToYamlConverter {
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
options.setPrettyFlow(true);
Yaml yaml = new Yaml(new SafeConstructor(), new Representer(options), options);
Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()), new Representer(options), options);
this.output = yaml.dump(object);
}

View File

@@ -21,9 +21,11 @@
*******************************************************************************/
package org.springframework.ide.eclipse.boot.wizard.starters.eclipse;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -466,7 +468,29 @@ public class ResourceCompareInput extends CompareEditorInput {
}
byte[] initialContent() throws CoreException {
return Utilities.readBytes(createStream());
InputStream in = createStream();
ByteArrayOutputStream bos= new ByteArrayOutputStream();
try {
while (true) {
int c= in.read();
if (c == -1)
break;
bos.write(c);
}
} catch (IOException ex) {
return null;
} finally {
Utilities.close(in);
try {
bos.close();
} catch (IOException x) {
// silently ignored
}
}
return bos.toByteArray();
}
@Override