Skip to content
Draft

V2.x #550

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ea078d2
Progress (will reset-cleanup later)
DimmKirr Apr 21, 2024
e0d7e90
Progress (will reset-cleanup later)
DimmKirr Apr 21, 2024
def412e
Progress (will reset-cleanup later)
DimmKirr May 6, 2024
a69fd7c
Improvements:
DimmKirr May 14, 2024
8b7a565
Run dev builds on v2.x from now on
DimmKirr May 14, 2024
d16bfde
Improvements:
DimmKirr May 14, 2024
6322a6e
Updated dev build to goreleaser v5
DimmKirr May 14, 2024
62d7ec7
Upgrade go in the workflow
DimmKirr May 14, 2024
4c7faa2
Update go version in github action for tests
DimmKirr May 15, 2024
2aa093c
Updates & Fixes:
DimmKirr May 15, 2024
e8be40c
Update go version in unit tests workflows
DimmKirr May 15, 2024
b3301a5
Update go version in unit tests workflows
DimmKirr May 15, 2024
4952d16
Fix minor tests
DimmKirr May 15, 2024
552141e
Updates:
DimmKirr May 15, 2024
d9d847a
Fix typo
DimmKirr May 15, 2024
f8849bd
remove an empty multistate example, upgrade vpcs terraform modules to…
DimmKirr May 15, 2024
f73a848
Upgrade lower limit of terraform provider and bastion module
DimmKirr May 15, 2024
391b926
Lower the limit of AWS provider to allow nat instance module to work
DimmKirr May 15, 2024
a3a9c8e
Generate localstack profile if IZE_LOCALSTACK is set to true
DimmKirr Jun 6, 2024
89220de
Fix E2E: WIP
DimmKirr Jun 10, 2024
1f5fd2d
Don't nvm silence usage
DimmKirr Aug 7, 2024
1b20ee8
Add better error from nvm
DimmKirr Aug 7, 2024
9007659
Add better error from nvm
DimmKirr Aug 7, 2024
697bcbd
Better nvm logging
DimmKirr Aug 8, 2024
ba0a6c0
Add bash debug
DimmKirr Aug 8, 2024
078028c
Add bash debug
DimmKirr Aug 8, 2024
d676a58
Add nvm version lock/set
DimmKirr Aug 8, 2024
7d1665b
Add nvm version lock/set
DimmKirr Aug 8, 2024
f15f2c7
Fix err assignment
DimmKirr Aug 8, 2024
00e186e
WIP
DimmKirr Aug 8, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/release-dev.build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:

steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v4
with:
go-version: 1.18.x
go-version: 1.22.x

- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -29,7 +29,7 @@ jobs:

# TODO: This should run only if all tests are satisfying
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v5
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:
push:
branches:
- main
- v2.x
jobs:
update_github_dev_release:
name: Update Github dev Release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-prod.build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.18.x

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/run.brew-and-apt-install-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ env:

on:
workflow_dispatch:
# TODO: Re-enable this after the tests are stable
# schedule:
# - cron: '0 3 * * */2'

Expand Down
33 changes: 20 additions & 13 deletions .github/workflows/run.e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:

on:
workflow_dispatch:
pull_request:
# pull_request: # Re-enable after nvm bug is fixed

jobs:
build:
Expand All @@ -24,9 +24,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.18.x
go-version: 1.22.x

- name: Checkout Code
uses: actions/checkout@v2
Expand Down Expand Up @@ -62,16 +62,19 @@ jobs:
echo "ENV=${{ github.job }}-$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_PROD }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_PROD }}
aws-region: ${{ env.AWS_REGION }}
env:
AWS_PROFILE: # This is required due to a bug https://stackoverflow.com/a/77731682


- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.18.x
go-version: 1.22.x

- name: Checkout Code
uses: actions/checkout@v2
Expand Down Expand Up @@ -126,16 +129,18 @@ jobs:
echo "ENV=${{ github.job }}-$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_PROD }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_PROD }}
aws-region: ${{ env.AWS_REGION }}
env:
AWS_PROFILE: # This is required due to a bug https://stackoverflow.com/a/77731682

- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.18.x
go-version: 1.22.x

