Unverified Commit da6528cd authored by godofredoc's avatar godofredoc Committed by GitHub

Point to a new artifacts location. (#70673)

This is in preparation to move the flutter artifacts to a more secure
location.

Bug:
  go/fxb/64576
parent d396e26e
flutter_infra/gradle-wrapper/fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa/gradle-wrapper.tgz
flutter_infra_release/gradle-wrapper/fd5c1f2c013565a3bea56ada6df9d2b8e96d56aa/gradle-wrapper.tgz
flutter_infra/flutter/fonts/1363603dd17dd609018e53cdbd5fef6791814337/fonts.zip
flutter_infra_release/flutter/fonts/1363603dd17dd609018e53cdbd5fef6791814337/fonts.zip
......@@ -43,7 +43,7 @@ if (-not $dartSdkBaseUrl) {
$dartSdkBaseUrl = "https://storage.googleapis.com"
}
$dartZipName = "dart-sdk-windows-x64.zip"
$dartSdkUrl = "$dartSdkBaseUrl/flutter_infra/flutter/$engineVersion/$dartZipName"
$dartSdkUrl = "$dartSdkBaseUrl/flutter_infra_release/flutter/$engineVersion/$dartZipName"
if (Test-Path $dartSdkPath) {
# Move old SDK to a new location instead of deleting it in case it is still in use (e.g. by IntelliJ).
......
......@@ -85,7 +85,7 @@ if [ ! -f "$ENGINE_STAMP" ] || [ "$ENGINE_VERSION" != `cat "$ENGINE_STAMP"` ]; t
fi
DART_SDK_BASE_URL="${FLUTTER_STORAGE_BASE_URL:-https://storage.googleapis.com}"
DART_SDK_URL="$DART_SDK_BASE_URL/flutter_infra/flutter/$ENGINE_VERSION/$DART_ZIP_NAME"
DART_SDK_URL="$DART_SDK_BASE_URL/flutter_infra_release/flutter/$ENGINE_VERSION/$DART_ZIP_NAME"
# if the sdk path exists, copy it to a temporary location
if [ -d "$DART_SDK_PATH" ]; then
......
......@@ -26,10 +26,10 @@ void main() {
test('start works', () async {
final Map<String, List<ProcessResult>> calls = <String, List<ProcessResult>>{
'gsutil acl get gs://flutter_infra/releases/releases.json': <ProcessResult>[
'gsutil acl get gs://flutter_infra_release/releases/releases.json': <ProcessResult>[
ProcessResult(0, 0, 'output1', ''),
],
'gsutil cat gs://flutter_infra/releases/releases.json': <ProcessResult>[
'gsutil cat gs://flutter_infra_release/releases/releases.json': <ProcessResult>[
ProcessResult(0, 0, 'output2', ''),
],
};
......@@ -48,10 +48,10 @@ void main() {
test('run works', () async {
final Map<String, List<ProcessResult>> calls = <String, List<ProcessResult>>{
'gsutil acl get gs://flutter_infra/releases/releases.json': <ProcessResult>[
'gsutil acl get gs://flutter_infra_release/releases/releases.json': <ProcessResult>[
ProcessResult(0, 0, 'output1', ''),
],
'gsutil cat gs://flutter_infra/releases/releases.json': <ProcessResult>[
'gsutil cat gs://flutter_infra_release/releases/releases.json': <ProcessResult>[
ProcessResult(0, 0, 'output2', ''),
],
};
......@@ -65,10 +65,10 @@ void main() {
test('runSync works', () async {
final Map<String, List<ProcessResult>> calls = <String, List<ProcessResult>>{
'gsutil acl get gs://flutter_infra/releases/releases.json': <ProcessResult>[
'gsutil acl get gs://flutter_infra_release/releases/releases.json': <ProcessResult>[
ProcessResult(0, 0, 'output1', ''),
],
'gsutil cat gs://flutter_infra/releases/releases.json': <ProcessResult>[
'gsutil cat gs://flutter_infra_release/releases/releases.json': <ProcessResult>[
ProcessResult(0, 0, 'output2', ''),
],
};
......@@ -82,10 +82,10 @@ void main() {
test('captures stdin', () async {
final Map<String, List<ProcessResult>> calls = <String, List<ProcessResult>>{
'gsutil acl get gs://flutter_infra/releases/releases.json': <ProcessResult>[
'gsutil acl get gs://flutter_infra_release/releases/releases.json': <ProcessResult>[
ProcessResult(0, 0, 'output1', ''),
],
'gsutil cat gs://flutter_infra/releases/releases.json': <ProcessResult>[
'gsutil cat gs://flutter_infra_release/releases/releases.json': <ProcessResult>[
ProcessResult(0, 0, 'output2', ''),
],
};
......
......@@ -21,10 +21,10 @@ import 'package:path/path.dart' as path;
import 'package:platform/platform.dart' show Platform, LocalPlatform;
import 'package:process/process.dart';
const String gsBase = 'gs://flutter_infra';
const String gsBase = 'gs://flutter_infra_release';
const String releaseFolder = '/releases';
const String gsReleaseFolder = '$gsBase$releaseFolder';
const String baseUrl = 'https://storage.googleapis.com/flutter_infra';
const String baseUrl = 'https://storage.googleapis.com/flutter_infra_release';
/// Exception class for when a process fails to run, so we can catch
/// it and provide something more readable than a stack trace.
......
......@@ -15,10 +15,10 @@ const String kDocRoot = 'dev/docs/doc';
Future<void> main(List<String> args) async {
final String engineVersion = File('bin/internal/engine.version').readAsStringSync().trim();
final String javadocUrl = 'https://storage.googleapis.com/flutter_infra/flutter/$engineVersion/android-javadoc.zip';
final String javadocUrl = 'https://storage.googleapis.com/flutter_infra_release/flutter/$engineVersion/android-javadoc.zip';
generateDocs(javadocUrl, 'javadoc', 'io/flutter/view/FlutterView.html');
final String objcdocUrl = 'https://storage.googleapis.com/flutter_infra/flutter/$engineVersion/ios-objcdoc.zip';
final String objcdocUrl = 'https://storage.googleapis.com/flutter_infra_release/flutter/$engineVersion/ios-objcdoc.zip';
generateDocs(objcdocUrl, 'objcdoc', 'Classes/FlutterViewController.html');
}
......
......@@ -68,9 +68,9 @@ popd > /dev/null
echo
echo "Uploading repackaged gradle wrapper..."
echo "Content hash: $STAMP"
gsutil.py cp -n "$WRAPPER_TEMP_DIR/gradle-wrapper.tgz" "gs://flutter_infra/gradle-wrapper/$STAMP/gradle-wrapper.tgz"
gsutil.py cp -n "$WRAPPER_TEMP_DIR/gradle-wrapper.tgz" "gs://flutter_infra_release/gradle-wrapper/$STAMP/gradle-wrapper.tgz"
echo "flutter_infra/gradle-wrapper/$STAMP/gradle-wrapper.tgz" > "$WRAPPER_VERSION_PATH"
echo "flutter_infra_release/gradle-wrapper/$STAMP/gradle-wrapper.tgz" > "$WRAPPER_VERSION_PATH"
rm -rf "$WRAPPER_TEMP_DIR"
echo
......
......@@ -834,7 +834,7 @@ class FlutterWebSdk extends CachedArtifact {
} else if (_platform.isWindows) {
platformName += 'windows-x64';
}
final Uri url = Uri.parse('${cache.storageBaseUrl}/flutter_infra/flutter/$version/$platformName.zip');
final Uri url = Uri.parse('${cache.storageBaseUrl}/flutter_infra_release/flutter/$version/$platformName.zip');
if (location.existsSync()) {
location.deleteSync(recursive: true);
}
......@@ -907,7 +907,7 @@ abstract class EngineCachedArtifact extends CachedArtifact {
FileSystem fileSystem,
OperatingSystemUtils operatingSystemUtils,
) async {
final String url = '${cache.storageBaseUrl}/flutter_infra/flutter/$version/';
final String url = '${cache.storageBaseUrl}/flutter_infra_release/flutter/$version/';
final Directory pkgDir = cache.getCacheDir('pkg');
for (final String pkgName in getPackageDirs()) {
......@@ -942,7 +942,7 @@ abstract class EngineCachedArtifact extends CachedArtifact {
Future<bool> checkForArtifacts(String engineVersion) async {
engineVersion ??= version;
final String url = '${cache.storageBaseUrl}/flutter_infra/flutter/$engineVersion/';
final String url = '${cache.storageBaseUrl}/flutter_infra_release/flutter/$engineVersion/';
bool exists = false;
for (final String pkgName in getPackageDirs()) {
......@@ -1574,7 +1574,7 @@ class IosUsbArtifacts extends CachedArtifact {
}
@visibleForTesting
Uri get archiveUri => Uri.parse('${cache.storageBaseUrl}/flutter_infra/ios-usb-dependencies${cache.useUnsignedMacBinaries ? '/unsigned' : ''}/$name/$version/$name.zip');
Uri get archiveUri => Uri.parse('${cache.storageBaseUrl}/flutter_infra_release/ios-usb-dependencies${cache.useUnsignedMacBinaries ? '/unsigned' : ''}/$name/$version/$name.zip');
}
// Many characters are problematic in filenames, especially on Windows.
......
......@@ -287,7 +287,7 @@ $licenseSource
LICENSE
}
s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
s.source = { :http => '${_cache.storageBaseUrl}/flutter_infra/flutter/${_cache.engineRevision}/$artifactsMode/artifacts.zip' }
s.source = { :http => '${_cache.storageBaseUrl}/flutter_infra_release/flutter/${_cache.engineRevision}/$artifactsMode/artifacts.zip' }
s.documentation_url = 'https://flutter.dev/docs'
s.platform = :ios, '8.0'
s.vendored_frameworks = 'Flutter.xcframework'
......
......@@ -155,7 +155,7 @@ class UpdatePackagesCommand extends FlutterCommand {
'Downloading lcov data for package:flutter...',
);
final String urlBase = globals.platform.environment['FLUTTER_STORAGE_BASE_URL'] ?? 'https://storage.googleapis.com';
final Uri coverageUri = Uri.parse('$urlBase/flutter_infra/flutter/coverage/lcov.info');
final Uri coverageUri = Uri.parse('$urlBase/flutter_infra_release/flutter/coverage/lcov.info');
final List<int> data = await _net.fetchUrl(coverageUri);
final String coverageDir = globals.fs.path.join(
Cache.flutterRoot,
......
......@@ -210,7 +210,7 @@ void main() {
final File expectedPodspec = outputDirectory.childFile('Flutter.podspec');
final String podspecContents = expectedPodspec.readAsStringSync();
expect(podspecContents, contains("'$storageBaseUrl/flutter_infra/flutter/$engineRevision/ios/artifacts.zip'"));
expect(podspecContents, contains("'$storageBaseUrl/flutter_infra_release/flutter/$engineRevision/ios/artifacts.zip'"));
}, overrides: <Type, Generator>{
FileSystem: () => memoryFileSystem,
ProcessManager: () => FakeProcessManager.any(),
......@@ -228,7 +228,7 @@ void main() {
final File expectedPodspec = outputDirectory.childFile('Flutter.podspec');
final String podspecContents = expectedPodspec.readAsStringSync();
expect(podspecContents, contains("'$storageBaseUrl/flutter_infra/flutter/$engineRevision/ios-profile/artifacts.zip'"));
expect(podspecContents, contains("'$storageBaseUrl/flutter_infra_release/flutter/$engineRevision/ios-profile/artifacts.zip'"));
}, overrides: <Type, Generator>{
FileSystem: () => memoryFileSystem,
ProcessManager: () => FakeProcessManager.any(),
......@@ -246,7 +246,7 @@ void main() {
final File expectedPodspec = outputDirectory.childFile('Flutter.podspec');
final String podspecContents = expectedPodspec.readAsStringSync();
expect(podspecContents, contains("'$storageBaseUrl/flutter_infra/flutter/$engineRevision/ios-release/artifacts.zip'"));
expect(podspecContents, contains("'$storageBaseUrl/flutter_infra_release/flutter/$engineRevision/ios-release/artifacts.zip'"));
}, overrides: <Type, Generator>{
FileSystem: () => memoryFileSystem,
ProcessManager: () => FakeProcessManager.any(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment