49 Commits

Author SHA1 Message Date
Reese
465f46ad48 Merge branch 'add-docker-compose-targets' into 'main'
Add docker compose targets

See merge request services/common!10
2021-12-13 20:13:39 +00:00
ducoterra
f6aed2c86a add docker-compose init, up, and down targets 2021-12-13 15:11:00 -05:00
ducoterra
88716ad3ff populate default values for VERSION and IMAGE file when docker-init is run 2021-12-13 15:05:52 -05:00
Reese
16ee2f3ddc Merge branch 'various-docker-fixes' into 'main'
fix docker build and remove release

See merge request services/common!9
2021-12-13 00:33:44 +00:00
ducoterra
5b3e196267 fix docker build and remove release 2021-12-12 19:30:55 -05:00
Reese
4bf9d45797 Merge branch 'prefix-docker-commands' into 'main'
prefix all docker commands with docker-

See merge request services/common!7
2021-12-13 00:26:23 +00:00
ducoterra
91b77b3d31 don't reset head after subtree pull, it breaks things 2021-12-12 19:26:02 -05:00
ducoterra
66b436219f prefix all docker commands with docker- 2021-12-12 19:20:30 -05:00
Reese
ba2827a8fe Merge branch 'allow-specify-branch' into 'main'
Allow pulling specific branch with BRANCH_NAME

See merge request services/common!8
2021-12-13 00:18:38 +00:00
ducoterra
4de5558b63 ignore .gitlab 2021-12-12 19:16:01 -05:00
ducoterra
71ff227953 Allow pulling specific branch with BRANCH_NAME
Allow make-update and make-add to specify a branch name to pull an
update from.
2021-12-12 19:16:01 -05:00
Reese
64304160b9 Merge branch 'add-helm-and-kube' into 'main'
Add kubectl.makefile

See merge request services/common!6
2021-12-06 03:20:04 +00:00
ducoterra
bce675fbd2 Add install, upgrade, and uninstall for helm
Add helm commands to handle installing and uninstall an app.
2021-12-05 22:13:38 -05:00
ducoterra
1532f30641 Add kubectl.makefile
Add kubectl make commands like set-namespace and create-regcred.
2021-12-05 22:13:32 -05:00
Reese
cf41f2e776 Merge branch 'remove-push' into 'main'
Add automated commit to chart-release

See merge request services/common!5
2021-11-02 19:47:43 +00:00
ducoterra
ef81c957f7 Remove unused commands
Remove unused make commands like warning.
2021-11-02 15:45:06 -04:00
ducoterra
81c19ccd2a Don't use remote common
We're not going to allow remote updates so don't bother with remote
common.
2021-11-02 15:44:43 -04:00
ducoterra
ea1e248d4a Update subtree add README
Update section in README explaining how to add this project as a
subtree.
2021-11-02 15:42:42 -04:00
ducoterra
756cc8ca51 Remove make-push
Do not allow pushing subtree from projects. It's messy when multiple
subtrees are involved. Just update common itself.
2021-11-02 15:42:10 -04:00
ducoterra
a4b7e34e57 Squash subtree on pull
Squash subtree history on pull.
2021-11-02 15:38:43 -04:00
ducoterra
524c5beccd Fix PROJECT_NAME variable
PROJECT_NAME wasn't working properly, fixed.
2021-11-02 15:36:18 -04:00
ducoterra
47dea4876f Add automated commit to chart-release
Add automated add and commit to chart-release.
2021-11-02 15:35:44 -04:00
Reese
731ada6a3d Merge branch 'make-update-fixes' into 'main'
Update README with "common" remote

See merge request services/common!4
2021-11-02 15:50:30 +00:00
ducoterra
c3e6d733c6 Switch to "subtree split" push strategy
Split the subtree into a new branch before pushing to common. This
creates a new branch automatically and ensures no weird histories get
committed to common.
2021-11-02 11:48:15 -04:00
ducoterra
3c91292fea Make user stash their own damn changes
Stashing is so annoying to deal with in a scripted way. Just force the
user to stash their own changes. Only subtree pull if it's possible.
2021-11-02 11:47:29 -04:00
ducoterra
d86b5052a8 Add PROJECT_NAME and VERSION
Add PROJECT_NAME and VERSION variables to Makefile.
2021-11-02 11:46:53 -04:00
ducoterra
9d0c9c6388 Update README with "common" remote
Add instructions for adding subtree using a remote called "common". You
need the remote to properly contribute back upstream from a child
project.
2021-11-02 11:45:57 -04:00
Reese
30fb8c2171 Merge branch 'docker-buidlx-overhaul' into 'main'
Switch to container-builder buildx platform

See merge request services/common!2
2021-11-02 15:44:36 +00:00
Reese
fd96b3f3a3 Merge branch 'git-release' into 'main'
Add make git-release

See merge request services/common!3
2021-11-02 15:44:26 +00:00
ducoterra
a6053ed3f0 Add make git-release
Add command which makes an automated release from the VERSION file.
Commits and tags everything not staged in the repo.
2021-11-02 10:25:18 -04:00
ducoterra
3563c5c2aa Add make docker-release
Add docker-release command which updates the image tag in the
docker-compose.yaml and runs a `make push`.
2021-11-02 10:23:53 -04:00
ducoterra
40a217b585 Use buildx to create multi-arch images
clear and set the buildx context on push. Then use --push with buildx
build to push the multi-arch images immediately after creating them.
This gets around the need to store them locally (which won't work for
something like an M1 mac).
2021-11-02 10:22:48 -04:00
ducoterra
5e2bc5f872 Switch to container-builder buildx platform
Continue using buildx with a new container builder name
"container-builder".
2021-11-02 10:19:21 -04:00
ducoterra
9eed50962c Don't squash on pull
Don't squash updates on pull
2021-11-01 20:32:27 -04:00
ducoterra
b07a2c095b Run update after make-push
To close things out we should re-run make-update to ensure changes are
pulled back into the repo we updated from.
2021-11-01 10:05:43 -04:00
ducoterra
22a952dd53 Remove warning from make-update
make-update isn't as destructive as it once was. It should be safe to
run as long as the developer is fixes any weird merge conflicts after
stash pop.
2021-11-01 10:02:35 -04:00
ducoterra
0f6eeb776e Add make-stash-drop command
Sometimes you can get stuck in a loop where git stash pop preserves the
stash commit. Dropping that commit if it's a STASH commit after an
update is totally fine.
2021-11-01 10:01:12 -04:00
ducoterra
f81d846f31 Only pop stash if changes
Only pop the stash if the most recent stash commit matches the STASH
name.
2021-11-01 09:56:37 -04:00
ducoterra
afed93f58a Add warning to make-update and make-push
Add warning before make-update and make-push to alert developers that
running the commands might be destructive. Allow cancelling the command
up to 3 seconds before continuing. Also explain that merge conflicts
warrant a re-run of the command.
2021-11-01 09:38:00 -04:00
ducoterra
6239af7f74 Ignore git stash pop failures
In the event the stash is empty, don't run stash pop.
2021-11-01 09:23:36 -04:00
ducoterra
2f767593ef Add make-push command
Add command to update the subtree from a child repo. This pushes to the
main branch of the common repo with only the relevant commits.
2021-11-01 09:20:11 -04:00
ducoterra
66b4fdb902 Ignore subtree pull failures
Rather than potentially leaving the developer in a state where `git
stash pop` wasn't run, ignore failures in git subtree and let the
developer fix issues and re-run the command. This makes `make-update`
more idempotent.
2021-11-01 09:13:15 -04:00
ducoterra
da69418b0d Switch to url-based subtree with make-update
Add new `make-update` make command to update the .gitlab subtree.
2021-10-31 22:56:47 -04:00
ducoterra
ba12c923ba Remove docker-run
Docker-run was only useful in very specific projects. Projects should
either define their own "run" in their Makefile, add a
docker-compose.yaml, or specify instructions in the README.
2021-10-31 20:59:29 -04:00
ducoterra
74a4a4e77f Transition to .gitlab prefix
Expect repo to be subtree'd as ".gitlab"
2021-10-31 20:33:47 -04:00
ducoterra
3e8ca71358 Add chart-release to truenas.makefile
Add chart-release to add a subtree chart to the charts releases in the
charts repo.
2021-10-31 20:22:20 -04:00
ducoterra
4146777f85 Add helm.makefile
Add helm.makefile with a helm-release command to make a helm release.
2021-10-31 20:21:08 -04:00
ducoterra
8a52a21a39 Switch to multi-makefile strategy
Instead of putting everything in one makefile switch to a folder called
"make" with multiple makefiles. Move the original makefile to
"docker.makefile" and add kaniko and truenas to fill in later.
2021-10-31 15:03:59 -04:00
ducoterra
f18752299d init 2021-10-30 22:28:20 -04:00