diff --git a/.woodpecker/keycloak.yaml b/.woodpecker/keycloak.yaml index f98ad87..06eed66 100644 --- a/.woodpecker/keycloak.yaml +++ b/.woodpecker/keycloak.yaml @@ -28,6 +28,7 @@ steps: image: alpine commands: - mkdir /woodpecker/images + - name: build-image image: gcr.io/kaniko-project/executor entrypoint: @@ -38,6 +39,7 @@ steps: - --destination=${IMAGE_NAME}:${KEYCLOAK_VERSION} - --no-push - --tar-path=/woodpecker/images/keycloak.tar + - name: publish-image image: alpine secrets: @@ -45,16 +47,27 @@ steps: commands: - apk -u add crane - crane auth login git.hamburg.ccc.de -u woodpecker -p $GIT_API_TOKEN - - crane push /woodpecker/images/keycloak.tar $IMAGE_NAME:$KEYCLOAK_VERSION - - name: tag-branch-and-latest + - crane push /woodpecker/images/keycloak.tar $IMAGE_NAME:$KEYCLOAK_VERSION-$CI_COMMIT_BRANCH + + - name: tag-version image: alpine when: - branch: main - - evaluate: 'KEYCLOAK_VERSION == "25.0"' secrets: - GIT_API_TOKEN commands: - apk -u add crane - crane auth login git.hamburg.ccc.de -u woodpecker -p $GIT_API_TOKEN - - crane tag $IMAGE_NAME:$KEYCLOAK_VERSION $CI_COMMIT_BRANCH - - crane tag $IMAGE_NAME:$KEYCLOAK_VERSION latest + - crane tag $IMAGE_NAME:$KEYCLOAK_VERSION-$CI_COMMIT_BRANCH $KEYCLOAK_VERSION + + - name: tag-latest + image: alpine + when: + - branch: main + evaluate: 'KEYCLOAK_VERSION == "25.0"' + secrets: + - GIT_API_TOKEN + commands: + - apk -u add crane + - crane auth login git.hamburg.ccc.de -u woodpecker -p $GIT_API_TOKEN + - crane tag $IMAGE_NAME:$KEYCLOAK_VERSION-$CI_COMMIT_BRANCH latest diff --git a/.woodpecker/nextcloud.yaml b/.woodpecker/nextcloud.yaml index 36b4a19..feea22e 100644 --- a/.woodpecker/nextcloud.yaml +++ b/.woodpecker/nextcloud.yaml @@ -48,9 +48,20 @@ steps: commands: - apk -u add crane - crane auth login git.hamburg.ccc.de -u woodpecker -p $GIT_API_TOKEN - - crane push /woodpecker/images/nextcloud.tar $IMAGE_NAME:$NEXTCLOUD_VERSION + - crane push /woodpecker/images/nextcloud.tar $IMAGE_NAME:$NEXTCLOUD_VERSION-$CI_COMMIT_BRANCH - - name: tag-branch-and-latest + - name: tag-version + image: docker.io/library/alpine + when: + - branch: main + secrets: + - GIT_API_TOKEN + commands: + - apk -u add crane + - crane auth login git.hamburg.ccc.de -u woodpecker -p $GIT_API_TOKEN + - crane tag $IMAGE_NAME:$NEXTCLOUD_VERSION-$CI_COMMIT_BRANCH $NEXTCLOUD_VERSION + + - name: tag-latest image: docker.io/library/alpine when: - branch: main @@ -60,5 +71,4 @@ steps: commands: - apk -u add crane - crane auth login git.hamburg.ccc.de -u woodpecker -p $GIT_API_TOKEN - - crane tag $IMAGE_NAME:$NEXTCLOUD_VERSION $CI_COMMIT_BRANCH - - crane tag $IMAGE_NAME:$NEXTCLOUD_VERSION latest + - crane tag $IMAGE_NAME:$NEXTCLOUD_VERSION-$CI_COMMIT_BRANCH latest