GitLab cicd starclass test
- make test_run.pyto pass with python uniitest
 1-1. make cicd variables insettings. 
script:
...
--assets $FRIDA_TEST_ASSET_0 
--assets $FRIDA_TEST_ASSET_
with parser.add_argument('--assets', default=[], action='append') this.
the yml file means that append CICD variable(FRIDA_TEST_ASSET_0 ) to assets
- 
    make run.pyto pass pipeline test stage
- 
    remove redundancy not linked to build stage 
Artifact
CICD_variables
- protected๋ protected tag or protected branch ๊ฐ ๋ค์ด๊ฐ ํ์ดํ๋ผ์ธ์์๋ง ์ ๊ทผ์ด ๊ฐ๋ฅ.
- docs ๋ค์ ์ฒดํฌํด์ ์ ๋ฆฌ
masked variable
- ์ ๊ทผ ๊ถํ ๋ฒ์ ์ค์ ๊ณผ ๊ด๋ จ์๋ ์ค์ 
- ํ์ดํ๋ผ์ธ ์คํ ๋ก๊ทธ๋ง ๋ณผ ์๋ง ์๋ ์ฌ๋(๊ถํ)์ด masked ์์ผ๋ฉด ๋ณ์๊ฐ ํ์๊ฐ๋จ
- masked(****)๋ก ์ถ๋ ฅ์ด ๋จ.
Credential Vault
๊ฐ์ ์๋น์ค ๋ ์์.
protected tags
- settings/repository ์ค์ ์ protected tags, protected branchs ์์ ์ค์ .
- ์์ฑ, ์ญ์  ๊ถํ ์์
- GITLAB์์๋ ์ญ์ ๊ฐ ์๋๊ฒ ํ๋ ค๊ณ (ํ๋ซํผ๋ง๋ค ๊ธฐ๋ฅ์ด ๋ค๋ฆ , ๊ถํ ๋ฒ์๋ ๋ค๋ฆ)
- Wildcards(*) ๋ฅผ ์ฌ์ฉํ๋ฉด ์๋์ผ๋ก dropdown์ด ์๊น.
CI_COMMIT_TAG
- CI_commit_tag๋ predefined variable์ธ๋ฐ ์ฌ๊ธฐ์ ๊ฐ์ด ์จ์ง๋ ๊ฒฝ์ฐ๋ ํด๋น ํ๊ทธ๊ฐ variable์ ์
๋ ฅ์ด ๋ ์ํ์์ ์งํ
    - repository์ ์๋ tags ๊ฐ CO_COMMIT
 
- ONLYTAGS
    - TAG๋ฅผ ๋ง๋ค๋ฉด ๊ทธ ๋ TRIGGER๊ฐ ๋์ PIPELINE ์คํ์ด ๋จ
- PROTECTED ์ฌ๋ถ ์๊ด์์ด PIPELINE ์คํ์ด ๋จ.
- local ์์ ์์ ํ push ํด๋ pipeline ์คํ์ด ์๋จ
- tag๊ฐ ์์ฑ๋ ๋๋ง pipeline ์คํ.
 
- EXCLUDE ์ต์
์ด ์์
    - REGEX๋ฅผ ์จ์ ํด๋น ํ๊ทธ๊ฐ ๋งค์นญ์ด ๋๋ฉด ์ํจ(PIPELINE)
 
- ํน์  TAG๋ฅผ ๊ฐ์ง REPOSITORY์์ BUILD ํ๋ ค๋ฉด?
    - ์ tag๋ฅผ ๊ทธ ๊ณผ๊ฑฐ tag๋ฅผ ์ ํํด์ ์๋ก ๋ง๋ค๋ฉด ๋จ
- ์์  ๋ค๋ฅธ ์์
์ ํ ๋๋.
        - ๋น๋ ํ๊ฒฝ์ด ์ ๋ฒ์ ์ด ๋์ค๋ฉด์ ๋ฐ๋๊ฑฐ๋ ํ์ ๊ฒฝ์ฐ ํฐ์ง
- ์์  ํ๊ฒฝ์ ๋ค์ ๊ฐ์ ธ์์ ์คํํ ์คํธ ํด๋ณผ ๊ฒฝ์ฐ (๋๋ฒ๊น )
 
 
TAG๋ CICD ๋๋๊ณ ๋ค๋ ๊ฒ์ด ์ง์ ํ CICD๋ค
CI
๊ฐ์ ๋ง๋ ๊ฑธ ํตํฉ
CD
ํตํฉํ DEPLOY
Appendix
argparse
- store_true
store_true ๋ฅผ ์ฃผ๊ฒ ๋๋ฉด default ๊ฐ์ผ๋ก Namespace์ True๊ฐ ์ ์ฅ๋๋ค.
    parser = argparse.ArgumentParser() parser.add_argument('--foo', action='store_true') parser.add_argument('--bar', action='store_false') parser.add_argument('--baz', action='store_false') parser.parse_args('--foo --bar'.split()) # Namespace(foo=True, bar=False, baz=True)
- append
    parser = argparse.ArgumentParser() parser.add_argument('--foo', action='append') parser.parse_args('--foo 1 --foo 2'.split()) # Namespace(foo=['1', '2'])
 
      
    
Leave a comment