From 3033034f206cf6695023f0461f3aa120a218891b Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 28 Jul 2020 03:15:42 +0100 Subject: [PATCH 1/4] Package files to deploy --- apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh b/apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh index 43d7f2548d..a79961cda4 100755 --- a/apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh +++ b/apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh @@ -11,6 +11,9 @@ git rm --cached -r -f . echo "# Automatic build" > README.md echo "Built website from \`$SHA\`. See https://github.com/ethereum/remix-ide/ for details." >> README.md echo "To use an offline copy, download \`remix-$SHA.zip\`." >> README.md +cp -r $FILES_TO_PACKAGE "./" +rm -rf dist +FILES_TO_DEPLOY="assets index.html main.js polyfills.js runtime.js vendor.js" # ZIP the whole directory zip -r remix-$SHA.zip $FILES_TO_PACKAGE # -f is needed because "build" is part of .gitignore From 3ab373a13d0fe7b8f1d557bec61bceab1617618c Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 28 Jul 2020 08:17:56 +0100 Subject: [PATCH 2/4] Disable parent parent jobs --- .circleci/config.yml | 193 +++++++++--------- .../ci/deploy_from_travis_remix-alpha.sh | 5 +- 2 files changed, 98 insertions(+), 100 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2a41cc91a3..8d8ebd8855 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,10 +21,10 @@ jobs: steps: - checkout - - run: npm install - - run: npm run lint:libs - - run: npm run build:libs - - run: npm run test:libs + # - run: npm install + # - run: npm run lint:libs + # - run: npm run build:libs + # - run: npm run test:libs remix-ide-chrome: docker: @@ -45,31 +45,31 @@ jobs: parallelism: 20 steps: - checkout - - run: npm install - - run: npm run lint - - run: npm run build:libs - - run: npm run downloadsolc_root - - run: npm run build - - run: - name: Download Compatible JAVA Version for Selenium - command: | - java -version - sudo apt-get purge --auto-remove java-common - sudo apt-get update - sudo apt-get install openjdk-8-jdk - java -version - - run: - name: Download Selenium - command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js - - run: - name: Start Selenium - command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js - background: true - - run: ./apps/remix-ide/ci/browser_tests_chrome.sh - - store_test_results: - path: ./apps/remix-ide/reports/tests - - store_artifacts: - path: ./apps/remix-ide/reports/screenshots + # - run: npm install + # - run: npm run lint + # - run: npm run build:libs + # - run: npm run downloadsolc_root + # - run: npm run build + # - run: + # name: Download Compatible JAVA Version for Selenium + # command: | + # java -version + # sudo apt-get purge --auto-remove java-common + # sudo apt-get update + # sudo apt-get install openjdk-8-jdk + # java -version + # - run: + # name: Download Selenium + # command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js + # - run: + # name: Start Selenium + # command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js + # background: true + # - run: ./apps/remix-ide/ci/browser_tests_chrome.sh + # - store_test_results: + # path: ./apps/remix-ide/reports/tests + # - store_artifacts: + # path: ./apps/remix-ide/reports/screenshots remix-ide-firefox: docker: @@ -90,29 +90,29 @@ jobs: parallelism: 20 steps: - checkout - - run: npm install - - run: npm run lint - - run: npm run build:libs - - run: npm run downloadsolc_root - - run: npm run build - - run: - name: Download Selenium - command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js - - run: - name: Start Selenium - command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js - background: true - - run: - name: Download Latest Firefox - command: sudo apt-get purge -y firefox && wget https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb - - run: - name: Install Firefox - command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb - - run: ./apps/remix-ide/ci/browser_tests_firefox.sh - - store_test_results: - path: ./apps/remix-ide/reports/tests - - store_artifacts: - path: ./apps/remix-ide/reports/screenshots + # - run: npm install + # - run: npm run lint + # - run: npm run build:libs + # - run: npm run downloadsolc_root + # - run: npm run build + # - run: + # name: Download Selenium + # command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js + # - run: + # name: Start Selenium + # command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js + # background: true + # - run: + # name: Download Latest Firefox + # command: sudo apt-get purge -y firefox && wget https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb + # - run: + # name: Install Firefox + # command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb + # - run: ./apps/remix-ide/ci/browser_tests_firefox.sh + # - store_test_results: + # path: ./apps/remix-ide/reports/tests + # - store_artifacts: + # path: ./apps/remix-ide/reports/screenshots remix-ide-run-deploy: docker: @@ -132,29 +132,29 @@ jobs: steps: - checkout - - run: npm install - - run: npm run lint - - run: npm run build:libs - - run: npm run downloadsolc_root - - run: npm run build - - run: - name: Download Compatible JAVA Version for Selenium - command: | - java -version - sudo apt-get purge --auto-remove java-common - sudo apt-get update - sudo apt-get install openjdk-8-jdk - java -version - - run: - name: Download Selenium - command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js - - run: - name: Start Selenium - command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js - background: true - - run: ./apps/remix-ide/ci/browser_tests_run_deploy.sh - - store_artifacts: - path: ./apps/remix-ide/reports/screenshots + # - run: npm install + # - run: npm run lint + # - run: npm run build:libs + # - run: npm run downloadsolc_root + # - run: npm run build + # - run: + # name: Download Compatible JAVA Version for Selenium + # command: | + # java -version + # sudo apt-get purge --auto-remove java-common + # sudo apt-get update + # sudo apt-get install openjdk-8-jdk + # java -version + # - run: + # name: Download Selenium + # command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js + # - run: + # name: Start Selenium + # command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js + # background: true + # - run: ./apps/remix-ide/ci/browser_tests_run_deploy.sh + # - store_artifacts: + # path: ./apps/remix-ide/reports/screenshots deploy-remix-live: @@ -175,19 +175,19 @@ jobs: steps: - checkout - - run: npm install - - run: npm run lint - - run: npm run build:libs - - run: npm run downloadsolc_root - - run: npm run build - - run: - name: Deploy - command: | - if [ "${CIRCLE_BRANCH}" == "remix_live" ]; then - ./apps/remix-ide/ci/deploy_from_travis_remix-live.sh; - fi - - store_artifacts: - path: ./apps/remix-ide/reports/screenshots + # - run: npm install + # - run: npm run lint + # - run: npm run build:libs + # - run: npm run downloadsolc_root + # - run: npm run build + # - run: + # name: Deploy + # command: | + # if [ "${CIRCLE_BRANCH}" == "remix_live" ]; then + # ./apps/remix-ide/ci/deploy_from_travis_remix-live.sh; + # fi + # - store_artifacts: + # path: ./apps/remix-ide/reports/screenshots publish-docker: docker: @@ -207,12 +207,12 @@ jobs: steps: - checkout - - setup_remote_docker - - run: npm install - - run: npm run build:libs - - run: npm run downloadsolc_root - - run: npm run build - - run: ./apps/remix-ide/ci/build_and_publish_docker_images.sh + # - setup_remote_docker + # - run: npm install + # - run: npm run build:libs + # - run: npm run downloadsolc_root + # - run: npm run build + # - run: ./apps/remix-ide/ci/build_and_publish_docker_images.sh deploy-remix-alpha: docker: @@ -277,7 +277,4 @@ workflows: requires: - remix-ide-chrome - remix-ide-firefox - - remix-ide-run-deploy - filters: - branches: - only: master \ No newline at end of file + - remix-ide-run-deploy \ No newline at end of file diff --git a/apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh b/apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh index a79961cda4..ca383e1d57 100755 --- a/apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh +++ b/apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh @@ -13,11 +13,12 @@ echo "Built website from \`$SHA\`. See https://github.com/ethereum/remix-ide/ fo echo "To use an offline copy, download \`remix-$SHA.zip\`." >> README.md cp -r $FILES_TO_PACKAGE "./" rm -rf dist +ls FILES_TO_DEPLOY="assets index.html main.js polyfills.js runtime.js vendor.js" # ZIP the whole directory -zip -r remix-$SHA.zip $FILES_TO_PACKAGE +zip -r remix-$SHA.zip $FILES_TO_DEPLOY # -f is needed because "build" is part of .gitignore -git add -f $FILES_TO_PACKAGE remix-$SHA.zip +git add -f $FILES_TO_DEPLOY remix-$SHA.zip git commit -m "Built website from {$SHA}." git push -f git@github.com:ethereum/remix-live-alpha.git gh-pages From 2a68c60709b718ed2cf7716c0cd73731143a4ee4 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 28 Jul 2020 08:25:35 +0100 Subject: [PATCH 3/4] Remove master condition temporarily for test purpose --- .circleci/config.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8d8ebd8855..a8895e21b5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -237,12 +237,7 @@ jobs: - run: npm run build:libs - run: npm run downloadsolc_root - run: npm run build - - run: - name: Deploy - command: | - if [ "${CIRCLE_BRANCH}" == "master" ]; then - ./apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh; - fi + - run: ./apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh - store_artifacts: path: ./apps/remix-ide/reports/screenshots From bd5b532bf3f74cc49b077ceef8c14b4b7abb75dc Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 28 Jul 2020 08:35:28 +0100 Subject: [PATCH 4/4] Restore parent job and build steps --- .circleci/config.yml | 200 ++++++++++++++++++++++--------------------- 1 file changed, 104 insertions(+), 96 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a8895e21b5..2a41cc91a3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,10 +21,10 @@ jobs: steps: - checkout - # - run: npm install - # - run: npm run lint:libs - # - run: npm run build:libs - # - run: npm run test:libs + - run: npm install + - run: npm run lint:libs + - run: npm run build:libs + - run: npm run test:libs remix-ide-chrome: docker: @@ -45,31 +45,31 @@ jobs: parallelism: 20 steps: - checkout - # - run: npm install - # - run: npm run lint - # - run: npm run build:libs - # - run: npm run downloadsolc_root - # - run: npm run build - # - run: - # name: Download Compatible JAVA Version for Selenium - # command: | - # java -version - # sudo apt-get purge --auto-remove java-common - # sudo apt-get update - # sudo apt-get install openjdk-8-jdk - # java -version - # - run: - # name: Download Selenium - # command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js - # - run: - # name: Start Selenium - # command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js - # background: true - # - run: ./apps/remix-ide/ci/browser_tests_chrome.sh - # - store_test_results: - # path: ./apps/remix-ide/reports/tests - # - store_artifacts: - # path: ./apps/remix-ide/reports/screenshots + - run: npm install + - run: npm run lint + - run: npm run build:libs + - run: npm run downloadsolc_root + - run: npm run build + - run: + name: Download Compatible JAVA Version for Selenium + command: | + java -version + sudo apt-get purge --auto-remove java-common + sudo apt-get update + sudo apt-get install openjdk-8-jdk + java -version + - run: + name: Download Selenium + command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js + - run: + name: Start Selenium + command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js + background: true + - run: ./apps/remix-ide/ci/browser_tests_chrome.sh + - store_test_results: + path: ./apps/remix-ide/reports/tests + - store_artifacts: + path: ./apps/remix-ide/reports/screenshots remix-ide-firefox: docker: @@ -90,29 +90,29 @@ jobs: parallelism: 20 steps: - checkout - # - run: npm install - # - run: npm run lint - # - run: npm run build:libs - # - run: npm run downloadsolc_root - # - run: npm run build - # - run: - # name: Download Selenium - # command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js - # - run: - # name: Start Selenium - # command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js - # background: true - # - run: - # name: Download Latest Firefox - # command: sudo apt-get purge -y firefox && wget https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb - # - run: - # name: Install Firefox - # command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb - # - run: ./apps/remix-ide/ci/browser_tests_firefox.sh - # - store_test_results: - # path: ./apps/remix-ide/reports/tests - # - store_artifacts: - # path: ./apps/remix-ide/reports/screenshots + - run: npm install + - run: npm run lint + - run: npm run build:libs + - run: npm run downloadsolc_root + - run: npm run build + - run: + name: Download Selenium + command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js + - run: + name: Start Selenium + command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js + background: true + - run: + name: Download Latest Firefox + command: sudo apt-get purge -y firefox && wget https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb + - run: + name: Install Firefox + command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb + - run: ./apps/remix-ide/ci/browser_tests_firefox.sh + - store_test_results: + path: ./apps/remix-ide/reports/tests + - store_artifacts: + path: ./apps/remix-ide/reports/screenshots remix-ide-run-deploy: docker: @@ -132,29 +132,29 @@ jobs: steps: - checkout - # - run: npm install - # - run: npm run lint - # - run: npm run build:libs - # - run: npm run downloadsolc_root - # - run: npm run build - # - run: - # name: Download Compatible JAVA Version for Selenium - # command: | - # java -version - # sudo apt-get purge --auto-remove java-common - # sudo apt-get update - # sudo apt-get install openjdk-8-jdk - # java -version - # - run: - # name: Download Selenium - # command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js - # - run: - # name: Start Selenium - # command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js - # background: true - # - run: ./apps/remix-ide/ci/browser_tests_run_deploy.sh - # - store_artifacts: - # path: ./apps/remix-ide/reports/screenshots + - run: npm install + - run: npm run lint + - run: npm run build:libs + - run: npm run downloadsolc_root + - run: npm run build + - run: + name: Download Compatible JAVA Version for Selenium + command: | + java -version + sudo apt-get purge --auto-remove java-common + sudo apt-get update + sudo apt-get install openjdk-8-jdk + java -version + - run: + name: Download Selenium + command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js + - run: + name: Start Selenium + command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js + background: true + - run: ./apps/remix-ide/ci/browser_tests_run_deploy.sh + - store_artifacts: + path: ./apps/remix-ide/reports/screenshots deploy-remix-live: @@ -175,19 +175,19 @@ jobs: steps: - checkout - # - run: npm install - # - run: npm run lint - # - run: npm run build:libs - # - run: npm run downloadsolc_root - # - run: npm run build - # - run: - # name: Deploy - # command: | - # if [ "${CIRCLE_BRANCH}" == "remix_live" ]; then - # ./apps/remix-ide/ci/deploy_from_travis_remix-live.sh; - # fi - # - store_artifacts: - # path: ./apps/remix-ide/reports/screenshots + - run: npm install + - run: npm run lint + - run: npm run build:libs + - run: npm run downloadsolc_root + - run: npm run build + - run: + name: Deploy + command: | + if [ "${CIRCLE_BRANCH}" == "remix_live" ]; then + ./apps/remix-ide/ci/deploy_from_travis_remix-live.sh; + fi + - store_artifacts: + path: ./apps/remix-ide/reports/screenshots publish-docker: docker: @@ -207,12 +207,12 @@ jobs: steps: - checkout - # - setup_remote_docker - # - run: npm install - # - run: npm run build:libs - # - run: npm run downloadsolc_root - # - run: npm run build - # - run: ./apps/remix-ide/ci/build_and_publish_docker_images.sh + - setup_remote_docker + - run: npm install + - run: npm run build:libs + - run: npm run downloadsolc_root + - run: npm run build + - run: ./apps/remix-ide/ci/build_and_publish_docker_images.sh deploy-remix-alpha: docker: @@ -237,7 +237,12 @@ jobs: - run: npm run build:libs - run: npm run downloadsolc_root - run: npm run build - - run: ./apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh + - run: + name: Deploy + command: | + if [ "${CIRCLE_BRANCH}" == "master" ]; then + ./apps/remix-ide/ci/deploy_from_travis_remix-alpha.sh; + fi - store_artifacts: path: ./apps/remix-ide/reports/screenshots @@ -272,4 +277,7 @@ workflows: requires: - remix-ide-chrome - remix-ide-firefox - - remix-ide-run-deploy \ No newline at end of file + - remix-ide-run-deploy + filters: + branches: + only: master \ No newline at end of file