Skip to content

Commit

Permalink
Merge pull request #29 from AdvMicrogrid/unified_changes_with_upstrea…
Browse files Browse the repository at this point in the history
…m_v20230703

Unified changes with upstream v20230703
  • Loading branch information
filippoh committed Aug 8, 2023
2 parents 9a72a9c + 9d5a4c4 commit 0fa3d92
Show file tree
Hide file tree
Showing 95 changed files with 6,050 additions and 1,904 deletions.
43 changes: 6 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
prepare_env:
# job to prepare build environment
docker:
- image: 411466821576.dkr.ecr.us-west-2.amazonaws.com/devops/ci/packer:0.0.1
- image: 411466821576.dkr.ecr.us-west-2.amazonaws.com/devops/ci/packer:1.9.1
working_directory: ~/aws_ecr_ami
steps:
- checkout:
Expand All @@ -14,18 +14,9 @@ jobs:
root: "~"
paths:
- aws_ecr_ami
validate:
docker:
- image: 411466821576.dkr.ecr.us-west-2.amazonaws.com/devops/ci/packer:0.0.1
steps:
- attach_workspace:
at: .
- run:
name: Packer Validate
command: cd aws_ecr_ami && make -e -j2 all-validate
build:
docker:
- image: 411466821576.dkr.ecr.us-west-2.amazonaws.com/devops/ci/packer:0.0.1
- image: 411466821576.dkr.ecr.us-west-2.amazonaws.com/devops/ci/packer:1.9.1
steps:
- attach_workspace:
at: .
Expand All @@ -35,46 +26,24 @@ jobs:
NORMALIZED_BRANCH_NAME=$(echo ${CIRCLE_BRANCH} | sed 's/[^a-zA-Z0-9]/-/g' | cut -c 1-50)
echo "export BUILD_TAG=${NORMALIZED_BRANCH_NAME}-${CIRCLE_BUILD_NUM}-${CIRCLE_SHA1::7}" >> ${BASH_ENV}
- run:
name: Packer build
name: Packer validate and build AMI
# AWS sometimes take really long to finish ami build.
# By default, Circle CI have 10 minutes timeout without response,
# so we must extend that timeout limit to be sure that ami build can pass
no_output_timeout: 60m
command: cd aws_ecr_ami && make -e -j2 all
command: cd aws_ecr_ami && PACKER_VARIABLE_FILE=fluence-eks-worker-al2-variables.json make -e -j2 1.23
workflows:
aws_eks_ami:
jobs:
- prepare_env:
context: AWS_OPERATIONS_DEV_0
- validate:
name: validate main
context:
- AWS_OPERATIONS_0
- PACKER_OPERATIONS_0
filters:
branches:
only:
- main
requires:
- prepare_env
- validate:
name: validate dev
context:
- AWS_OPERATIONS_DEV_0
- PACKER_OPERATIONS_DEV_0
filters:
branches:
only:
- dev
requires:
- prepare_env
- build:
name: build main
context:
- AWS_OPERATIONS_0
- PACKER_OPERATIONS_0
requires:
- validate main
- prepare_env
filters:
branches:
only:
Expand All @@ -85,7 +54,7 @@ workflows:
- AWS_OPERATIONS_DEV_0
- PACKER_OPERATIONS_DEV_0
requires:
- validate dev
- prepare_env
filters:
branches:
only:
Expand Down
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ensure that these rules are equivalent to the flags to shfmt in the Makefile.
# we can't use this file with shfmt directly because there's no way to express
# shebang matching on files without the `sh` extension.
[*.sh]
indent_style = space
indent_size = 2
binary_next_line = true
switch_case_indent = true
space_redirects = true
keep_padding = false
function_next_line = false
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Applied code style rules to shell files
6014c4e6872a23f82ca295afa93b033207042876

10 changes: 8 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
*Issue #, if available:*
**Issue #, if available:**

*Description of changes:*
**Description of changes:**


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

<!-- If this is a security issue, please do not discuss on GitHub. Please report any suspected or confirmed security issues to AWS Security https://aws.amazon.com/security/vulnerability-reporting/ -->

**Testing Done**

<!-- Include information regarding the testing that was completed with this changes. Where applicable, include details steps to replicate. -->

*[See this guide for recommended testing for PRs.](../doc/CONTRIBUTING.md#testing-changes) Some tests may not apply. Completing tests and providing additional validation steps are not required, but it is recommended and may reduce review time and time to merge.*
26 changes: 26 additions & 0 deletions .github/workflows/alas-issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: "[ALAS] Open issues for new bulletins"
on:
workflow_dispatch:
inputs:
window:
description: "Only consider bulletins published within this relative time window (golang Duration)"
default: "24h"
required: true
schedule:
# once an hour, at the top of hour
- cron: "0 * * * *"
permissions:
issues: write
jobs:
alas-al2-bulletins:
runs-on: ubuntu-latest
steps:
- uses: guilhem/rss-issues-action@0.5.2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
feed: "https://alas.aws.amazon.com/AL2/alas.rss"
dry-run: "true"
lastTime: "${{ github.event.inputs.window || '24h' }}"
labels: "alas,alas/al2"
titleFilter: "(medium|low)"
24 changes: 24 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI
on:
workflow_dispatch:
push:
branches:
- 'master'
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- run: go install mvdan.cc/sh/v3/cmd/shfmt@latest
- run: make lint
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: make test
48 changes: 48 additions & 0 deletions .github/workflows/sync-eni-max-pods.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: '[Sync] Update eni-max-pods.txt'
on:
workflow_dispatch:
schedule:
# once a day
- cron: '0 0 * * *'
permissions:
id-token: write
contents: write
pull-requests: write
jobs:
update-max-pods:
# this workflow will always fail in forks; bail if this isn't running in the upstream
if: github.repository == 'awslabs/amazon-eks-ami'
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: ${{ secrets.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
- uses: actions/checkout@v3
with:
repository: awslabs/amazon-eks-ami
ref: refs/heads/master
path: amazon-eks-ami/
- uses: actions/checkout@v3
with:
repository: aws/amazon-vpc-cni-k8s
ref: refs/heads/master
path: amazon-vpc-cni-k8s/
- run: |
#!/usr/bin/env bash
set -o errexit
cd amazon-vpc-cni-k8s/
make generate-limits
cp misc/eni-max-pods.txt ../amazon-eks-ami/files/eni-max-pods.txt
- uses: peter-evans/create-pull-request@v4
with:
branch: update-eni-max-pods
path: amazon-eks-ami/
add-paths: files/eni-max-pods.txt
commit-message: "Update eni-max-pods.txt"
title: "Update eni-max-pods.txt"
body: |
Generated by [aws/amazon-vpc-cni-k8s](https://github.com/aws/amazon-vpc-cni-k8s):
```
make generate-limits
```
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*manifest.json
*.swp
.idea
*version-info.json
.DS_Store
5 changes: 3 additions & 2 deletions ArchiveBuildConfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ dependencies:
dirs:
- src: files/
- src: scripts/
- src: log-collector-script/
files:
- src: Makefile
- src: eks-worker-al2.json
- src: amazon-eks-nodegroup.yaml
- src: eks-worker-al2-variables.json
archive:
name: amazon-eks-ami.tar.gz
type: tgz
type: tgz
Loading

0 comments on commit 0fa3d92

Please sign in to comment.