Skip to content

Commit

Permalink
Switch to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Feb 7, 2020
1 parent 74edf5a commit 44b056e
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 80 deletions.
41 changes: 0 additions & 41 deletions .circleci/config.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---

name: Continuous integration

on:
push:

env:
PROJECT: demo
OPENSHIFT_PROJECT: gs-gmf-demo
HELM_RELEASE_NAMES: prod-2-5
OPENSHIFT_URL: https://openshift-ch-1.camptocamp.com/
PATH: /bin:/usr/bin:/usr/local/bin:/home/runner/.local/bin
SUMMON_PROVIDER: /usr/local/bin/gopass
PGSCHEMA: main_2_5

jobs:
config:
runs-on: ubuntu-18.04
name: Config
timeout-minutes: 10

steps:
- uses: actions/checkout@v1

- name: Build config
run: ./build --config --pgschema=${PGSCHEMA}

- uses: camptocamp/initialise-gopass-summon-action@v1
with:
ci-gpg-private-key: ${{secrets.CI_GPG_PRIVATE_KEY}}
github-gopass-ci-token: ${{secrets.GITHUB_GOPASS_CI_TOKEN}}
- run: scripts/publish-docker config

geoportal:
runs-on: ubuntu-18.04
name: Geoportal
timeout-minutes: 10

steps:
- uses: actions/checkout@v1

- name: Build geoportal
run: ./build --geoportal --pgschema=${PGSCHEMA}

# - uses: camptocamp/initialise-gopass-summon-action@v1
# with:
# ci-gpg-private-key: ${{secrets.CI_GPG_PRIVATE_KEY}}
# github-gopass-ci-token: ${{secrets.GITHUB_GOPASS_CI_TOKEN}}
# - run: scripts/publish-docker geoportal
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

15 changes: 12 additions & 3 deletions scripts/publish-docker
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ subprocess.check_call(
[
"docker",
"login",
"--username=" + os.environ["DOCKER_USERNAME"],
"--password=" + os.environ["DOCKER_PASSWORD"],
"--username=" + subprocess.check_output(["gopass", "gs/ci/dockerhub/username"]),
"--password=" + subprocess.check_output(["gopass", "gs/ci/dockerhub/username"]),
]
)

Expand All @@ -48,7 +48,16 @@ subprocess.check_call(["tar", "xfz", openshift_file], cwd="/tmp")
oc = "/tmp/{}/oc".format(openshift_version_name)

subprocess.check_call(
[oc, "login", os.environ["OPENSHIFT_URL"], "--token=" + os.environ["OPENSHIFT_TOKEN"],]
[
oc,
"login",
os.environ["OPENSHIFT_URL"],
"--token="
+ subprocess.check_output(
["gopass", "gs/ci/openshift/{}/token".format(os.environ["OPENSHIFT_PROJECT"])]
),
os.environ["OPENSHIFT_TOKEN"],
]
)
for image in images:
openshift_image_ref = "{version}-c2cgeoportal-{image}:{version}".format(version=version, image=image)
Expand Down

0 comments on commit 44b056e

Please sign in to comment.