Skip to content
Snippets Groups Projects
Commit c3545f97 authored by dhoonjang's avatar dhoonjang
Browse files

set: gitlab ci/cd

parent 5d38b5fb
Branches
No related tags found
No related merge requests found
Pipeline #5018 passed
[{"/Users/dhoonjang/local/cd-tutorial/src/reportWebVitals.ts":"1","/Users/dhoonjang/local/cd-tutorial/src/App.tsx":"2"},{"size":425,"mtime":1608141108348,"results":"3","hashOfConfig":"4"},{"size":513,"mtime":1608141220740,"results":"5","hashOfConfig":"4"},{"filePath":"6","messages":"7","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1izlfld",{"filePath":"8","messages":"9","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/dhoonjang/local/cd-tutorial/src/reportWebVitals.ts",[],"/Users/dhoonjang/local/cd-tutorial/src/App.tsx",[]]
\ No newline at end of file
image: node:latest
stages:
- install
- build
- deploy
install:
stage: install
script:
- apt-get update -qq && apt-get install
- yarn config set cache-folder .yarn
- yarn install
artifacts:
name: "artifacts"
untracked: true
expire_in: 30 mins
paths:
- .yarn/
- node_modules/
rules:
- if: $CI_COMMIT_REF_NAME == "master"
when: always
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
when: always
- when: never
build:
stage: build
dependencies:
- install
script:
- yarn build
artifacts:
paths:
- build
expire_in: 30 mins
rules:
- if: $CI_COMMIT_REF_NAME == "master"
when: on_success
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
when: on_success
- when: never
deploy:
image: python:latest
stage: deploy
dependencies:
- build
variables:
S3_BUCKET_NAME: gitlab-cd-tutorial.git.ajou.ac.kr
before_script:
- pip install awscli
script:
- aws s3 sync build s3://$S3_BUCKET_NAME/ --acl public-read
rules:
- if: $CI_COMMIT_REF_NAME == "master"
when: on_success
- if: $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "master"
when: on_success
- when: never
import React from 'react'; import React from "react";
import logo from './logo.svg'; import logo from "./logo.svg";
import './App.css'; import "./App.css";
function App() { function App() {
return ( return (
<div className="App"> <div className="App">
<header className="App-header"> <header className="App-header">
<img src={logo} className="App-logo" alt="logo" /> <img src={logo} className="App-logo" alt="logo" />
<p> <p>Jang Dong Hoon - dhoonjang</p>
Edit <code>src/App.tsx</code> and save to reload.
</p>
<a <a
className="App-link" className="App-link"
href="https://reactjs.org" href="https://reactjs.org"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment