Skip to content

Commit b406aa9

Browse files
'Migrate repository from old GitHub organization.'
1 parent 0d8b0a0 commit b406aa9

File tree

14 files changed

+140
-22
lines changed

14 files changed

+140
-22
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
pull_request:
3+
types:
4+
- closed
5+
branches:
6+
- main
7+
8+
name: increment-tagged-version
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
increment_tag:
15+
if: github.event.pull_request.merged == true
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
ref: 'main'
21+
- name: Fetch Tags
22+
run: git fetch --tags origin
23+
- name: Increment Tagged Version
24+
uses: launchbynttdata/actions-lcaf-increment_tagged_version@v0
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
on:
2+
push:
3+
branches: [ "**" ]
4+
pull_request:
5+
branches: [ "main" ]
6+
7+
name: lint
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
lint:
14+
name: Lint Module
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Lint Terraform
19+
uses: launchbynttdata/actions-lcaf-terraform_lint@v0
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on:
2+
pull_request:
3+
branches: [ "main" ]
4+
5+
name: validate-branch-name
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
lint:
12+
name: Validate Branch Name
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Validate Branch Name
17+
uses: launchbynttdata/actions-lcaf-branch_name@v0

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ components/
1111
# We don't want to commit the test run lock files
1212
.terraform.lock.hcl
1313

