i want to upload mysql log onto circleci artifact folder

43 Views Asked by At

I tried to upload mysql log onto cicleci making logging image and buildin into circleci pipeline.

but doest show up. how can improve it ..

i pushed Dockerhub which has logging config of my.cnf to tabuchan/my-mysql:tag1 and made a pipeline


[mysqld]
general_log=1
log-error=/var/log/mysql/mysql.log
general_log_file=/var/log/general.log

Docker

FROM mysql:latest

FROM cimg/mysql:5.7
ENV MYSQL_ALLOW_EMPTY_PASSWORD=yes
COPY ./my.cnf /etc/mysql/my.cnf

circleci is more large but i simplify to make the things easy to be solved.

circleci config

version: 2.1
jobs:
  build:
    docker:
      - image: cimg/ruby:2.6.9
        environment:
          TZ: Asia/Tokyo
          LOCALE: ja
          LANGUAGE: ja_JP.UTF-8
          RAILS_ENV: test
          FUNDINNO_DATABASE_HOST: 127.0.0.1
          FUNDINNO_DATABASE_USERNAME: "root"
          FUNDINNO_DATABASE_PASSWORD: ""
          FUNDINNO_TEST_ENV: circleci
      - image: tabuchan/my-mysql:tag1  ★logging Docker!!!!!
        environment:
          TZ: Asia/Tokyo
        command:
          mysqld --sql-mode=NO_ENGINE_SUBSTITUTION
      - image: cimg/redis:5.0
        environment:
          TZ: Asia/Tokyo
      - image: mongo:4.4.3
        environment:
          TZ: Asia/Tokyo
    resource_class: large
    parallelism: 16
    working_directory: ~/repo
    steps:
      - checkout
      # Install Node.js
      # Wait for DB
      - run:
          name: Wait for DB
          command: dockerize -wait tcp://127.0.0.1:3306 -timeout 120s
      # Wait for DB
      - store_artifacts:
          path: /var/log/mysql/mysql.log ★ i want to upload!!!!!!
          destination: mysqld.log
      - store_artifacts:
          path: /var/log/mysql/error.log
          destination: mysql-error.log
workflows:
  version: 2
  build-deploy:
    jobs:
      - build
0

There are 0 best solutions below