Skip to content

Commit

Permalink
feat(ci): added init container
Browse files Browse the repository at this point in the history
  • Loading branch information
Torsten Egenolf committed Dec 15, 2023
1 parent 66519c4 commit 94e3fd6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 31 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ jobs:
--file ./Dockerfile
--tag "${APP_PACKAGES_URL}:${APP_VERSION}";
docker push "${APP_PACKAGES_URL}:${APP_VERSION}";
docker build .
--file ./DB-Changelog-Dockerfile
--tag "${APP_PACKAGES_URL}-initcontainer:${APP_VERSION}";
docker push "${APP_PACKAGES_URL}-initcontainer:${APP_VERSION}";
env:
APP_PACKAGES_URL: ghcr.io/worldhealthorganization/tng-key-distribution/tng-key-distribution
APP_PACKAGES_USERNAME: ${{ github.actor }}
Expand Down
35 changes: 4 additions & 31 deletions .github/workflows/ci-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ jobs:
--tag "${APP_PACKAGES_URL}:${APP_VERSION}"
docker push "${APP_PACKAGES_URL}:latest"
docker push "${APP_PACKAGES_URL}:${APP_VERSION}"
docker build .
--file ./DB-Changelog-Dockerfile
--tag "${APP_PACKAGES_URL}-initcontainer:${APP_VERSION}";
docker push "${APP_PACKAGES_URL}-initcontainer:${APP_VERSION}";
env:
APP_PACKAGES_URL: ghcr.io/worldhealthorganization/tng-key-distribution/tng-key-distribution
APP_PACKAGES_USERNAME: ${{ github.actor }}
Expand All @@ -60,34 +64,3 @@ jobs:
./target/generated-resources/licenses.xml#licenses-${APP_VERSION}.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy:
runs-on: ubuntu-20.04
environment: dev
needs:
- build
env:
APP_VERSION: ${{ github.event.release.tag_name }}
steps:
- name: cf setup
run: |-
curl -sL "https://packages.cloudfoundry.org/stable?release=${CF_RELEASE}&version=${CF_VERSION}" | \
sudo tar -zx -C /usr/local/bin
env:
CF_VERSION: 7.2.0
CF_RELEASE: linux64-binary
- name: cf push
run: |-
cf api ${CF_API}
cf auth
cf target -o ${CF_ORG} -s ${CF_SPACE}
cf push ${APP_NAME} --docker-image ${APP_IMAGE}:${APP_VERSION} --docker-username ${CF_DOCKER_USERNAME}
env:
APP_NAME: tng-key-distribution-test
APP_IMAGE: ghcr.io/worldhealthorganization/tng-key-distribution/tng-key-distribution
CF_API: ${{ secrets.CF_API }}
CF_ORG: ${{ secrets.CF_ORG }}
CF_SPACE: ${{ secrets.CF_SPACE }}
CF_USERNAME: ${{ secrets.CF_USERNAME }}
CF_PASSWORD: ${{ secrets.CF_PASSWORD }}
CF_DOCKER_USERNAME: ${{ secrets.CF_DOCKER_USERNAME }}
CF_DOCKER_PASSWORD: ${{ secrets.CF_DOCKER_PASSWORD }}

0 comments on commit 94e3fd6

Please sign in to comment.