14+
# Don't include the .test-data directory created by Terratest's test-structure module
15+
**/.test-data/*
16+
1417
# Local .terraform directories
1518
**/.terraform/*
1619

@@ -57,3 +60,6 @@ azure_env.sh
5760

5861
# Pre-commit hook
5962
.pre-commit-config.yaml
63+
64+
# VS Code
65+
.vscode/

.lcafenv

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Use this file to preset variables used by the Makefile.
2+
# This file will be included when make is run. The variables below will
3+
# take precedence over what is defined in Makefile when they are set. This
4+
# allows overriding certain settings without modifying the Makefile.
5+
6+
# REPO_MANIFESTS_URL="https://github.com/launchbynttdata/launch-common-automation-framework.git"
7+
# REPO_BRANCH="refs/tags/1.0.0"
8+
# REPO_MANIFEST="manifests/terraform_modules/seed/manifest.xml"
9+
# REPO_URL="https://github.com/launchbynttdata/git-repo.git"
10+
# REPO_REV="main"
11+
# GITBASE="https://github.com/launchbynttdata/"
12+
# GITREV="main"
13+
# IS_PIPELINE="false"
14+
# IS_AUTHENTICATED="false"
15+
# JOB_NAME="job"
16+
# JOB_EMAIL="[email protected]"
17+
# PLATFORM_VER=
18+
# CONTAINER_VER=
19+
# PIPELINES_VER=
20+
# WEBHOOK_VER=
21+
# PYTHON_VER=
22+
# TERRAGRUNT_VER=
23+
# TERRAFORM_VER=

.tool-versions

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
conftest 0.44.1
2-
golang 1.20.8
3-
golangci-lint 1.53.3
2+
golang 1.21.7
3+
golangci-lint 1.55.2
44
pre-commit 3.3.3
5+
regula 3.2.1 # https://github.com/launchbynttdata/asdf-regula
56
terraform 1.5.5
67
terraform-docs 0.16.0
78
terragrunt 0.39.2

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @nexient-llc/terraform-administrators
1+
* @launchbynttdata/terraform-administrators

Makefile

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,26 @@
1010
# See the License for the specific language governing permissions and
1111
# limitations under the License.
1212

13-
# Include custom values from .cafenv. Repository root is assumed to be the working directory.
13+
# Include custom values from .lcafenv. Repository root is assumed to be the working directory.
1414
# Including overriding values in this file is preferred over modifying the contents below.
15-
CAF_ENV_FILE = .cafenv
16-
-include $(CAF_ENV_FILE)
15+
LCAF_ENV_FILE = .lcafenv
16+
-include $(LCAF_ENV_FILE)
1717

1818
# Source repository for repo manifests
19-
REPO_MANIFESTS_URL ?= https://github.com/nexient-llc/common-automation-framework.git
19+
REPO_MANIFESTS_URL ?= https://github.com/launchbynttdata/launch-common-automation-framework.git
2020
# Branch of source repository for repo manifests. Other tags not currently supported.
21-
# TODO: replace with git tag when supported
22-
REPO_BRANCH ?= main
21+
REPO_BRANCH ?= refs/tags/1.0.0
2322
# Path to seed manifest in repository referenced in REPO_MANIFESTS_URL
2423
REPO_MANIFEST ?= manifests/terraform_modules/seed/manifest.xml
2524

2625
# Settings to pull in Nexient version of (google) repo utility that supports environment substitution:
27-
REPO_URL ?= https://github.com/nexient-llc/git-repo.git
26+
REPO_URL ?= https://github.com/launchbynttdata/git-repo.git
2827
# Branch of the repository referenced by REPO_URL to use
29-
# TODO: replace with git tag when supported
3028
REPO_REV ?= main
3129
export REPO_REV REPO_URL
3230

3331
# Example variable to substituted after init, but before sync in repo manifests.
34-
GITBASE ?= https://github.com/nexient-llc/
35-
# TODO: replace with git tag when supported
32+
GITBASE ?= https://github.com/launchbynttdata/
3633
GITREV ?= main
3734
export GITBASE GITREV
3835

@@ -47,9 +44,22 @@ JOB_EMAIL ?= [email protected]
4744
COMPONENTS_DIR = components
4845
-include $(COMPONENTS_DIR)/Makefile
4946

47+
MODULE_DIR ?= ${COMPONENTS_DIR}/module
48+
49+
PYTHON3_INSTALLED = $(shell which python3 > /dev/null 2>&1; echo $$?)
50+
MISE_INSTALLED = $(shell which mise > /dev/null 2>&1; echo $$?)
51+
ASDF_INSTALLED = $(shell which asdf > /dev/null 2>&1; echo $$?)
52+
REPO_INSTALLED = $(shell which repo > /dev/null 2>&1; echo $$?)
53+
GIT_USER_SET = $(shell git config --get user.name > /dev/null 2>&1; echo $$?)
54+
GIT_EMAIL_SET = $(shell git config --get user.email > /dev/null 2>&1; echo $$?)
55+
5056
.PHONY: configure-git-hooks
51-
configure-git-hooks:
57+
configure-git-hooks: configure-dependencies
58+
ifeq ($(PYTHON3_INSTALLED), 0)
5259
pre-commit install
60+
else
61+
$(error Missing python3, which is required for pre-commit. Install python3 and rerun.)
62+
endif
5363

5464
ifeq ($(IS_PIPELINE),true)
5565
.PHONY: git-config
@@ -77,14 +87,33 @@ endef
7787
configure: git-auth
7888
endif
7989

90+
.PHONY: configure-dependencies
91+
configure-dependencies:
92+
ifeq ($(MISE_INSTALLED), 0)
93+
@echo "Installing dependencies using mise"
94+
@awk -F'[ #]' '$$NF ~ /https/ {system("mise plugin install " $$1 " " $$NF " --yes")} $$1 ~ /./ {system("mise install " $$1 " " $$2 " --yes")}' ./.tool-versions
95+
else ifeq ($(ASDF_INSTALLED), 0)
96+
@echo "Installing dependencies using asdf-vm"
97+
@awk -F'[ #]' '$$NF ~ /https/ {system("asdf plugin add " $$1 " " $$NF)} $$1 ~ /./ {system("asdf plugin add " $$1 "; asdf install " $$1 " " $$2)}' ./.tool-versions
98+
else
99+
$(error Missing supported dependency manager. Install asdf-vm (https://asdf-vm.com/) or mise (https://mise.jdx.dev/) and rerun)
100+
endif
101+
80102
.PHONY: configure
81103
configure: configure-git-hooks
82-
repo --color=never init --no-repo-verify \
104+
ifneq ($(and $(GIT_USER_SET), $(GIT_EMAIL_SET)), 0)
105+
$(error Git identities are not set! Set your user.name and user.email using 'git config' and rerun)
106+
endif
107+
ifeq ($(REPO_INSTALLED), 0)
108+
echo n | repo --color=never init --no-repo-verify \
83109
-u "$(REPO_MANIFESTS_URL)" \
84110
-b "$(REPO_BRANCH)" \
85111
-m "$(REPO_MANIFEST)"
86112
repo envsubst
87113
repo sync
114+
else
115+
$(error Missing Repo, which is required for platform sync. Install Repo (https://gerrit.googlesource.com/git-repo) and rerun.)
116+
endif
88117

89118
# The first line finds and removes all the directories pulled in by repo
90119
# The second line finds and removes all the broken symlinks from removing things

NOTICE

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
Copyright 2024 NTT DATA, Inc.
2+
13
Software, source files, and snippets are licensed under the Apache 2.0 license.
24

3-
All other content (eg documentation), unless otherwise specified, is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0) License (<https://creativecommons.org/licenses/by-nc-nd/4.0/>).
5+
All other content (e.g. documentation), unless otherwise specified, is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0) License (<https://creativecommons.org/licenses/by-nc-nd/4.0/>).
46

5-
If you discover a file that does not specify specify its license that should be licensed, please contact the repository owners as soon as possible to resolve the issue.
7+
If you discover a file that does not specify its license that should be licensed, please contact the repository owners as soon as possible to resolve the issue.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# tf-aws-module-cloudwatch_log_group
1+
# tf-aws-module_primitive-cloudwatch_log_group
22

33

44
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

0 commit comments

Comments
 (0)