diff --git a/.gitea/workflows/cron.yaml b/.gitea/workflows/cron.yaml index 6aa16a2..96f8d59 100644 --- a/.gitea/workflows/cron.yaml +++ b/.gitea/workflows/cron.yaml @@ -1,7 +1,9 @@ name: Nightly Rebuild + on: schedule: - cron: '0 0 * * *' + jobs: hadolint: runs-on: ubuntu-latest @@ -11,6 +13,7 @@ jobs: continue-on-error: true with: dockerfile: Dockerfile + build-push: runs-on: ubuntu-latest steps: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index d7e7d35..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,35 +0,0 @@ -image: "docker:latest" - -services: - - "docker:dind" - -before_script: - - "docker login -u \"$CI_REGISTRY_USER\" -p \"$CI_REGISTRY_PASSWORD\" $CI_REGISTRY" - -build-master: - stage: "build" - script: - - "docker build --pull -t \"$CI_REGISTRY_IMAGE\" ." - - "docker push \"$CI_REGISTRY_IMAGE\"" - only: - - "master" - -build: - stage: "build" - script: - - "docker build --pull -t \"$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG\" ." - - "docker push \"$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG\"" - except: - - "master" - -deploy-dockerhub: - stage: "deploy" - before_script: - - "docker login -u \"$DOCKERHUB_USER\" -p \"$DOCKERHUB_PASSWORD\"" - - "docker login -u \"$CI_REGISTRY_USER\" -p \"$CI_REGISTRY_PASSWORD\" $CI_REGISTRY" - script: - - "docker pull \"$CI_REGISTRY_IMAGE\"" - - "docker tag \"$CI_REGISTRY_IMAGE\" \"$DOCKERHUB_USER/$DOCKERHUB_PROJECT\"" - - "docker push \"$DOCKERHUB_USER/$DOCKERHUB_PROJECT\"" - only: - - "master" diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index b575901..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,38 +0,0 @@ -pipeline { - environment { - registry = 'https://registry.hub.docker.com' - registryCredential = 'dockerhub_jcabillot' - dockerImage = 'jcabillot/cipherscan' - } - - agent any - - triggers { - cron('@midnight') - } - - stages { - stage('Clone repository') { - steps{ - checkout scm - } - } - - stage('Build image') { - steps{ - sh 'docker build --force-rm=true --no-cache=true --pull -t ${dockerImage} .' - } - } - - stage('Deploy Image') { - steps{ - script { - withCredentials([usernamePassword(credentialsId: 'dockerhub_jcabillot', usernameVariable: 'DOCKER_USER', passwordVariable: 'DOCKER_PASS')]) { - sh 'docker login --username ${DOCKER_USER} --password ${DOCKER_PASS}' - sh 'docker push ${dockerImage}' - } - } - } - } - } -}