Skip to content

Commit

Permalink
Bump 1.11 (#191)
Browse files Browse the repository at this point in the history
* version bump

* bump django version

* wow I feel like a platform newbie

* bump(cdkactions)

* chore(cdkactions/validate)
  • Loading branch information
esinx authored Feb 18, 2024
1 parent eb5a01c commit 5de0903
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 37 deletions.
74 changes: 40 additions & 34 deletions .github/cdk/main.ts
Original file line number Diff line number Diff line change
@@ -1,47 +1,53 @@
import { App, CheckoutJob, Stack, Workflow } from "cdkactions";
import { App, CheckoutJob, Stack, Workflow } from "cdkactions"
import { CDKPublishStack } from "@pennlabs/kraken"
import { Construct } from "constructs";
import { DjangoBaseDockerStack, DockerPublishStack, ShibbolethDockerStack } from "./docker";
import { Construct } from "constructs"
import {
DjangoBaseDockerStack,
DockerPublishStack,
ShibbolethDockerStack,
} from "./docker"

class TerraformLintStack extends Stack {
constructor(scope: Construct, name: string) {
super(scope, name);
constructor(scope: Construct, name: string) {
super(scope, name)

const workflow = new Workflow(this, 'terraform', {
name: 'Lint terraform files',
on: {
push: {
paths: ['terraform/**.tf']
}
},
});
const workflow = new Workflow(this, "terraform", {
name: "Lint terraform files",
on: {
push: {
paths: ["terraform/**.tf"],
},
},
})

new CheckoutJob(workflow, 'lint', {
runsOn: 'ubuntu-latest',
steps: [
{
uses: 'hashicorp/setup-terraform@v1'
},
{
run: 'terraform fmt -check -recursive terraform'
}
],
});
}
new CheckoutJob(workflow, "lint", {
runsOn: "ubuntu-latest",
steps: [
{
uses: "hashicorp/setup-terraform@v1",
},
{
run: "terraform fmt -check -recursive terraform",
},
],
})
}
}

const app = new App();
const app = new App()

// CDK stacks
new CDKPublishStack(app, 'kraken');
new CDKPublishStack(app, 'kittyhawk');
new CDKPublishStack(app, "kraken")
new CDKPublishStack(app, "kittyhawk")

// Docker stacks
const dockerImages = ['datadog-agent', 'pg-s3-backup', 'team-sync'];
dockerImages.map(name => new DockerPublishStack(app, name));
new DjangoBaseDockerStack(app, {pythonVersions: ['3.9.14', '3.8.5', '3.10.1']});
new ShibbolethDockerStack(app);
const dockerImages = ["datadog-agent", "pg-s3-backup", "team-sync"]
dockerImages.map((name) => new DockerPublishStack(app, name))
new DjangoBaseDockerStack(app, {
pythonVersions: ["3.9.14", "3.8.5", "3.10.1", "3.11"],
})
new ShibbolethDockerStack(app)

// Misc stacks
new TerraformLintStack(app, 'terraform');
app.synth();
new TerraformLintStack(app, "terraform")
app.synth()
2 changes: 1 addition & 1 deletion .github/cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@pennlabs/kraken": "^0.8.10",
"cdkactions": "^0.2.0",
"cdkactions": "^0.2.3",
"constructs": "^3.3.259"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion .github/cdk/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ cdkactions-cli@^0.2.3:
yaml "^1.10.0"
yargs "^16.2.0"

cdkactions@^0.2.0, cdkactions@^0.2.3:
cdkactions@^0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/cdkactions/-/cdkactions-0.2.3.tgz#aa27bf720962376d54f8ef95cdfb0ab46458b966"
integrity sha512-/DYQ2qsT6fzgZB+cmQjtPqR4aAWCqAytWbFpJK+iJLQ4jQrl6l4uMf01TLiWY3mAILS0YGlwPcoBbGvq9Jnz5g==
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/cdkactions_docker-django-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,32 @@ jobs:
cache-to: type=local,dest=/tmp/.buildx-cache
build-args: PYTHON_VERSION=3.10.1
tags: pennlabs/django-base:${{ github.sha }}-3.10.1
publish-django-base-3-11:
name: Publish django-base-3-11
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: buildx-publish-django-base-3-11
- uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build/Publish
uses: docker/build-push-action@v2
with:
context: docker/django-base
file: docker/django-base/Dockerfile
push: ${{ github.ref == 'refs/heads/master' }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
build-args: PYTHON_VERSION=3.11
tags: pennlabs/django-base:${{ github.sha }}-3.11
publish-django-base:
name: Publish django-base
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion docker/django-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG PYTHON_VERSION=3.10.1
ARG PYTHON_VERSION=3.10
FROM python:${PYTHON_VERSION}-slim-buster

LABEL maintainer="Penn Labs"
Expand Down

0 comments on commit 5de0903

Please sign in to comment.