diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 4bbd40ff0c..0000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,531 +0,0 @@ -version: 2.1 - -orbs: - redhat-openshift: circleci/redhat-openshift@0.2.0 - gcp-gcr: circleci/gcp-gcr@0.7.1 - helm: circleci/helm@0.2.3 - -jobs: - tools: - machine: - image: ubuntu-2004:202107-02 - working_directory: ~/cas-ciip-portal - steps: - - checkout: - path: ~/cas-ciip-portal - - run: - name: "Checkout Submodules" - command: | - git submodule update --init - - run: - name: Ensure python has OpenSSL - command: | - # @see https://github.com/pyenv/pyenv/wiki/Common-build-problems - sudo apt-get update - sudo apt-get install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget libdbd-pg-perl - - restore_cache: - name: Restore asdf Tools Cache - keys: - - tool-versions-{{ checksum ".tool-versions" }}-v2 - - run: - name: Install tools via asdf - command: | - [[ -d ~/.asdf ]] || git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.0 - pushd ~/.asdf && git checkout v0.8.0 && popd - echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.bashrc - echo -e '\nexport BASH_ENV="~/.asdf/asdf.sh"' >> ~/.bashrc - source ~/.bashrc - make install_asdf_tools - pg_ctl start - make -C schema install_pgtap - pg_ctl stop - - save_cache: - name: Save asdf Tools Cache - key: tool-versions-{{ checksum ".tool-versions" }}-v2 - paths: - - ~/.asdf - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-{{ checksum "app/yarn.lock" }}-1 - - run: - name: Install Yarn Dependencies - command: | - source ~/.bashrc - pushd app - yarn install --frozen-lockfile - popd - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-{{ checksum "app/yarn.lock" }}-1 - paths: - - ~/.cache/yarn - - ~/.cache/Cypress - - run: - name: Configure Cpan - command: | - echo | cpan # accept cpan defaults - - restore_cache: - name: Restore Cpan Package Cache - keys: - - cpanm-packages-b-{{ checksum "schema/cpanfile" }}-v2 - - run: - name: Install Cpan Dependencies - command: | - source ~/.bashrc # load perl config (just written by cpan) & asdf - cat .tool-versions | xargs -n2 asdf global # make this project's versions global - make install_perl_tools - - save_cache: - name: Save Cpan Package Cache - key: cpanm-packages-b-{{ checksum "schema/cpanfile" }}-v2 - paths: - - ~/perl5 - - persist_to_workspace: - root: ~/ - paths: - - .asdf - - .bashrc - - .cache/Cypress # contains the cypress binary. Needed for the e2e job - - cas-ciip-portal - - perl5 - - build_image: - executor: gcp-gcr/default - parameters: - dockerfile: - type: string - default: Dockerfile - image_tag: - type: string - image_name: - type: string - cache_version: - type: integer - default: 1 - steps: - - checkout - - gcp-gcr/gcr-auth - - restore_cache: - keys: - - v<< parameters.cache_version>>-<< parameters.image_name >>-{{ .Branch }} - paths: - - /tmp/<< parameters.image_name >>.tar - - run: - name: Load cache - command: | - set +o pipefail - docker load -i /tmp/<< parameters.image_name >>.tar | true - - run: - name: Log in to DockerHub - command: echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USER --password-stdin registry.hub.docker.com - - run: - name: Build tools Docker image - command: >- - docker build --cache-from=<< parameters.image_name >> - -t << parameters.image_name >>:latest - -t gcr.io/${GOOGLE_PROJECT_ID}/<< parameters.image_name >>:latest - -t gcr.io/${GOOGLE_PROJECT_ID}/<< parameters.image_name >>:<< parameters.image_tag >> - -f << parameters.dockerfile >> - . - - run: - name: Save Docker image layer cache - command: | - docker save -o /tmp/<< parameters.image_name >>.tar << parameters.image_name >>:latest - - save_cache: - key: v<< parameters.cache_version>>-<< parameters.image_name >>-{{ .Branch }}-{{ epoch }} - paths: - - /tmp/<< parameters.image_name >>.tar - - gcp-gcr/push-image: - image: << parameters.image_name >> - tag: << parameters.image_tag >> - digest-path: /tmp/digest.txt - - gcp-gcr/tag-image: - image: << parameters.image_name >> - source-tag: << parameters.image_tag >> - target-tag: latest - - run: - command: | - echo "Digest is: $(