diff --git a/scripts/devicefarm-test-runner-buildspec.yml b/scripts/devicefarm-test-runner-buildspec.yml deleted file mode 100644 index f6a1ee786b..0000000000 --- a/scripts/devicefarm-test-runner-buildspec.yml +++ /dev/null @@ -1,86 +0,0 @@ -version: 0.2 -# This file is used as part of the build process implemented using AWS CodeBuild [1]. -# The CodeBuild documentation [2] provides an introduction of the service and its capabilities. In general -# terms, it allows us to configure the actions executed when a build is triggered by a commit to the -# amplify-android GitHub repository. -# -# For the purposes of this repo, we're simply running a build by using "./gradlew build" -# command and in the post-build phase, we consolidate the JUnit report files in one location. -# In the reports section, we're instructing CodeBuild to publish those reports which can be -# viewed in the AWS CodeBuild console (Future work will be to publish those to Github for easier access). -# -# [1] - https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html -# [2] - https://docs.aws.amazon.com/codebuild/latest/userguide/planning.html -env: - shell: /bin/sh -phases: - install: - runtime-versions: - nodejs: 12 - python: 3.8 - java: corretto11 - commands: - - echo 'Install phase starting' - - npm install -g xunit-viewer - - pip3 install junit-xml - ### INSTALL ANDROID 31 - - export ANDROID_TOOLS_FILENAME="commandlinetools-linux-9123335_latest.zip" - - wget https://dl.google.com/android/repository/$ANDROID_TOOLS_FILENAME -P ~ > /dev/null - - unzip ~/$ANDROID_TOOLS_FILENAME -d ~ > /dev/null 2>&1 - - mkdir -p /usr/local/android-sdk-linux/cmdline-tools - - mv ~/cmdline-tools /usr/local/android-sdk-linux/cmdline-tools/latest - - export PATH=/usr/local/android-sdk-linux/cmdline-tools/latest:/usr/local/android-sdk-linux/cmdline-tools/latest/bin:/usr/local/android-sdk-linux/platform-tools:$PATH - - export ANDROID_SDK_ROOT=/usr/local/android-sdk-linux - - yes | sdkmanager --licenses > /dev/null - - sdkmanager "platform-tools" "platforms;android-31" > /dev/null - - sdkmanager "build-tools;31.0.0" > /dev/null - ### END INSTALL ANDROID 31 - finally: - - echo 'Install phase completed.' - pre_build: - commands: - - echo 'Pre-build phase starting' - - mkdir -p build/allTests - - | - if [[ -z "${CONFIG_SOURCE_BUCKET}" ]]; then - echo 'Pulling config files from Amplify' - JAVA_HOME=$JDK_11_HOME ./gradlew pullBackendConfigFromAmplify - else - echo 'Pulling config files from S3' - ./scripts/pull_backend_config_from_s3 ${CONFIG_SOURCE_BUCKET} - fi - finally: - - echo 'Pre-build phase completed.' - build: - commands: - - echo 'Build phase starting.' - - JAVA_HOME=$JDK_11_HOME ./gradlew assembleAndroidTest - - JAVA_HOME=$JDK_11_HOME ./gradlew runTestsInDeviceFarm - finally: - - echo 'Build phase completed.' - post_build: - commands: - - echo 'Post-build phase starting' - - mkdir -p build/reports/instrumented - - xunit-viewer -r build/allTests -o build/reports/instrumented/${CODEBUILD_RESOLVED_SOURCE_VERSION}.html - finally: - - echo 'Post-build phase completed.' -reports: - amplify-android-devicefarm-tests: - files: - - '**/*' - base-directory: 'build/allTests' - discard-paths: no - file-format: JUNITXML -artifacts: - files: - - '**/*.apk' - name: AmplifyAndroidCatApks - discard-paths: yes - secondary-artifacts: - reports: - files: - - '**/*' - name: DevicefarmTestRunReport - base-directory: 'build/reports/instrumented' - discard-paths: no diff --git a/scripts/maven-release-publisher.yml b/scripts/maven-release-publisher.yml deleted file mode 100644 index 74f85f63de..0000000000 --- a/scripts/maven-release-publisher.yml +++ /dev/null @@ -1,40 +0,0 @@ -version: 0.2 -env: - shell: /bin/sh - secrets-manager: - ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: awsmobilesdk/android/sonatype:username - ORG_GRADLE_PROJECT_SONATYPE_NEXUS_PASSWORD: awsmobilesdk/android/sonatype:password - ORG_GRADLE_PROJECT_signingPassword: awsmobilesdk/android/signing:password - ORG_GRADLE_PROJECT_signingKeyId: awsmobilesdk/android/signing:keyId - ORG_GRADLE_PROJECT_signingInMemoryKey: awsmobilesdk/android/signing:inMemoryKey -phases: - install: - runtime-versions: - java: corretto11 - commands: - - echo 'Install phase starting' - finally: - - echo 'Install phase completed.' - pre_build: - commands: - - echo 'Pre-build phase starting' - finally: - - echo 'Pre-build phase completed.' - build: - commands: - - echo 'Build phase starting.' - - | - # List all available gradle tasks, grep for the uploadArchive tasks, and then use cut to strip the - # task description and just return the name of the task, one for each module (e.g. aws-api:publish) - JAVA_HOME=$JDK_11_HOME ./gradlew clean build - for task_name in $(./gradlew tasks --all | grep ":publish " | cut -d " " -f 1); do - echo "Gradle task $task_name" - JAVA_HOME=$JDK_11_HOME ./gradlew $task_name; - done - finally: - - echo 'Build phase completed.' - post_build: - commands: - - echo 'Post-build phase starting' - finally: - - echo 'Post-build phase completed.' diff --git a/scripts/nightly-buildspec.yml b/scripts/nightly-buildspec.yml deleted file mode 100644 index 422924f7b6..0000000000 --- a/scripts/nightly-buildspec.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: 0.2 -# This file is used as part of the build process implemented using AWS CodeBuild [1]. -# The CodeBuild documentation [2] provides an introduction of the service and its capabilities. In general -# terms, it allows us to configure the actions executed when a build is triggered by a commit to the -# amplify-android GitHub repository. -# -# For the purposes of this repo, we're simply running a build by using "./gradlew build" -# command and in the post-build phase, we consolidate the JUnit report files in one location. -# In the reports section, we're instructing CodeBuild to publish those reports which can be -# viewed in the AWS CodeBuild console (Future work will be to publish those to Github for easier access). -# -# [1] - https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html -# [2] - https://docs.aws.amazon.com/codebuild/latest/userguide/planning.html -env: - shell: /bin/sh -phases: - install: - runtime-versions: - nodejs: 12 - python: 3.8 - java: corretto11 - commands: - - echo 'Install phase starting' - - npm install -g xunit-viewer - - pip3 install junit-xml - ### INSTALL ANDROID 31 - - export ANDROID_TOOLS_FILENAME="commandlinetools-linux-9123335_latest.zip" - - wget https://dl.google.com/android/repository/$ANDROID_TOOLS_FILENAME -P ~ > /dev/null - - unzip ~/$ANDROID_TOOLS_FILENAME -d ~ > /dev/null 2>&1 - - mkdir -p /usr/local/android-sdk-linux/cmdline-tools - - mv ~/cmdline-tools /usr/local/android-sdk-linux/cmdline-tools/latest - - export PATH=/usr/local/android-sdk-linux/cmdline-tools/latest:/usr/local/android-sdk-linux/cmdline-tools/latest/bin:/usr/local/android-sdk-linux/platform-tools:$PATH - - export ANDROID_SDK_ROOT=/usr/local/android-sdk-linux - - yes | sdkmanager --licenses > /dev/null - - sdkmanager "platform-tools" "platforms;android-31" > /dev/null - - sdkmanager "build-tools;31.0.0" > /dev/null - ### END INSTALL ANDROID 31 - finally: - - echo 'Install phase completed.' - pre_build: - commands: - - echo 'Pre-build phase starting' - - mkdir -p build/allTests - - | - if [[ -z "${CONFIG_SOURCE_BUCKET}" ]]; then - echo 'Pulling config files from Amplify' - JAVA_HOME=$JDK_11_HOME ./gradlew pullBackendConfigFromAmplify - else - echo 'Pulling config files from S3' - ./scripts/pull_backend_config_from_s3 ${CONFIG_SOURCE_BUCKET} - fi - finally: - - echo 'Pre-build phase completed.' - build: - commands: - - echo 'Build phase starting.' - - JAVA_HOME=$JDK_11_HOME ./gradlew runNightlyTestsInDeviceFarmPool - finally: - - echo 'Build phase completed.' - post_build: - commands: - - echo 'Post-build phase starting' - - mkdir -p build/reports/instrumented - - xunit-viewer -r build/allTests -o build/reports/instrumented/${CODEBUILD_RESOLVED_SOURCE_VERSION}.html - finally: - - echo 'Post-build phase completed.' -reports: - amplify-android-devicefarm-tests: - files: - - '**/*' - base-directory: 'build/allTests' - discard-paths: no - file-format: JUNITXML -artifacts: - files: - - '**/*.apk' - name: AmplifyAndroidCatApks - discard-paths: yes - secondary-artifacts: - reports: - files: - - '**/*' - name: DevicefarmTestRunReport - base-directory: 'build/reports/instrumented' - discard-paths: no diff --git a/scripts/pr-builder-buildspec.yml b/scripts/pr-builder-buildspec.yml deleted file mode 100644 index 8c44300bec..0000000000 --- a/scripts/pr-builder-buildspec.yml +++ /dev/null @@ -1,61 +0,0 @@ -version: 0.2 -# This file is used as part of the build process implemented using AWS CodeBuild [1]. -# The CodeBuild documentation [2] provides an introduction of the service and its capabilities. In general -# terms, it allows us to configure the actions executed when a build is triggered by a commit to the -# amplify-android GitHub repository. -# -# For the purposes of this repo, we're simply running a build by using "./gradlew build" -# command and in the post-build phase, we consolidate the JUnit report files in one location. -# In the reports section, we're instructing CodeBuild to publish those reports which can be -# viewed in the AWS CodeBuild console (Future work will be to publish those to Github for easier access). -# -# [1] - https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html -# [2] - https://docs.aws.amazon.com/codebuild/latest/userguide/planning.html -env: - shell: /bin/sh -phases: - install: - runtime-versions: - nodejs: 12 - java: corretto11 - commands: - - echo 'Install phase starting' - ### INSTALL ANDROID 31 - - export ANDROID_TOOLS_FILENAME="commandlinetools-linux-9123335_latest.zip" - - wget https://dl.google.com/android/repository/$ANDROID_TOOLS_FILENAME -P ~ > /dev/null - - unzip ~/$ANDROID_TOOLS_FILENAME -d ~ > /dev/null 2>&1 - - mkdir -p /usr/local/android-sdk-linux/cmdline-tools - - mv ~/cmdline-tools /usr/local/android-sdk-linux/cmdline-tools/latest - - export PATH=/usr/local/android-sdk-linux/cmdline-tools/latest:/usr/local/android-sdk-linux/cmdline-tools/latest/bin:/usr/local/android-sdk-linux/platform-tools:$PATH - - export ANDROID_SDK_ROOT=/usr/local/android-sdk-linux - - yes | sdkmanager --licenses > /dev/null - - sdkmanager "platform-tools" "platforms;android-31" > /dev/null - - sdkmanager "build-tools;31.0.0" > /dev/null - ### END INSTALL ANDROID 31 - finally: - - echo 'Install phase completed.' - pre_build: - commands: - - echo 'Pre-build phase starting' - finally: - - echo 'Pre-build phase completed.' - build: - commands: - - echo 'Build phase starting.' - - JAVA_HOME=$JDK_11_HOME ./gradlew build - finally: - - echo 'Build phase completed.' - post_build: - commands: - - echo 'Post-build phase starting' - - pwd - - mkdir -p build/allTests - - cp -f ./*/build/test-results/testDebugUnitTest/*.xml ./build/allTests - finally: - - echo 'Post-build phase completed.' -reports: - amplify-android-unit-tests: - files: - - build/allTests/* - discard-paths: yes - file-format: JUNITXML