Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lab_work 1 #134

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Node.js CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Yarn CLI
uses: CultureHQ/[email protected]
- run: yarn
- run: yarn build
- run: yarn nowatch-test
- run: yarn lint
- run: yarn check-deps
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"nowatch-test": "ng test --watch=false",
"lint": "ng lint",
"e2e": "ng e2e",
"prepare": "husky install",
Expand Down
21 changes: 21 additions & 0 deletions scripts/build_client.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

echo "Start getting modules";
npm install;
echo "Start build process";
if [ -z $1 ]
then
npm run build --configuration
else
npm rum configuration production
fi
echo "Check if previous version archive exist"
archive_name=app.zip;
cd ../dist;
if [ -f "./$archive_name" ]
then
echo "Delete previous version"
rm "./$archive_name";
fi
echo "Create new archive"
zip -rm $archive_name app;
121 changes: 121 additions & 0 deletions scripts/pipeline-2023-03-22T20:42:56+04:00.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"pipeline": {
"name": "angular-shop",
"roleArn": "roleArn",
"artifactStore": {
"type": "S3",
"location": "codepipeline-artifactStore-location"
},
"stages": [
{
"name": "Source",
"actions": [
{
"name": "Source",
"actionTypeId": {
"category": "Source",
"owner": "ThirdParty",
"provider": "GitHub",
"version": "1"
},
"runOrder": 1,
"configuration": {
"Branch": "master",
"OAuthToken": "****",
"Owner": "mihan-pro",
"PollForSourceChanges": "true",
"Repo": "shop-angular-cloudfront"
},
"outputArtifacts": [
{
"name": "SourceArtifact"
}
],
"inputArtifacts": [],
"region": "us-east-1",
"namespace": "SourceVariables"
}
]
},
{
"name": "QualityGate",
"actions": [
{
"name": "LintingAntUnitTesting",
"actionTypeId": {
"category": "Build",
"owner": "AWS",
"provider": "CodeBuild",
"version": "1"
},
"runOrder": 1,
"configuration": {
"EnvironmentVariables": "[{\"name\":\"BUILD_CONFIGURATION\",\"value\":\"{{BUILD_CONFIGURATION value}}\",\"type\":\"PLAINTEXT\"}]",
"ProjectName": "client-app-quality"
},
"outputArtifacts": [],
"inputArtifacts": [
{
"name": "SourceArtifact"
}
],
"region": "us-east-1"
}
]
},
{
"name": "Approve",
"actions": [
{
"name": "ManualApproval",
"actionTypeId": {
"category": "Approval",
"owner": "AWS",
"provider": "Manual",
"version": "1"
},
"runOrder": 1,
"configuration": {
"CustomData": "Approve me"
},
"outputArtifacts": [],
"inputArtifacts": [],
"region": "us-east-1"
}
]
},
{
"name": "Build",
"actions": [
{
"name": "BuildAndDeploy",
"actionTypeId": {
"category": "Build",
"owner": "AWS",
"provider": "CodeBuild",
"version": "1"
},
"runOrder": 1,
"configuration": {
"EnvironmentVariables": "[{\"name\":\"BUILD_CONFIGURATION\",\"value\":\"{{BUILD_CONFIGURATION value}}\",\"type\":\"PLAINTEXT\"}]",
"ProjectName": "client-app-build"
},
"outputArtifacts": [
{
"name": "BuildArtifact"
}
],
"inputArtifacts": [
{
"name": "SourceArtifact"
}
],
"region": "us-east-1",
"namespace": "BuildVariables"
}
]
}
],
"version": "2"
}
}
127 changes: 127 additions & 0 deletions scripts/pipeline.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
{
"pipeline": {
"name": "angular-shop",
"roleArn": "roleArn",
"artifactStore": {
"type": "S3",
"location": "codepipeline-artifactStore-location"
},
"stages": [
{
"name": "Source",
"actions": [
{
"name": "Source",
"actionTypeId": {
"category": "Source",
"owner": "ThirdParty",
"provider": "GitHub",
"version": "1"
},
"runOrder": 1,
"configuration": {
"Branch": "{{Branch name}}",
"OAuthToken": "****",
"Owner": "{{GitHub Owner}}",
"PollForSourceChanges": "{{PollForSourceChanges}}",
"Repo": "shop-angular-cloudfront"
},
"outputArtifacts": [
{
"name": "SourceArtifact"
}
],
"inputArtifacts": [],
"region": "us-east-1",
"namespace": "SourceVariables"
}
]
},
{
"name": "QualityGate",
"actions": [
{
"name": "LintingAntUnitTesting",
"actionTypeId": {
"category": "Build",
"owner": "AWS",
"provider": "CodeBuild",
"version": "1"
},
"runOrder": 1,
"configuration": {
"EnvironmentVariables": "[{\"name\":\"BUILD_CONFIGURATION\",\"value\":\"{{BUILD_CONFIGURATION value}}\",\"type\":\"PLAINTEXT\"}]",
"ProjectName": "client-app-quality"
},
"outputArtifacts": [],
"inputArtifacts": [
{
"name": "SourceArtifact"
}
],
"region": "us-east-1"
}
]
},
{
"name": "Approve",
"actions": [
{
"name": "ManualApproval",
"actionTypeId": {
"category": "Approval",
"owner": "AWS",
"provider": "Manual",
"version": "1"
},
"runOrder": 1,
"configuration": {
"CustomData": "Approve me"
},
"outputArtifacts": [],
"inputArtifacts": [],
"region": "us-east-1"
}
]
},
{
"name": "Build",
"actions": [
{
"name": "BuildAndDeploy",
"actionTypeId": {
"category": "Build",
"owner": "AWS",
"provider": "CodeBuild",
"version": "1"
},
"runOrder": 1,
"configuration": {
"EnvironmentVariables": "[{\"name\":\"BUILD_CONFIGURATION\",\"value\":\"{{BUILD_CONFIGURATION value}}\",\"type\":\"PLAINTEXT\"}]",
"ProjectName": "client-app-build"
},
"outputArtifacts": [
{
"name": "BuildArtifact"
}
],
"inputArtifacts": [
{
"name": "SourceArtifact"
}
],
"region": "us-east-1",
"namespace": "BuildVariables"
}
]
}
],
"version": 1
},
"metadata": {
"pipelineArn": "pipelineArn",
"created": 1586327944.749,
"updated": 1587023189.403
}
}

Loading