Unix zcat command

It is a command that can be used on Unix system.
Display the contents of the compressed file with “gzip” command
Display the contents of the compressed file with “compress” command

Use it when displaying the contents of the compressed file!

linux chown command

The chown command changes user ownership(owner) and group ownership(group) of specified files and directories. User ownership is specified by user name or user ID, and group ownership is specified by group name or group ID.

Change user ownership. First, check user ownership and group ownership with “ls command”.
[vagrant@localhost symbolic]$ ls -l
合計 4
drwxr-xr-x 2 vagrant vagrant 4096 1月 27 20:32 2019 backupdir
lrwxrwxrwx 1 vagrant vagrant 10 1月 27 16:51 2019 latest -> text03.txt
lrwxrwxrwx 1 vagrant vagrant 12 1月 27 16:47 2019 latest~ -> mylist02.txt
-rw-rw-r– 1 vagrant vagrant 0 1月 27 16:43 2019 mylist01.txt
-rw-rw-r– 1 vagrant vagrant 0 1月 27 16:43 2019 mylist02.txt
-rw-rw-r– 1 vagrant vagrant 0 1月 27 16:50 2019 mylist03.txt

User ownership is “vagrant”, group ownership is also “vagrant”.

Change user ownership
Try changing the user ownership from “vagrant” to “root” without specifying a group. Execute the chown command as follows.