- name: Checkout Code
uses: actions/checkout@v2
Expand All @@ -151,7 +156,7 @@ jobs:
- name: Make Executable
run: |
chmod +rx "${{ github.workspace }}/bin/ize"
ize --version
ize --version

- name: Create AWS Profile
run: ize gen aws-profile
Expand Down Expand Up @@ -197,16 +202,18 @@ jobs:
echo "ENV=${{ github.job }}-$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_PROD }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_PROD }}
aws-region: ${{ env.AWS_REGION }}
env:
AWS_PROFILE: # This is required due to a bug https://stackoverflow.com/a/77731682

- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.18.x
go-version: 1.22.x

- name: Checkout Code
uses: actions/checkout@v2
Expand Down
25 changes: 19 additions & 6 deletions .github/workflows/run.unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
push:
branches:
- main
- v2.x

jobs:
build:
Expand All @@ -27,9 +28,9 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.18.x
go-version: 1.22.x

- name: Checkout Code
uses: actions/checkout@v2
Expand All @@ -54,9 +55,9 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.18
go-version: 1.22.x

- name: Generate
run: |
Expand All @@ -81,6 +82,7 @@ jobs:
cat report.txt | go-junit-report -set-exit-code > report.xml
else
go test -v ./... -coverprofile=coverage.out -covermode=atomic 2>&1 ./... > report.txt
cat report.txt | go-junit-report -set-exit-code > report.xml
fi

- name: Publish Test Report
Expand All @@ -89,5 +91,16 @@ jobs:
with:
report_paths: './report.xml'

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
- name: Test Summary
uses: test-summary/action@v2
if: always()
with:
paths: ./report.xml

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
files: coverage.out
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
name: coverage-${{ github.sha }}
5 changes: 3 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
Copyright © 2021 NAME HERE <EMAIL ADDRESS>
Copyright © 2021 HazelOps OÜ

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -23,6 +23,7 @@ import (

func main() {
// Running a version check in goroutine and waiting finished

var wg sync.WaitGroup
wg.Add(1)
go func() {
Expand Down
4 changes: 2 additions & 2 deletions examples/bastion-tunnel-monorepo/.ize/env/testnut/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resource "aws_key_pair" "root" {

module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "~> 3.0"
version = "~> 5.0"

name = "${var.env}-vpc"
cidr = "10.0.0.0/16"
Expand Down Expand Up @@ -79,7 +79,7 @@ module "ec2_profile" {

module "bastion" {
source = "hazelops/ec2-openvpn-connector/aws"
version = "~>0.2"
version = "~>0.4.1"

vpn_enabled = false
env = var.env
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.0"
version = ">= 3.0"
}
}
required_version = ">= 0.13"
Expand Down
2 changes: 1 addition & 1 deletion examples/ecs-apps-monorepo/.ize/env/testnut/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resource "aws_key_pair" "root" {

module "vpc" {
source = "registry.terraform.io/terraform-aws-modules/vpc/aws"
version = "~> 3.0"
version = "~> 5.0"

name = "${var.env}-vpc"
cidr = "10.0.0.0/16"
Expand Down
2 changes: 1 addition & 1 deletion examples/ecs-apps-monorepo/.ize/env/testnut/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
version = ">= 4.42.0"
}
}
required_version = ">= 0.13"
Expand Down
2 changes: 1 addition & 1 deletion examples/multistack-monorepo/vpc/main.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module "vpc" {
source = "registry.terraform.io/terraform-aws-modules/vpc/aws"
version = "~> 3.0"
version = "~> 5.0"

name = "${var.env}-vpc"
cidr = "10.0.0.0/16"
Expand Down
Empty file.
11 changes: 0 additions & 11 deletions examples/multistate-monorepo/.ize/env/testnut/api/variables.tf

This file was deleted.

60 changes: 0 additions & 60 deletions examples/multistate-monorepo/.ize/env/testnut/ize.toml

This file was deleted.

Empty file.
11 changes: 0 additions & 11 deletions examples/multistate-monorepo/.ize/env/testnut/variables.tf

This file was deleted.

Empty file.
11 changes: 0 additions & 11 deletions examples/multistate-monorepo/.ize/env/testnut/vpc/variables.tf

This file was deleted.

Loading