Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Fixing PowerShell bug with k8sworker image docker file and reordering…
Browse files Browse the repository at this point in the history
… the build file to build the full worker very last.
  • Loading branch information
BobJWalker committed Oct 6, 2020
1 parent 605a4d5 commit e777d12
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 48 deletions.
96 changes: 48 additions & 48 deletions .github/workflows/dockerhubpush.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,100 +45,100 @@ jobs:
docker push $BASE_IMAGE_NAME:$VERSION
docker push $BASE_IMAGE_NAME:latest
- name: Build worker image
run: docker build ./tentacle-worker --tag $WORKER_IMAGE_NAME

- name: Push worker image to DockerHub
- name: Build .net core image
run: docker build ./tentacle-dotnetcoreworker --tag $DOTNET_CORE_IMAGE_NAME
- name: Push .net core image to DockerHub
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo VERSION=$VERSION
docker tag $WORKER_IMAGE_NAME $WORKER_IMAGE_NAME:latest
docker tag $WORKER_IMAGE_NAME $WORKER_IMAGE_NAME:$VERSION
docker push $WORKER_IMAGE_NAME:$VERSION
docker push $WORKER_IMAGE_NAME:latest
- name: Build execution container image
run: docker build ./tentacle-executioncontainer --tag $EXECUTION_CONTAINER_IMAGE_NAME
docker tag $DOTNET_CORE_IMAGE_NAME $DOTNET_CORE_IMAGE_NAME:latest
docker tag $DOTNET_CORE_IMAGE_NAME $DOTNET_CORE_IMAGE_NAME:$VERSION
docker push $DOTNET_CORE_IMAGE_NAME:$VERSION
docker push $DOTNET_CORE_IMAGE_NAME:latest
- name: Push execution container image to DockerHub
- name: Build java image
run: docker build ./tentacle-javaworker --tag $JAVA_IMAGE_NAME

- name: Push java image to DockerHub
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo VERSION=$VERSION
docker tag $EXECUTION_CONTAINER_IMAGE_NAME $EXECUTION_CONTAINER_IMAGE_NAME:latest
docker tag $EXECUTION_CONTAINER_IMAGE_NAME $EXECUTION_CONTAINER_IMAGE_NAME:$VERSION
docker push $EXECUTION_CONTAINER_IMAGE_NAME:$VERSION
docker push $EXECUTION_CONTAINER_IMAGE_NAME:latest
docker tag $JAVA_IMAGE_NAME $JAVA_IMAGE_NAME:latest
docker tag $JAVA_IMAGE_NAME $JAVA_IMAGE_NAME:$VERSION
docker push $JAVA_IMAGE_NAME:$VERSION
docker push $JAVA_IMAGE_NAME:latest
- name: Build k8s image
run: docker build ./tentacle-k8sworker --tag $K8S_IMAGE_NAME

- name: Push k8s image to DockerHub
- name: Build nodejs image
run: docker build ./tentacle-nodejsworker --tag $NODEJS_IMAGE_NAME
- name: Push nodejs image to DockerHub
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo VERSION=$VERSION
docker tag $K8S_IMAGE_NAME $K8S_IMAGE_NAME:latest
docker tag $K8S_IMAGE_NAME $K8S_IMAGE_NAME:$VERSION
docker push $K8S_IMAGE_NAME:$VERSION
docker push $K8S_IMAGE_NAME:latest
docker tag $NODEJS_IMAGE_NAME $NODEJS_IMAGE_NAME:latest
docker tag $NODEJS_IMAGE_NAME $NODEJS_IMAGE_NAME:$VERSION
docker push $NODEJS_IMAGE_NAME:$VERSION
docker push $NODEJS_IMAGE_NAME:latest
- name: Build .net core image
run: docker build ./tentacle-dotnetcoreworker --tag $DOTNET_CORE_IMAGE_NAME
- name: Push .net core image to DockerHub
- name: Build worker image
run: docker build ./tentacle-worker --tag $WORKER_IMAGE_NAME

- name: Push worker image to DockerHub
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo VERSION=$VERSION
docker tag $DOTNET_CORE_IMAGE_NAME $DOTNET_CORE_IMAGE_NAME:latest
docker tag $DOTNET_CORE_IMAGE_NAME $DOTNET_CORE_IMAGE_NAME:$VERSION
docker push $DOTNET_CORE_IMAGE_NAME:$VERSION
docker push $DOTNET_CORE_IMAGE_NAME:latest
docker tag $WORKER_IMAGE_NAME $WORKER_IMAGE_NAME:latest
docker tag $WORKER_IMAGE_NAME $WORKER_IMAGE_NAME:$VERSION
docker push $WORKER_IMAGE_NAME:$VERSION
docker push $WORKER_IMAGE_NAME:latest
- name: Build java image
run: docker build ./tentacle-javaworker --tag $JAVA_IMAGE_NAME
- name: Push java image to DockerHub
- name: Build execution container image
run: docker build ./tentacle-executioncontainer --tag $EXECUTION_CONTAINER_IMAGE_NAME

- name: Push execution container image to DockerHub
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo VERSION=$VERSION
docker tag $JAVA_IMAGE_NAME $JAVA_IMAGE_NAME:latest
docker tag $JAVA_IMAGE_NAME $JAVA_IMAGE_NAME:$VERSION
docker push $JAVA_IMAGE_NAME:$VERSION
docker push $JAVA_IMAGE_NAME:latest
docker tag $EXECUTION_CONTAINER_IMAGE_NAME $EXECUTION_CONTAINER_IMAGE_NAME:latest
docker tag $EXECUTION_CONTAINER_IMAGE_NAME $EXECUTION_CONTAINER_IMAGE_NAME:$VERSION
docker push $EXECUTION_CONTAINER_IMAGE_NAME:$VERSION
docker push $EXECUTION_CONTAINER_IMAGE_NAME:latest
- name: Build nodejs image
run: docker build ./tentacle-nodejsworker --tag $NODEJS_IMAGE_NAME
- name: Push nodejs image to DockerHub
- name: Build k8s image
run: docker build ./tentacle-k8sworker --tag $K8S_IMAGE_NAME

- name: Push k8s image to DockerHub
run: |
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
echo VERSION=$VERSION
docker tag $NODEJS_IMAGE_NAME $NODEJS_IMAGE_NAME:latest
docker tag $NODEJS_IMAGE_NAME $NODEJS_IMAGE_NAME:$VERSION
docker push $NODEJS_IMAGE_NAME:$VERSION
docker push $NODEJS_IMAGE_NAME:latest
docker tag $K8S_IMAGE_NAME $K8S_IMAGE_NAME:latest
docker tag $K8S_IMAGE_NAME $K8S_IMAGE_NAME:$VERSION
docker push $K8S_IMAGE_NAME:$VERSION
docker push $K8S_IMAGE_NAME:latest
4 changes: 4 additions & 0 deletions tentacle-k8sworker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM octopuslabs/tentacle:latest

ARG Powershell_Version=7.0.3\*
ARG Azure_Cli_Version=2.10.1\*
ARG Azure_Powershell_Version=4.7.0
ARG Helm_Version=v3.3.0
Expand Down Expand Up @@ -49,6 +50,9 @@ RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.
wget -q -O - https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && \
apt-get update && apt-get install -y google-cloud-sdk

# Get python & groff
RUN apt-get install -y python3-pip groff

# Get AWS CLI
# https://docs.aws.amazon.com/cli/latest/userguide/install-linux.html#install-linux-awscli
RUN pip3 install "awscli>=1.18.0,<=1.19.0" --upgrade
Expand Down

0 comments on commit e777d12

Please sign in to comment.