[vagrant@localhost symbolic]$ chown root mylist01.txt
chown: `mylist01.txt’ の所有権を変更中: 許可されていない操作です

It seems that root privilege is requried for chown execution.

[vagrant@localhost symbolic]$ sudo chown root mylist01.txt
[vagrant@localhost symbolic]$ ls -l mylist01.txt
-rw-rw-r– 1 root vagrant 0 1月 27 16:43 2019 mylist01.txt

Change user ownership and group ownership
Specify users and groups, and execute chown command. Between the users and the group, put : (semicolon).

[vagrant@localhost symbolic]$ sudo chown root:root mylist02.txt
[vagrant@localhost symbolic]$ ls -l mylist02.txt
-rw-rw-r– 1 root root 0 1月 27 16:43 2019 mylist02.txt

Directory ownership
To change directory ownership recursively, use option -R.

[vagrant@localhost app]$ sudo chown -hR root:root symbolic

Unix “ln” command

“ln” is a command to create a file link. Although you can create a hard link with “in file name link name”, it is more general to use a “-s” option and create a symbolic link as “ln -s file name link name”.

With “ln -s”, you can create a “symbolic link” of the file. A symbolic link is a so-colled “alias” of a file, giving a different name to a long file name or making it easier to handle a file in a place where it is difficult to specify a path name.

[vagrant@localhost symbolic]$ ls
mylist01.txt mylist02.txt

The “-l” option is a frequently used command. “L” means a long format. Just as long as it displays details, it becomes landscape.

[vagrant@localhost symbolic]$ ls -l
合計 0
-rw-rw-r– 1 vagrant vagrant 0 1月 27 16:43 2019 mylist01.txt
-rw-rw-r– 1 vagrant vagrant 0 1月 27 16:43 2019 mylist02.txt

Create a symbolic link named “latest” in “mylist02.txt” with “ln -s” command.
[vagrant@localhost symbolic]$ ln -s mylist02.txt latest
[vagrant@localhost symbolic]$ ls -l
合計 0
lrwxrwxrwx 1 vagrant vagrant 12 1月 27 16:47 2019 latest -> mylist02.txt
-rw-rw-r– 1 vagrant vagrant 0 1月 27 16:43 2019 mylist01.txt
-rw-rw-r– 1 vagrant vagrant 0 1月 27 16:43 2019 mylist02.txt

[vagrant@localhost symbolic]$ ls -l
合計 0
lrwxrwxrwx 1 vagrant vagrant 12 1月 27 16:47 2019 latest -> mylist02.txt
-rw-rw-r– 1 vagrant vagrant 0 1月 27 16:43 2019 mylist01.txt
-rw-rw-r– 1 vagrant vagrant 0 1月 27 16:43 2019 mylist02.txt
-rw-rw-r– 1 vagrant vagrant 0 1月 27 16:50 2019 mylist03.txt

[vagrant@localhost symbolic]$ ln -sb text03.txt latest
[vagrant@localhost symbolic]$ ls -l
合計 0
lrwxrwxrwx 1 vagrant vagrant 10 1月 27 16:51 2019 latest -> text03.txt
lrwxrwxrwx 1 vagrant vagrant 12 1月 27 16:47 2019 latest~ -> mylist02.txt
-rw-rw-r– 1 vagrant vagrant 0 1月 27 16:43 2019 mylist01.txt
-rw-rw-r– 1 vagrant vagrant 0 1月 27 16:43 2019 mylist02.txt
-rw-rw-r– 1 vagrant vagrant 0 1月 27 16:50 2019 mylist03.txt

In “ln -s” you can also create a link to nonexistent file.
[vagrant@localhost symbolic]$ ls
backupdir latest latest~ mylist01.txt mylist02.txt mylist03.txt
[vagrant@localhost symbolic]$ cd backupdir
[vagrant@localhost backupdir]$ ln -s ../.bashrc bashrc0518
[vagrant@localhost backupdir]$ ls
bashrc0518

What is dat file?

If dat is an extension, it is somewhat a data file, but don’t know what the data is, because “dat” has no fixed format.

In unix you can use “file command”. Since this command actually judges by looking at the contents of the file, it gets a little better answer.

data1.dat

data1

[vagrant@localhost app]$ file data1.dat
data1.dat: ASCII text, with no line terminators

TravisCI View config and Job log

View config – make it too simple

language: php
php:
- 5.5
script: phpunit test.php

Job log

Worker information

Cookbooks Version
7c2c6a6 https://github.com/travis-ci/travis-cookbooks/tree/7c2c6a6
git version
git version 2.15.1
bash version
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
gcc version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
docker version
Client:
 Version:      17.09.0-ce
 API version:  1.32
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:42:38 2017
 OS/Arch:      linux/amd64
Server:
 Version:      17.09.0-ce
 API version:  1.32 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   afdb6d4
 Built:        Tue Sep 26 22:41:20 2017
 OS/Arch:      linux/amd64
 Experimental: false
clang version
clang version 5.0.0 (tags/RELEASE_500/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/clang-5.0.0/bin
jq version
jq-1.5
bats version
Bats 0.4.0
shellcheck version
0.4.6
shfmt version
v2.0.0
ccache version
ccache version 3.1.9
Copyright (C) 2002-2007 Andrew Tridgell
Copyright (C) 2009-2011 Joel Rosdahl
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.
cmake version
cmake version 3.9.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
heroku version
heroku-cli/6.14.39-addc925 (linux-x64) node-v9.2.0
imagemagick version
Version: ImageMagick 6.7.7-10 2017-07-31 Q16 http://www.imagemagick.org
md5deep version
4.2
mercurial version
Mercurial Distributed SCM (version 4.2.2)
(see https://mercurial-scm.org for more information)
Copyright (C) 2005-2017 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
mysql version
mysql  Ver 14.14 Distrib 5.6.33, for debian-linux-gnu (x86_64) using  EditLine wrapper
openssl version
OpenSSL 1.0.1f 6 Jan 2014
packer version
Packer v1.0.2
Your version of Packer is out of date! The latest version
is 1.1.2. You can update by downloading from www.packer.io
postgresql client version
psql (PostgreSQL) 9.6.6
ragel version
Ragel State Machine Compiler version 6.8 Feb 2013
Copyright (c) 2001-2009 by Adrian Thurston
subversion version
svn, version 1.8.8 (r1568071)
   compiled Aug 10 2017, 17:20:39 on x86_64-pc-linux-gnu
Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/
The following repository access (RA) modules are available:
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - using serf 1.3.3
  - handles 'http' scheme
  - handles 'https' scheme
sudo version
Sudo version 1.8.9p5
Configure options: --prefix=/usr -v --with-all-insults --with-pam --with-fqdn --with-logging=syslog --with-logfac=authpriv --with-env-editor --with-editor=/usr/bin/editor --with-timeout=15 --with-password-timeout=0 --with-passprompt=[sudo] password for %p:  --without-lecture --with-tty-tickets --disable-root-mailer --enable-admin-flag --with-sendmail=/usr/sbin/sendmail --with-timedir=/var/lib/sudo --mandir=/usr/share/man --libexecdir=/usr/lib/sudo --with-sssd --with-sssd-lib=/usr/lib/x86_64-linux-gnu --with-selinux
Sudoers policy plugin version 1.8.9p5
Sudoers file grammar version 43
Sudoers path: /etc/sudoers
Authentication methods: 'pam'
Syslog facility if syslog is being used for logging: authpriv
Syslog priority to use when user authenticates successfully: notice
Syslog priority to use when user authenticates unsuccessfully: alert
Send mail if the user is not in sudoers
Use a separate timestamp for each user/tty combo
Lecture user the first time they run sudo
Root may run sudo
Allow some information gathering to give useful error messages
Require fully-qualified hostnames in the sudoers file
Visudo will honor the EDITOR environment variable
Set the LOGNAME and USER environment variables
Length at which to wrap log file lines (0 for no wrap): 80
Authentication timestamp timeout: 15.0 minutes
Password prompt timeout: 0.0 minutes
Number of tries to enter a password: 3
Umask to use or 0777 to use user's: 022
Path to mail program: /usr/sbin/sendmail
Flags for mail program: -t
Address to send mail to: root
Subject line for mail messages: *** SECURITY information for %h ***
Incorrect password message: Sorry, try again.
Path to authentication timestamp dir: /var/lib/sudo
Default password prompt: [sudo] password for %p: 
Default user to run commands as: root
Value to override user's $PATH with: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
Path to the editor for use by visudo: /usr/bin/editor
When to require a password for 'list' pseudocommand: any
When to require a password for 'verify' pseudocommand: all
File descriptors >= 3 will be closed before executing a command
Environment variables to check for sanity:
	TZ
	TERM
	LINGUAS
	LC_*
	LANGUAGE
	LANG
	COLORTERM
Environment variables to remove:
	RUBYOPT
	RUBYLIB
	PYTHONUSERBASE
	PYTHONINSPECT
	PYTHONPATH
	PYTHONHOME
	TMPPREFIX
	ZDOTDIR
	READNULLCMD
	NULLCMD
	FPATH
	PERL5DB
	PERL5OPT
	PERL5LIB
	PERLLIB
	PERLIO_DEBUG 
	JAVA_TOOL_OPTIONS
	SHELLOPTS
	GLOBIGNORE
	PS4
	BASH_ENV
	ENV
	TERMCAP
	TERMPATH
	TERMINFO_DIRS
	TERMINFO
	_RLD*
	LD_*
	PATH_LOCALE
	NLSPATH
	HOSTALIASES
	RES_OPTIONS
	LOCALDOMAIN
	CDPATH
	IFS
Environment variables to preserve:
	JAVA_HOME
	TRAVIS
	CI
	DEBIAN_FRONTEND
	XAUTHORIZATION
	XAUTHORITY
	PS2
	PS1
	PATH
	LS_COLORS
	KRB5CCNAME
	HOSTNAME
	HOME
	DISPLAY
	COLORS
Locale to use while parsing sudoers: C
Directory in which to store input/output logs: /var/log/sudo-io
File in which to store the input/output log: %{seq}
Add an entry to the utmp/utmpx file when allocating a pty
PAM service name to use
PAM service name to use for login shells
Create a new PAM session for the command to run in
Maximum I/O log sequence number: 0
Local IP address and netmask pairs:
	10.240.0.28/255.255.255.255
	172.17.0.1/255.255.0.0
Sudoers I/O plugin version 1.8.9p5
gzip version
gzip 1.6
Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by Jean-loup Gailly.
zip version
Copyright (c) 1990-2008 Info-ZIP - Type 'zip "-L"' for software license.
This is Zip 3.0 (July 5th 2008), by Info-ZIP.
Currently maintained by E. Gordon.  Please send bug reports to
the authors using the web page at www.info-zip.org; see README for details.
Latest sources and executables are at ftp://ftp.info-zip.org/pub/infozip,
as of above date; see http://www.info-zip.org/ for other sites.
Compiled with gcc 4.8.2 for Unix (Linux ELF) on Oct 21 2013.
Zip special compilation options:
	USE_EF_UT_TIME       (store Universal Time)
	BZIP2_SUPPORT        (bzip2 library version 1.0.6, 6-Sept-2010)
	    bzip2 code and library copyright (c) Julian R Seward
	    (See the bzip2 license for terms of use)
	SYMLINK_SUPPORT      (symbolic links supported)
	LARGE_FILE_SUPPORT   (can read and write large files on file system)
	ZIP64_SUPPORT        (use Zip64 to store large files in archives)
	UNICODE_SUPPORT      (store and read UTF-8 Unicode paths)
	STORE_UNIX_UIDs_GIDs (store UID/GID sizes/values using new extra field)
	UIDGID_NOT_16BIT     (old Unix 16-bit UID/GID extra field not used)
	[encryption, version 2.91 of 05 Jan 2007] (modified for Zip 3)
Encryption notice:
	The encryption code of this program is not copyrighted and is
	put in the public domain.  It was originally written in Europe
	and, to the best of our knowledge, can be freely distributed
	in both source and object forms from any country, including
	the USA under License Exception TSU of the U.S. Export
	Administration Regulations (section 740.13(e)) of 6 June 2002.
Zip environment options:
             ZIP:  [none]
          ZIPOPT:  [none]
vim version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:43:18)
Included patches: 1-52
Extra patches: 8.0.0056
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by buildd@
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
-clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   -perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            -ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H     -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl    -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions      
iptables version
iptables v1.4.21
curl version
curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
wget version
GNU Wget 1.15 built on linux-gnu.
rsync version
rsync  version 3.1.0  protocol version 31
gimme version
v1.2.0
nvm version
0.33.6
perlbrew version
/home/travis/perl5/perlbrew/bin/perlbrew  - App::perlbrew/0.80
phpenv version
rbenv 1.1.1-25-g6aa70b6
rvm version
rvm 1.29.3 (latest) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
default ruby version
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
CouchDB version
couchdb 1.6.1
ElasticSearch version
5.5.0
Installed Firefox version
firefox 56.0.2
MongoDB version
MongoDB 3.4.10
PhantomJS version
2.1.1
Pre-installed PostgreSQL versions
9.2.24
9.3.20
9.4.15
9.5.10
9.6.6
RabbitMQ Version
3.6.14
Redis version
redis-server 4.0.6
riak version
2.2.3
Pre-installed Go versions
1.7.4
ant version
Apache Ant(TM) version 1.9.3 compiled on April 8 2014
mvn version
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T07:58:13Z)
Maven home: /usr/local/maven-3.5.2
Java version: 1.8.0_151, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-98-generic", arch: "amd64", family: "unix"
gradle version
------------------------------------------------------------
Gradle 4.0.1
------------------------------------------------------------
Build time:   2017-07-07 14:02:41 UTC
Revision:     38e5dc0f772daecca1d2681885d3d85414eb6826
Groovy:       2.4.11
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_151 (Oracle Corporation 25.151-b12)
OS:           Linux 4.4.0-98-generic amd64
lein version
Leiningen 2.8.1 on Java 1.8.0_151 Java HotSpot(TM) 64-Bit Server VM
Pre-installed Node.js versions
v4.8.6
v6.12.0
v6.12.1
v8.9
v8.9.1
phpenv versions
  system
  5.6
* 5.6.32 (set by /home/travis/.phpenv/version)
  7.0
  7.0.25
  7.1
  7.1.11
  hhvm
  hhvm-stable
composer --version
Composer version 1.5.2 2017-09-11 16:59:25
Pre-installed Ruby versions
ruby-2.2.7
ruby-2.3.4
ruby-2.4.1
git.checkout
0.54s$ git clone --depth=50 --branch=master https://github.com/githubix/test.git githubix/test
Cloning into 'githubix/test'...
remote: Enumerating objects: 33, done.
remote: Counting objects: 100% (33/33), done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 36 (delta 2), reused 4 (delta 0), pack-reused 3
Unpacking objects: 100% (36/36), done.
$ cd githubix/test
$ git checkout -qf 7e08ab350f9bc489d90f6bfb08b4ad0a22ac5060
0.02s$ phpenv global 5.5 2>/dev/null
5.5 is not pre-installed; installing
Downloading archive: https://s3.amazonaws.com/travis-php-archives/binaries/ubuntu/14.04/x86_64/php-5.5.tar.bz2
19.87s$ curl -s -o archive.tar.bz2 $archive_url && tar xjf archive.tar.bz2 --directory /
0.01s0.02s$ phpenv global 5.5
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
1.22s$ composer self-update
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Updating to version 1.8.0 (stable channel).
    Downloading: 100%
Use composer self-update --rollback to return to version 1.2.0
$ php --version
PHP 5.5.38 (cli) (built: Aug 16 2016 19:20:01) 
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
$ composer --version
Composer version 1.8.0 2018-12-03 10:31:16
0.18s$ phpunit test.php
This is Travis ci first test2!Class 'test' could not be found in '/home/travis/build/githubix/test/test.php'.
The command "phpunit test.php" exited with 1.
Done. Your build exited with 1.

something wrong here, probably it cause by Travis.yml?

touch /.circleci/config.yml

create new folder “.circleci” and new file “config.yml” followed instruction of CircleCI add Projects for target Github repository.

Here is config.yml

# PHP CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-php/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/php:7.1-browsers
      
      # Specify service dependencies here if necessary
      # CircleCI maintains a library of pre-built images
      # documented at https://circleci.com/docs/2.0/circleci-images/
      # - image: circleci/mysql:9.4

    working_directory: ~/repo

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "composer.json" }}
          # fallback to using the latest cache if no exact match is found
          - v1-dependencies-

      - run: composer install -n --prefer-dist

      - save_cache:
          paths:
            - ./vendor
          key: v1-dependencies-{{ checksum "composer.json" }}
        
      # run tests!
      - run: phpunit

Update project file

echo "This is circle ci test3!"

build

Somehow it seems like I understand or do not understand.
Now, we will start to touch Travis CI.

Create a folder with Github

Since GitHub had only file creation, I did not know how to create it.

But we will make folders from file creation.
follow circleci project step below.

Create a folder named .circleci and add a fileconfig.yml (so that the filepath be in .circleci/config.yml).

In this case, add “/” to the tail of text. Therefore, text should be “.circleci/” from “.crcileci”.

Then, automatically new folder has created.

Well done, let’s make sure not to create files trying to make folders.

Try using CircleCI

facebook, kickstarter, spotify are using CircleCI.

Aouth CircleCI with Github

CircleCI dashboard

Failed? What!!

let’s watch job detail

Build-agent version 0.1.1480-7a5183d3 (2019-01-22T18:14:45+0000)
Starting container bash:4.4.19
  using image bash@sha256:9f0a4aa3c9931bd5fdda51b1b2b74a0398a8eabeaf9519d807e010b9d9d41993

Using build environment variables:
  BASH_ENV=/tmp/.bash_env-5c486cf91773df0008cbcc61-0-build
  CI=true
  CIRCLECI=true
  CIRCLE_BRANCH=master
  CIRCLE_BUILD_NUM=2
  CIRCLE_BUILD_URL=https://circleci.com/gh/githubix/test/2
  CIRCLE_COMPARE_URL=
  CIRCLE_JOB=Build Error
  CIRCLE_NODE_INDEX=0
  CIRCLE_NODE_TOTAL=1
  CIRCLE_PREVIOUS_BUILD_NUM=1
  CIRCLE_PROJECT_REPONAME=test
  CIRCLE_PROJECT_USERNAME=githubix
  CIRCLE_REPOSITORY_URL=git@github.com:githubix/test.git
  CIRCLE_SHA1=faed9c8c981615655d296d6137e3abdb9dddfc0d
  CIRCLE_SHELL_ENV=/tmp/.bash_env-5c486cf91773df0008cbcc61-0-build
  CIRCLE_STAGE=Build Error
  CIRCLE_USERNAME=githubix
  CIRCLE_WORKFLOW_ID=bd789861-e6e6-428d-877a-888ff642a15c
  CIRCLE_WORKFLOW_JOB_ID=23b817b9-9ef5-4bcc-861e-93fddfe7e6c7
  CIRCLE_WORKFLOW_UPSTREAM_JOB_IDS=
  CIRCLE_WORKFLOW_WORKSPACE_ID=bd789861-e6e6-428d-877a-888ff642a15c
  CIRCLE_WORKING_DIRECTORY=~/project
#!/bin/sh -eo pipefail
# No configuration was found in your project. Please refer to https://circleci.com/docs/2.0/ to get started with your configuration.
# 
# -------
# Warning: This configuration was auto-generated to show you the message above.
# Don't rerun this job. Rerunning will have no effect.
false

It is said “No configuration was found in your project”

Oh, understood the issue that do I need to create yml file??

How to use Circle CI?

CicleCI is CI service.
https://circleci.com/

By registering from the above page, we can automatically build, test, and deploy like Jenkins.

Jenkins needs to set up a Jenkins server on its own, but since CircleCI is a service that can be used only by registering.

Features
– It is a CI service
– Can cooperate with GitHub
– Run the build in the container under the concept of container
– Free for one container use (billing is required for multiple use)

Concept of Container
Although it is not limited to CircleCI, the CI tool has the concept of “Container”

Features
– As the name implies “box/container” image
– Run build, test and deploy in the container
– As the number of containers increases, the speed increases as it can be executed in parallel. However, CircleCI will be charged for using more than two containers.

When executing two or more builds, waiting time occurs because only one can be executed even when we run a lot of test, it can take time only because it can only be executed in series.

Webhook for Jenkins and github

One of the functions to link GitHub and Jenkins is called “Webhook”. By using this Webhook, you can run Jenkins’ jobs when pushing a branch to the repository managed on GitHub, when creating a new Pull Request, and so on.

There are three main ways to link Jenkins with GitHub and Webhook by the following three methods.

Jenkins Standard Webhook
– Set up “build for remote” provided as standard function of Jenkins
Git Plugin
– A plugin that can provide functions that can clone and execute git repositories when building Jenkins GitHub Plugin.
Plug-in to receive push event from GitHub
– Jenkins can automatically register Webhook to GitHub

Jenkins Standard Webhook
Build and trigger

Continue to configure Webhook with GitHub. From the repository page you can add it from Setting > Webhooks > Add Webhook.

Go to Github repository

See webhooks and add webhook

Jenkins
「Jenkinsの管理」>「ユーザーの管理」>「(API Token を取得したいユーザーID)」>「設定」>「APIトークンの表示」

Payload URL
http://[USER_ID]:[API_TOKEN]@[JENKINS_HOST]/job/[JOB_NAME]/[build|buildWithParameters]?token=[TOKEN_NAME]

Oh, Ok.
close jenkins
[vagrant@localhost app]$ sudo service jenkins stop
Shutting down Jenkins [ OK ]